jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1346781 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Wed, 06 Jun 2012 08:43:01 GMT
Author: angela
Date: Wed Jun  6 08:43:00 2012
New Revision: 1346781

URL: http://svn.apache.org/viewvc?rev=1346781&view=rev
Log:
minor improvement

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1346781&r1=1346780&r2=1346781&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Wed Jun  6 08:43:00 2012
@@ -442,8 +442,7 @@ public class NodeImpl extends ItemImpl i
                     @Override
                     public boolean evaluate(NodeDelegate state) {
                         try {
-                            return ItemNameMatcher.matches(
-                                    toJcrPath(state.getName()), namePattern);
+                            return ItemNameMatcher.matches(toJcrPath(state.getName()), namePattern);
                         } catch (InvalidItemStateException e) {
                             return false;
                         }
@@ -506,8 +505,7 @@ public class NodeImpl extends ItemImpl i
                     @Override
                     public boolean evaluate(PropertyDelegate entry) {
                         try {
-                            return ItemNameMatcher.matches(
-                                    toJcrPath(entry.getName()), namePattern);
+                            return ItemNameMatcher.matches(toJcrPath(entry.getName()), namePattern);
                         } catch (InvalidItemStateException e) {
                             return false;
                         }
@@ -527,8 +525,7 @@ public class NodeImpl extends ItemImpl i
                     @Override
                     public boolean evaluate(PropertyDelegate entry) {
                         try {
-                            return ItemNameMatcher.matches(
-                                    toJcrPath(entry.getName()), nameGlobs);
+                            return ItemNameMatcher.matches(toJcrPath(entry.getName()), nameGlobs);
                         } catch (InvalidItemStateException e) {
                             return false;
                         }
@@ -671,7 +668,7 @@ public class NodeImpl extends ItemImpl i
         String primaryNtName;
         primaryNtName = hasProperty(Property.JCR_PRIMARY_TYPE)
             ? getProperty(Property.JCR_PRIMARY_TYPE).getString()
-            : "nt:unstructured";
+            : NodeType.NT_UNSTRUCTURED;
 
         return ntMgr.getNodeType(primaryNtName);
     }
@@ -742,8 +739,7 @@ public class NodeImpl extends ItemImpl i
         }
         // TODO: END
 
-        String jcrPrimaryType =
-                sessionDelegate.getOakPathOrThrow(Property.JCR_PRIMARY_TYPE);
+        String jcrPrimaryType = sessionDelegate.getOakPathOrThrow(Property.JCR_PRIMARY_TYPE);
         CoreValue cv = ValueConverter.toCoreValue(nodeTypeName, PropertyType.NAME, sessionDelegate);
         dlg.setProperty(jcrPrimaryType, cv);
     }
@@ -755,13 +751,12 @@ public class NodeImpl extends ItemImpl i
         NodeTypeManager ntm = sessionDelegate.getNodeTypeManager();
         NodeType nt = ntm.getNodeType(mixinName); // throws on not found
 
-        if (nt.isNodeType("mix:referenceable")) {
-            this.setProperty(Property.JCR_UUID, UUID.randomUUID().toString());
+        if (nt.isNodeType(NodeType.MIX_REFERENCEABLE)) {
+            setProperty(Property.JCR_UUID, UUID.randomUUID().toString());
         }
         // TODO: END
 
-        String jcrMixinTypes =
-                sessionDelegate.getOakPathOrThrow(Property.JCR_MIXIN_TYPES);
+        String jcrMixinTypes = sessionDelegate.getOakPathOrThrow(Property.JCR_MIXIN_TYPES);
         PropertyDelegate mixins = dlg.getProperty(jcrMixinTypes);
 
         CoreValue cv = ValueConverter.toCoreValue(mixinName, PropertyType.NAME, sessionDelegate);



Mime
View raw message