jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1556828 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/ oak-core/src/...
Date Thu, 09 Jan 2014 15:13:55 GMT
Author: angela
Date: Thu Jan  9 15:13:54 2014
New Revision: 1556828

URL: http://svn.apache.org/r1556828
Log:
OAK-1206 : Consider renaming internal nodetypes and item names

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceConstants.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceEditor.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/Namespaces.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeConstants.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/RegistrationEditor.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypePredicate.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java
    jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java
    jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NameValidatorProvider.java Thu Jan  9 15:13:54 2014
@@ -16,12 +16,6 @@
  */
 package org.apache.jackrabbit.oak.plugins.name;
 
-import static com.google.common.collect.Sets.newHashSet;
-import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
-import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.NSDATA;
-import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.NSDATA_PREFIXES;
-import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_NAMESPACES;
-
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
 import org.apache.jackrabbit.oak.spi.commit.EditorProvider;
@@ -29,6 +23,12 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.commit.ValidatorProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
+import static com.google.common.collect.Sets.newHashSet;
+import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
+import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_NAMESPACES;
+import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_NSDATA;
+import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_PREFIXES;
+
 /**
  * Validator service that checks that all node and property names as well
  * as any name values are syntactically valid and that any namespace prefixes
@@ -43,8 +43,8 @@ public class NameValidatorProvider exten
         return new NameValidator(newHashSet(after
                 .getChildNode(JCR_SYSTEM)
                 .getChildNode(REP_NAMESPACES)
-                .getChildNode(NSDATA)
-                .getStrings(NSDATA_PREFIXES)));
+                .getChildNode(REP_NSDATA)
+                .getStrings(REP_PREFIXES)));
     }
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceConstants.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceConstants.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceConstants.java Thu Jan  9 15:13:54 2014
@@ -69,14 +69,14 @@ public interface NamespaceConstants {
             NAMESPACE_SV
     ));
 
-    String EMPTY_KEY = "oak:empty";
+    String REP_EMPTY = "rep:empty";
 
     // index nodes for faster lookup
 
-    String NSDATA = "oak:namespaces";
+    String REP_NSDATA = "rep:nsdata";
 
-    String NSDATA_URIS = "oak:uris";
+    String REP_URIS = "rep:uris";
 
-    String NSDATA_PREFIXES = "oak:prefixes";
+    String REP_PREFIXES = "rep:prefixes";
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceEditor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceEditor.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceEditor.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceEditor.java Thu Jan  9 15:13:54 2014
@@ -16,21 +16,10 @@
  */
 package org.apache.jackrabbit.oak.plugins.name;
 
-import static javax.jcr.NamespaceRegistry.PREFIX_JCR;
-import static javax.jcr.NamespaceRegistry.PREFIX_MIX;
-import static javax.jcr.NamespaceRegistry.PREFIX_NT;
-import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
-import static org.apache.jackrabbit.oak.api.Type.STRING;
-import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.NSDATA;
-import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.NSDATA_URIS;
-import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_NAMESPACES;
-import static org.apache.jackrabbit.oak.plugins.name.Namespaces.isValidPrefix;
-import static org.apache.jackrabbit.oak.plugins.name.Namespaces.safeGet;
-
 import java.util.Locale;
 import java.util.Set;
 
+import com.google.common.collect.ImmutableSet;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.core.ImmutableTree;
@@ -39,7 +28,17 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
-import com.google.common.collect.ImmutableSet;
+import static javax.jcr.NamespaceRegistry.PREFIX_JCR;
+import static javax.jcr.NamespaceRegistry.PREFIX_MIX;
+import static javax.jcr.NamespaceRegistry.PREFIX_NT;
+import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
+import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
+import static org.apache.jackrabbit.oak.api.Type.STRING;
+import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_NAMESPACES;
+import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_NSDATA;
+import static org.apache.jackrabbit.oak.plugins.name.NamespaceConstants.REP_URIS;
+import static org.apache.jackrabbit.oak.plugins.name.Namespaces.isValidPrefix;
+import static org.apache.jackrabbit.oak.plugins.name.Namespaces.safeGet;
 
 /**
  * TODO document
@@ -89,8 +88,8 @@ class NamespaceEditor extends DefaultEdi
     }
 
     private static boolean containsValue(NodeState namespaces, String value) {
-        return safeGet(new ImmutableTree(namespaces.getChildNode(NSDATA)),
-                NSDATA_URIS).contains(value);
+        return safeGet(new ImmutableTree(namespaces.getChildNode(REP_NSDATA)),
+                REP_URIS).contains(value);
     }
 
     @Override
@@ -137,7 +136,7 @@ class NamespaceEditor extends DefaultEdi
     @Override
     public Editor childNodeChanged(String name, NodeState before,
             NodeState after) throws CommitFailedException {
-        if (NSDATA.equals(name) && !before.equals(after)) {
+        if (REP_NSDATA.equals(name) && !before.equals(after)) {
             throw modificationNotAllowed(name);
         }
         return null;

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/Namespaces.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/Namespaces.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/Namespaces.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/Namespaces.java Thu Jan  9 15:13:54 2014
@@ -16,23 +16,6 @@
 */
 package org.apache.jackrabbit.oak.plugins.name;
 
-import static com.google.common.base.Preconditions.checkState;
-import static javax.jcr.NamespaceRegistry.NAMESPACE_EMPTY;
-import static javax.jcr.NamespaceRegistry.NAMESPACE_JCR;
-import static javax.jcr.NamespaceRegistry.NAMESPACE_MIX;
-import static javax.jcr.NamespaceRegistry.NAMESPACE_NT;
-import static javax.jcr.NamespaceRegistry.NAMESPACE_XML;
-import static javax.jcr.NamespaceRegistry.PREFIX_EMPTY;
-import static javax.jcr.NamespaceRegistry.PREFIX_JCR;
-import static javax.jcr.NamespaceRegistry.PREFIX_MIX;
-import static javax.jcr.NamespaceRegistry.PREFIX_NT;
-import static javax.jcr.NamespaceRegistry.PREFIX_XML;
-import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
-import static org.apache.jackrabbit.JcrConstants.NT_UNSTRUCTURED;
-import static org.apache.jackrabbit.oak.api.Type.NAME;
-import static org.apache.jackrabbit.oak.api.Type.STRING;
-
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -40,15 +23,31 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
+import com.google.common.collect.Sets;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.core.ImmutableTree;
 import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState;
+import org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.util.Text;
 
-import com.google.common.collect.Sets;
+import static com.google.common.base.Preconditions.checkState;
+import static javax.jcr.NamespaceRegistry.NAMESPACE_EMPTY;
+import static javax.jcr.NamespaceRegistry.NAMESPACE_JCR;
+import static javax.jcr.NamespaceRegistry.NAMESPACE_MIX;
+import static javax.jcr.NamespaceRegistry.NAMESPACE_NT;
+import static javax.jcr.NamespaceRegistry.NAMESPACE_XML;
+import static javax.jcr.NamespaceRegistry.PREFIX_EMPTY;
+import static javax.jcr.NamespaceRegistry.PREFIX_JCR;
+import static javax.jcr.NamespaceRegistry.PREFIX_MIX;
+import static javax.jcr.NamespaceRegistry.PREFIX_NT;
+import static javax.jcr.NamespaceRegistry.PREFIX_XML;
+import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
+import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
+import static org.apache.jackrabbit.oak.api.Type.NAME;
+import static org.apache.jackrabbit.oak.api.Type.STRING;
 
 /**
  * Internal static utility class for managing the persisted namespace registry.
@@ -69,7 +68,7 @@ public class Namespaces implements Names
         checkState(!system.hasChildNode(REP_NAMESPACES));
 
         NodeBuilder namespaces = system.setChildNode(REP_NAMESPACES);
-        namespaces.setProperty(JCR_PRIMARYTYPE, NT_UNSTRUCTURED, NAME);
+        namespaces.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_UNSTRUCTURED, NAME);
 
         // Standard namespace specified by JCR (default one not included)
         namespaces.setProperty(escapePropertyKey(PREFIX_EMPTY), NAMESPACE_EMPTY);
@@ -125,10 +124,10 @@ public class Namespaces implements Names
             }
         }
 
-        NodeBuilder data = namespaces.setChildNode(NSDATA);
-        data.setProperty(JCR_PRIMARYTYPE, NT_UNSTRUCTURED, Type.NAME);
-        data.setProperty(NSDATA_PREFIXES, prefixes, Type.STRINGS);
-        data.setProperty(NSDATA_URIS, uris, Type.STRINGS);
+        NodeBuilder data = namespaces.setChildNode(REP_NSDATA);
+        data.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_UNSTRUCTURED, Type.NAME);
+        data.setProperty(REP_PREFIXES, prefixes, Type.STRINGS);
+        data.setProperty(REP_URIS, uris, Type.STRINGS);
         for (Entry<String, String> e : reverse.entrySet()) {
             data.setProperty(encodeUri(e.getKey()), e.getValue());
         }
@@ -160,12 +159,12 @@ public class Namespaces implements Names
     }
 
     static Set<String> getNamespacePrefixesAsSet(Tree root) {
-        return safeGet(getNamespaceTree(root).getChild(NSDATA), NSDATA_PREFIXES);
+        return safeGet(getNamespaceTree(root).getChild(REP_NSDATA), REP_PREFIXES);
     }
 
     public static String getNamespacePrefix(Tree root, String uri) {
         Tree namespaces = getNamespaceTree(root);
-        PropertyState ps = namespaces.getChild(NSDATA)
+        PropertyState ps = namespaces.getChild(REP_NSDATA)
                 .getProperty(encodeUri(escapePropertyKey(uri)));
         if (ps != null) {
             return ps.getValue(STRING);
@@ -174,7 +173,7 @@ public class Namespaces implements Names
     }
 
     static String[] getNamespaceURIs(Tree root) {
-        Set<String> uris = safeGet(getNamespaceTree(root).getChild(NSDATA), NSDATA_URIS);
+        Set<String> uris = safeGet(getNamespaceTree(root).getChild(REP_NSDATA), REP_URIS);
         return uris.toArray(new String[uris.size()]);
     }
 
@@ -192,7 +191,7 @@ public class Namespaces implements Names
     // utils
 
     /**
-     * Replaces an empty string with the special {@link #EMPTY_KEY} value.
+     * Replaces an empty string with the special {@link #REP_EMPTY} value.
      *
      * @see #unescapePropertyKey(String)
      * @param key property key
@@ -200,21 +199,21 @@ public class Namespaces implements Names
      */
     static String escapePropertyKey(String key) {
         if (key.equals("")) {
-            return EMPTY_KEY;
+            return REP_EMPTY;
         } else {
             return key;
         }
     }
 
     /**
-     * Converts the special {@link #EMPTY_KEY} value back to an empty string.
+     * Converts the special {@link #REP_EMPTY} value back to an empty string.
      *
      * @see #escapePropertyKey(String)
      * @param key property key
      * @return escaped property key
      */
     static String unescapePropertyKey(String key) {
-        if (key.equals(EMPTY_KEY)) {
+        if (key.equals(REP_EMPTY)) {
             return "";
         } else {
             return key;
@@ -267,7 +266,7 @@ public class Namespaces implements Names
     public static Tree setupTestNamespaces(Map<String, String> global) {
         NodeBuilder root = EmptyNodeState.EMPTY_NODE.builder();
         NodeBuilder namespaces = root.child(JCR_SYSTEM).child(REP_NAMESPACES);
-        namespaces.setProperty(JCR_PRIMARYTYPE, NT_UNSTRUCTURED, NAME);
+        namespaces.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_UNSTRUCTURED, NAME);
         for (Entry<String, String> entry : global.entrySet()) {
             namespaces.setProperty(escapePropertyKey(entry.getKey()),
                     entry.getValue());

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveType.java Thu Jan  9 15:13:54 2014
@@ -44,13 +44,13 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.api.Type.UNDEFINED;
 import static org.apache.jackrabbit.oak.api.Type.UNDEFINEDS;
 import static org.apache.jackrabbit.oak.commons.PathUtils.dropIndexFromName;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MANDATORY_CHILD_NODES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MANDATORY_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_SUPERTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MANDATORY_CHILD_NODES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MANDATORY_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
 
 class EffectiveType {
 
@@ -76,7 +76,7 @@ class EffectiveType {
     boolean isNodeType(String name) {
         for (NodeState type : types) {
             if (name.equals(type.getName(JCR_NODETYPENAME))
-                    || contains(type.getNames(OAK_SUPERTYPES), name)) {
+                    || contains(type.getNames(REP_SUPERTYPES), name)) {
                 return true;
             }
         }
@@ -84,21 +84,21 @@ class EffectiveType {
     }
 
     boolean isMandatoryProperty(String name) {
-        return nameSetContains(OAK_MANDATORY_PROPERTIES, name);
+        return nameSetContains(REP_MANDATORY_PROPERTIES, name);
     }
 
     @Nonnull
     Set<String> getMandatoryProperties() {
-        return getNameSet(OAK_MANDATORY_PROPERTIES);
+        return getNameSet(REP_MANDATORY_PROPERTIES);
     }
 
     boolean isMandatoryChildNode(String name) {
-        return nameSetContains(OAK_MANDATORY_CHILD_NODES, name);
+        return nameSetContains(REP_MANDATORY_CHILD_NODES, name);
     }
 
     @Nonnull
     Set<String> getMandatoryChildNodes() {
-        return getNameSet(OAK_MANDATORY_CHILD_NODES);
+        return getNameSet(REP_MANDATORY_CHILD_NODES);
     }
 
     /**
@@ -114,11 +114,11 @@ class EffectiveType {
 
         String escapedName;
         if (JCR_PRIMARYTYPE.equals(propertyName)) {
-            escapedName = "oak:primaryType";
+            escapedName = NodeTypeConstants.REP_PRIMARY_TYPE;
         } else if (JCR_MIXINTYPES.equals(propertyName)) {
-            escapedName = "oak:mixinTypes";
+            escapedName = NodeTypeConstants.REP_MIXIN_TYPES;
         } else if (JCR_UUID.equals(propertyName)) {
-            escapedName = "oak:uuid";
+            escapedName = NodeTypeConstants.REP_UUID;
         } else {
             escapedName = propertyName;
         }
@@ -134,7 +134,7 @@ class EffectiveType {
         // Find matching named property definition
         for (NodeState type : types) {
             NodeState definitions = type
-                    .getChildNode(OAK_NAMED_PROPERTY_DEFINITIONS)
+                    .getChildNode(REP_NAMED_PROPERTY_DEFINITIONS)
                     .getChildNode(escapedName);
 
             NodeState definition = definitions.getChildNode(definedType);
@@ -164,7 +164,7 @@ class EffectiveType {
         // Find matching residual property definition
         for (NodeState type : types) {
             NodeState residual =
-                    type.getChildNode(OAK_RESIDUAL_PROPERTY_DEFINITIONS);
+                    type.getChildNode(REP_RESIDUAL_PROPERTY_DEFINITIONS);
             NodeState definition = residual.getChildNode(definedType);
             if (!definition.exists()) {
                 definition = residual.getChildNode(undefinedType);
@@ -194,7 +194,7 @@ class EffectiveType {
         // Find matching named child node definition
         for (NodeState type : types) {
             NodeState definitions = type
-                    .getChildNode(OAK_NAMED_CHILD_NODE_DEFINITIONS)
+                    .getChildNode(REP_NAMED_CHILD_NODE_DEFINITIONS)
                     .getChildNode(name);
 
             for (String typeName : typeNames) {
@@ -221,7 +221,7 @@ class EffectiveType {
         // Find matching residual child node definition
         for (NodeState type : types) {
             NodeState residual =
-                    type.getChildNode(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS);
+                    type.getChildNode(REP_RESIDUAL_CHILD_NODE_DEFINITIONS);
             for (String typeName : typeNames) {
                 NodeState definition = residual.getChildNode(typeName);
                 if (definition.exists() && snsMatch(sns, definition)) {
@@ -246,10 +246,10 @@ class EffectiveType {
 
         for (NodeState type : types) {
             NodeState named = type
-                    .getChildNode(OAK_NAMED_CHILD_NODE_DEFINITIONS)
+                    .getChildNode(REP_NAMED_CHILD_NODE_DEFINITIONS)
                     .getChildNode(name);
             NodeState residual = type
-                    .getChildNode(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS);
+                    .getChildNode(REP_RESIDUAL_CHILD_NODE_DEFINITIONS);
 
             for (ChildNodeEntry entry : concat(
                     named.getChildNodeEntries(),
@@ -269,7 +269,7 @@ class EffectiveType {
         Set<String> names = newHashSet();
         for (NodeState type : types) {
             names.add(type.getName(JCR_NODETYPENAME));
-            addAll(names, type.getNames(OAK_SUPERTYPES));
+            addAll(names, type.getNames(REP_SUPERTYPES));
         }
         return names;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeConstants.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeConstants.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeConstants.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeConstants.java Thu Jan  9 15:13:54 2014
@@ -42,13 +42,13 @@ public interface NodeTypeConstants exten
      * @since oak 1.0
      */
     String NT_REP_UNSTRUCTURED = "rep:Unstructured";
-    String NT_OAK_NODE_TYPE = "oak:NodeType";
-    String NT_OAK_NAMED_PROPERTY_DEFINITIONS = "oak:NamedPropertyDefinitions";
-    String NT_OAK_PROPERTY_DEFINITIONS = "oak:PropertyDefinitions";
-    String NT_OAK_PROPERTY_DEFINITION = "oak:PropertyDefinition";
-    String NT_OAK_NAMED_CHILD_NODE_DEFINITIONS = "oak:NamedChildNodeDefinitions";
-    String NT_OAK_CHILD_NODE_DEFINITIONS = "oak:ChildNodeDefinitions";
-    String NT_OAK_CHILD_NODE_DEFINITION = "oak:ChildNodeDefinition";
+    String NT_REP_NODE_TYPE = "rep:NodeType";
+    String NT_REP_NAMED_PROPERTY_DEFINITIONS = "rep:NamedPropertyDefinitions";
+    String NT_REP_PROPERTY_DEFINITIONS = "rep:PropertyDefinitions";
+    String NT_REP_PROPERTY_DEFINITION = "rep:PropertyDefinition";
+    String NT_REP_NAMED_CHILD_NODE_DEFINITIONS = "rep:NamedChildNodeDefinitions";
+    String NT_REP_CHILD_NODE_DEFINITIONS = "rep:ChildNodeDefinitions";
+    String NT_REP_CHILD_NODE_DEFINITION = "rep:ChildNodeDefinition";
 
     /**
      * Additional name constants not present in JcrConstants
@@ -67,27 +67,23 @@ public interface NodeTypeConstants exten
     String RESIDUAL_NAME = "*";
 
     // Pre-compiled Oak type information fields
-    String OAK_SUPERTYPES = "oak:supertypes";
-    String OAK_PRIMARY_SUBTYPES = "oak:primarySubtypes";
-    String OAK_MIXIN_SUBTYPES = "oak:mixinSubtypes";
-    String OAK_MANDATORY_PROPERTIES = "oak:mandatoryProperties";
-    String OAK_MANDATORY_CHILD_NODES = "oak:mandatoryChildNodes";
-    String OAK_PROTECTED_PROPERTIES = "oak:protectedProperties";
-    String OAK_PROTECTED_CHILD_NODES = "oak:protectedChildNodes";
-    String OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES = "oak:hasProtectedResidualProperties";
-    String OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES = "oak:hasProtectedResidualChildNodes";
-    String OAK_NAMED_SINGLE_VALUED_PROPERTIES = "oak:namedSingleValuedProperties";
-    String OAK_RESIDUAL_CHILD_NODE_DEFINITIONS = "oak:residualChildNodeDefinitions";
-    String OAK_NAMED_CHILD_NODE_DEFINITIONS = "oak:namedChildNodeDefinitions";
-    String OAK_RESIDUAL_PROPERTY_DEFINITIONS = "oak:residualPropertyDefinitions";
-    String OAK_NAMED_PROPERTY_DEFINITIONS = "oak:namedPropertyDefinitions";
-    String OAK_PROPERTY_DEFINITIONS = "oak:propertyDefinitions";
-    String OAK_PROPERTY_DEFINITION = "oak:propertyDefinition";
-    String OAK_CHILD_NODE_DEFINITIONS = "oak:childNodeDefinitions";
-    String OAK_CHILD_NODE_DEFINITION = "oak:childNodeDefinition";
-    String OAK_DECLARING_NODE_TYPE = "oak:declaringNodeType";
-    String OAK_PRIMARY_TYPE = "oak:primaryType";
-    String OAK_MIXIN_TYPES = "oak:mixinTypes";
-    String OAK_UUID = "oak:uuid";
+    String REP_SUPERTYPES = "rep:supertypes";
+    String REP_PRIMARY_SUBTYPES = "rep:primarySubtypes";
+    String REP_MIXIN_SUBTYPES = "rep:mixinSubtypes";
+    String REP_MANDATORY_PROPERTIES = "rep:mandatoryProperties";
+    String REP_MANDATORY_CHILD_NODES = "rep:mandatoryChildNodes";
+    String REP_PROTECTED_PROPERTIES = "rep:protectedProperties";
+    String REP_PROTECTED_CHILD_NODES = "rep:protectedChildNodes";
+    String REP_HAS_PROTECTED_RESIDUAL_PROPERTIES = "rep:hasProtectedResidualProperties";
+    String REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES = "rep:hasProtectedResidualChildNodes";
+    String REP_NAMED_SINGLE_VALUED_PROPERTIES = "rep:namedSingleValuedProperties";
+    String REP_RESIDUAL_CHILD_NODE_DEFINITIONS = "rep:residualChildNodeDefinitions";
+    String REP_NAMED_CHILD_NODE_DEFINITIONS = "rep:namedChildNodeDefinitions";
+    String REP_RESIDUAL_PROPERTY_DEFINITIONS = "rep:residualPropertyDefinitions";
+    String REP_NAMED_PROPERTY_DEFINITIONS = "rep:namedPropertyDefinitions";
+    String REP_DECLARING_NODE_TYPE = "rep:declaringNodeType";
+    String REP_PRIMARY_TYPE = "rep:primaryType";
+    String REP_MIXIN_TYPES = "rep:mixinTypes";
+    String REP_UUID = "rep:uuid";
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/NodeTypeImpl.java Thu Jan  9 15:13:54 2014
@@ -72,14 +72,14 @@ import static org.apache.jackrabbit.JcrC
 import static org.apache.jackrabbit.JcrConstants.JCR_UUID;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_IS_ABSTRACT;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_IS_QUERYABLE;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_DECLARING_NODE_TYPE;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MIXIN_TYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PRIMARY_TYPE;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_UUID;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_DECLARING_NODE_TYPE;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MIXIN_TYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PRIMARY_TYPE;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_UUID;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.RESIDUAL_NAME;
 
 /**
@@ -518,31 +518,31 @@ class NodeTypeImpl extends AbstractTypeD
     List<PropertyDefinition> getDeclaredNamedPropertyDefinitions(String oakName) {
         String escapedName = oakName;
         if (JCR_PRIMARYTYPE.equals(oakName)) {
-            escapedName = OAK_PRIMARY_TYPE;
+            escapedName = REP_PRIMARY_TYPE;
         } else if (JCR_MIXINTYPES.equals(oakName)) {
-            escapedName = OAK_MIXIN_TYPES;
+            escapedName = REP_MIXIN_TYPES;
         } else if (JCR_UUID.equals(oakName)) {
-            escapedName = OAK_UUID;
+            escapedName = REP_UUID;
         }
         return getDeclaredPropertyDefs(definition
-                .getChild(OAK_NAMED_PROPERTY_DEFINITIONS)
+                .getChild(REP_NAMED_PROPERTY_DEFINITIONS)
                 .getChild(escapedName));
     }
 
     List<PropertyDefinition> getDeclaredResidualPropertyDefinitions() {
         return getDeclaredPropertyDefs(definition
-                .getChild(OAK_RESIDUAL_PROPERTY_DEFINITIONS));
+                .getChild(REP_RESIDUAL_PROPERTY_DEFINITIONS));
     }
 
     List<NodeDefinition> getDeclaredNamedNodeDefinitions(String oakName) {
         return getDeclaredNodeDefs(definition
-                .getChild(OAK_NAMED_CHILD_NODE_DEFINITIONS)
+                .getChild(REP_NAMED_CHILD_NODE_DEFINITIONS)
                 .getChild(oakName));
     }
 
     List<NodeDefinition> getDeclaredResidualNodeDefinitions() {
         return getDeclaredNodeDefs(definition
-                .getChild(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS));
+                .getChild(REP_RESIDUAL_CHILD_NODE_DEFINITIONS));
     }
 
     private List<PropertyDefinition> getDeclaredPropertyDefs(Tree definitions) {
@@ -551,7 +551,7 @@ class NodeTypeImpl extends AbstractTypeD
             String typeName = getOakName();
             for (Tree def : definitions.getChildren()) {
                 String declaringTypeName =
-                        TreeUtil.getName(def, OAK_DECLARING_NODE_TYPE);
+                        TreeUtil.getName(def, REP_DECLARING_NODE_TYPE);
                 if (typeName.equals(declaringTypeName)) {
                     list.add(new PropertyDefinitionImpl(def, this, mapper));
                 }
@@ -568,7 +568,7 @@ class NodeTypeImpl extends AbstractTypeD
             String typeName = getOakName();
             for (Tree def : defs.getChildren()) {
                 String declaringTypeName =
-                        TreeUtil.getName(def, OAK_DECLARING_NODE_TYPE);
+                        TreeUtil.getName(def, REP_DECLARING_NODE_TYPE);
                 if (typeName.equals(declaringTypeName)) {
                     list.add(new NodeDefinitionImpl(def, this, mapper));
                 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/ReadOnlyNodeTypeManager.java Thu Jan  9 15:13:54 2014
@@ -23,7 +23,7 @@ import static org.apache.jackrabbit.JcrC
 import static org.apache.jackrabbit.oak.api.Type.STRING;
 import static org.apache.jackrabbit.oak.commons.PathUtils.dropIndexFromName;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NODE_TYPES_PATH;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_SUPERTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
 
 import java.util.List;
 
@@ -314,7 +314,7 @@ public abstract class ReadOnlyNodeTypeMa
             return false;
         }
 
-        PropertyState supertypes = type.getProperty(OAK_SUPERTYPES);
+        PropertyState supertypes = type.getProperty(REP_SUPERTYPES);
         return supertypes != null
                 && contains(supertypes.getValue(Type.NAMES), superName);
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/RegistrationEditor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/RegistrationEditor.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/RegistrationEditor.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/RegistrationEditor.java Thu Jan  9 15:13:54 2014
@@ -57,33 +57,29 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.api.Type.NAMES;
 import static org.apache.jackrabbit.oak.api.Type.STRING;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_NODE_TYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_CHILD_NODE_DEFINITION;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_DECLARING_NODE_TYPE;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MANDATORY_CHILD_NODES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MANDATORY_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MIXIN_SUBTYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MIXIN_TYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_SINGLE_VALUED_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PRIMARY_SUBTYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PRIMARY_TYPE;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PROPERTY_DEFINITION;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PROTECTED_CHILD_NODES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PROTECTED_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_SUPERTYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_UUID;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_DECLARING_NODE_TYPE;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_HAS_PROTECTED_RESIDUAL_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MANDATORY_CHILD_NODES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MANDATORY_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MIXIN_SUBTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MIXIN_TYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_SINGLE_VALUED_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PRIMARY_SUBTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PRIMARY_TYPE;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PROTECTED_CHILD_NODES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PROTECTED_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_UUID;
 
 /**
  * Editor that validates the consistency of the in-content node type registry
  * under {@code /jcr:system/jcr:nodeTypes} and maintains the access-optimized
- * versions of node type information as defined in {@code oak:NodeType}.
+ * versions of node type information as defined in {@code rep:NodeType}.
  *
  * <ul>
  *     <li>validate new definitions</li>
@@ -120,9 +116,9 @@ class RegistrationEditor extends Default
      */
     private void mergeSupertypes(NodeBuilder types, NodeBuilder type)
             throws CommitFailedException {
-        if (!type.hasProperty(OAK_SUPERTYPES)) {
+        if (!type.hasProperty(REP_SUPERTYPES)) {
             List<String> empty = Collections.emptyList();
-            type.setProperty(OAK_SUPERTYPES, empty, NAMES);
+            type.setProperty(REP_SUPERTYPES, empty, NAMES);
 
             // - jcr:supertypes (NAME) protected multiple
             PropertyState supertypes = type.getProperty(JCR_SUPERTYPES);
@@ -141,7 +137,7 @@ class RegistrationEditor extends Default
             }
 
             if (!getBoolean(type, JCR_ISMIXIN)
-                    && !contains(getNames(type, OAK_SUPERTYPES), NT_BASE)
+                    && !contains(getNames(type, REP_SUPERTYPES), NT_BASE)
                     && !NT_BASE.equals(type.getProperty(JCR_NODETYPENAME).getValue(NAME))) {
                 if (types.hasChildNode(NT_BASE)) {
                     NodeBuilder supertype = types.child(NT_BASE);
@@ -173,23 +169,23 @@ class RegistrationEditor extends Default
     private void mergeSupertype(NodeBuilder type, NodeState supertype) {
         String supername =
                 supertype.getProperty(JCR_NODETYPENAME).getValue(NAME);
-        addNameToList(type, OAK_SUPERTYPES, supername);
-        mergeNameList(type, supertype, OAK_SUPERTYPES);
-        mergeNameList(type, supertype, OAK_MANDATORY_PROPERTIES);
-        mergeNameList(type, supertype, OAK_MANDATORY_CHILD_NODES);
-        mergeNameList(type, supertype, OAK_PROTECTED_PROPERTIES);
-        mergeNameList(type, supertype, OAK_PROTECTED_CHILD_NODES);
-        if (supertype.getBoolean(OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES)) {
-            type.setProperty(OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES, true);
-        }
-        if (supertype.getBoolean(OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES)) {
-            type.setProperty(OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES, true);
-        }
-        mergeNameList(type, supertype, OAK_NAMED_SINGLE_VALUED_PROPERTIES);
-        mergeSubtree(type, supertype, OAK_NAMED_PROPERTY_DEFINITIONS, 2);
-        mergeSubtree(type, supertype, OAK_RESIDUAL_PROPERTY_DEFINITIONS, 1);
-        mergeSubtree(type, supertype, OAK_NAMED_CHILD_NODE_DEFINITIONS, 2);
-        mergeSubtree(type, supertype, OAK_RESIDUAL_CHILD_NODE_DEFINITIONS, 1);
+        addNameToList(type, REP_SUPERTYPES, supername);
+        mergeNameList(type, supertype, REP_SUPERTYPES);
+        mergeNameList(type, supertype, REP_MANDATORY_PROPERTIES);
+        mergeNameList(type, supertype, REP_MANDATORY_CHILD_NODES);
+        mergeNameList(type, supertype, REP_PROTECTED_PROPERTIES);
+        mergeNameList(type, supertype, REP_PROTECTED_CHILD_NODES);
+        if (supertype.getBoolean(REP_HAS_PROTECTED_RESIDUAL_PROPERTIES)) {
+            type.setProperty(REP_HAS_PROTECTED_RESIDUAL_PROPERTIES, true);
+        }
+        if (supertype.getBoolean(REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES)) {
+            type.setProperty(REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES, true);
+        }
+        mergeNameList(type, supertype, REP_NAMED_SINGLE_VALUED_PROPERTIES);
+        mergeSubtree(type, supertype, REP_NAMED_PROPERTY_DEFINITIONS, 2);
+        mergeSubtree(type, supertype, REP_RESIDUAL_PROPERTY_DEFINITIONS, 1);
+        mergeSubtree(type, supertype, REP_NAMED_CHILD_NODE_DEFINITIONS, 2);
+        mergeSubtree(type, supertype, REP_RESIDUAL_CHILD_NODE_DEFINITIONS, 1);
     }
 
     private void mergeNameList(
@@ -235,22 +231,22 @@ class RegistrationEditor extends Default
                     "Unexpected " + JCR_NODETYPENAME + " in type " + name);
         }
 
-        // Prepare the type node pre-compilation of the oak:NodeType info
+        // Prepare the type node pre-compilation of the rep:NodeType info
         Iterable<String> empty = emptyList();
-        type.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_NODE_TYPE, NAME);
-        type.removeProperty(OAK_SUPERTYPES);
-        type.setProperty(OAK_PRIMARY_SUBTYPES, empty, NAMES);
-        type.setProperty(OAK_MANDATORY_PROPERTIES, empty, NAMES);
-        type.setProperty(OAK_MANDATORY_CHILD_NODES, empty, NAMES);
-        type.setProperty(OAK_PROTECTED_PROPERTIES, empty, NAMES);
-        type.setProperty(OAK_PROTECTED_CHILD_NODES, empty, NAMES);
-        type.setProperty(OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES, false, BOOLEAN);
-        type.setProperty(OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES, false, BOOLEAN);
-        type.setProperty(OAK_NAMED_SINGLE_VALUED_PROPERTIES, empty, NAMES);
-        type.getChildNode(OAK_NAMED_PROPERTY_DEFINITIONS).remove();
-        type.getChildNode(OAK_RESIDUAL_PROPERTY_DEFINITIONS).remove();
-        type.getChildNode(OAK_NAMED_CHILD_NODE_DEFINITIONS).remove();
-        type.getChildNode(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS).remove();
+        type.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_NODE_TYPE, NAME);
+        type.removeProperty(REP_SUPERTYPES);
+        type.setProperty(REP_PRIMARY_SUBTYPES, empty, NAMES);
+        type.setProperty(REP_MANDATORY_PROPERTIES, empty, NAMES);
+        type.setProperty(REP_MANDATORY_CHILD_NODES, empty, NAMES);
+        type.setProperty(REP_PROTECTED_PROPERTIES, empty, NAMES);
+        type.setProperty(REP_PROTECTED_CHILD_NODES, empty, NAMES);
+        type.setProperty(REP_HAS_PROTECTED_RESIDUAL_PROPERTIES, false, BOOLEAN);
+        type.setProperty(REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES, false, BOOLEAN);
+        type.setProperty(REP_NAMED_SINGLE_VALUED_PROPERTIES, empty, NAMES);
+        type.getChildNode(REP_NAMED_PROPERTY_DEFINITIONS).remove();
+        type.getChildNode(REP_RESIDUAL_PROPERTY_DEFINITIONS).remove();
+        type.getChildNode(REP_NAMED_CHILD_NODE_DEFINITIONS).remove();
+        type.getChildNode(REP_RESIDUAL_CHILD_NODE_DEFINITIONS).remove();
 
         // + jcr:propertyDefinition (nt:propertyDefinition)
         //   = nt:propertyDefinition protected sns
@@ -286,35 +282,35 @@ class RegistrationEditor extends Default
             propertyName = name.getValue(NAME);
             String escapedName = propertyName;
             if (JCR_PRIMARYTYPE.equals(escapedName)) {
-                escapedName = OAK_PRIMARY_TYPE;
+                escapedName = REP_PRIMARY_TYPE;
             } else if (JCR_MIXINTYPES.equals(escapedName)) {
-                escapedName = OAK_MIXIN_TYPES;
+                escapedName = REP_MIXIN_TYPES;
             } else if (JCR_UUID.equals(escapedName)) {
-                escapedName = OAK_UUID;
+                escapedName = REP_UUID;
             }
-            definitions = type.child(OAK_NAMED_PROPERTY_DEFINITIONS);
+            definitions = type.child(REP_NAMED_PROPERTY_DEFINITIONS);
             definitions.setProperty(
-                    JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_NAMED_PROPERTY_DEFINITIONS, NAME);
+                    JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_NAMED_PROPERTY_DEFINITIONS, NAME);
             definitions = definitions.child(escapedName);
 
             // - jcr:mandatory (BOOLEAN) protected mandatory
             if (definition.getBoolean(JCR_MANDATORY)) {
-                addNameToList(type, OAK_MANDATORY_PROPERTIES, propertyName);
+                addNameToList(type, REP_MANDATORY_PROPERTIES, propertyName);
             }
             // - jcr:protected (BOOLEAN) protected mandatory
             if (definition.getBoolean(JCR_PROTECTED)) {
-                addNameToList(type, OAK_PROTECTED_PROPERTIES, propertyName);
+                addNameToList(type, REP_PROTECTED_PROPERTIES, propertyName);
             }
         } else {
-            definitions = type.child(OAK_RESIDUAL_PROPERTY_DEFINITIONS);
+            definitions = type.child(REP_RESIDUAL_PROPERTY_DEFINITIONS);
 
             // - jcr:protected (BOOLEAN) protected mandatory
             if (definition.getBoolean(JCR_PROTECTED)) {
-                type.setProperty(OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES, true);
+                type.setProperty(REP_HAS_PROTECTED_RESIDUAL_PROPERTIES, true);
             }
         }
         definitions.setProperty(
-                JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_PROPERTY_DEFINITIONS, NAME);
+                JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_PROPERTY_DEFINITIONS, NAME);
 
         // - jcr:requiredType (STRING) protected mandatory
         // < 'STRING', 'URI', 'BINARY', 'LONG', 'DOUBLE',
@@ -334,12 +330,12 @@ class RegistrationEditor extends Default
                 key = key + "S";
             }
         } else if (propertyName != null) {
-            addNameToList(type, OAK_NAMED_SINGLE_VALUED_PROPERTIES, propertyName);
+            addNameToList(type, REP_NAMED_SINGLE_VALUED_PROPERTIES, propertyName);
         }
 
         definitions.setChildNode(key, definition)
-            .setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_PROPERTY_DEFINITION, NAME)
-            .setProperty(OAK_DECLARING_NODE_TYPE, typeName, NAME);
+            .setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_PROPERTY_DEFINITION, NAME)
+            .setProperty(REP_DECLARING_NODE_TYPE, typeName, NAME);
     }
 
     private void validateAndCompileChildNodeDefinition(
@@ -350,28 +346,28 @@ class RegistrationEditor extends Default
         NodeBuilder definitions;
         if (name != null) {
             String childNodeName = name.getValue(NAME);
-            definitions = type.child(OAK_NAMED_CHILD_NODE_DEFINITIONS);
-            definitions.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_NAMED_CHILD_NODE_DEFINITIONS, NAME);
+            definitions = type.child(REP_NAMED_CHILD_NODE_DEFINITIONS);
+            definitions.setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_NAMED_CHILD_NODE_DEFINITIONS, NAME);
             definitions = definitions.child(childNodeName);
 
             // - jcr:mandatory (BOOLEAN) protected mandatory
             if (definition.getBoolean(JCR_MANDATORY)) {
-                addNameToList(type, OAK_MANDATORY_CHILD_NODES, childNodeName);
+                addNameToList(type, REP_MANDATORY_CHILD_NODES, childNodeName);
             }
             // - jcr:protected (BOOLEAN) protected mandatory
             if (definition.getBoolean(JCR_PROTECTED)) {
-                addNameToList(type, OAK_PROTECTED_CHILD_NODES, childNodeName);
+                addNameToList(type, REP_PROTECTED_CHILD_NODES, childNodeName);
             }
         } else {
-            definitions = type.child(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS);
+            definitions = type.child(REP_RESIDUAL_CHILD_NODE_DEFINITIONS);
 
             // - jcr:protected (BOOLEAN) protected mandatory
             if (definition.getBoolean(JCR_PROTECTED)) {
-                type.setProperty(OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES, true);
+                type.setProperty(REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES, true);
             }
         }
         definitions.setProperty(
-                JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_CHILD_NODE_DEFINITIONS, NAME);
+                JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_CHILD_NODE_DEFINITIONS, NAME);
 
         // - jcr:requiredPrimaryTypes (NAME)
         //   = 'nt:base' protected mandatory multiple
@@ -385,8 +381,8 @@ class RegistrationEditor extends Default
                             "Unknown required primary type " + key);
                 } else if (!definitions.hasChildNode(key)) {
                     definitions.setChildNode(key, definition)
-                        .setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_OAK_CHILD_NODE_DEFINITION, NAME)
-                        .setProperty(OAK_DECLARING_NODE_TYPE, typeName, NAME);
+                        .setProperty(JCR_PRIMARYTYPE, NodeTypeConstants.NT_REP_CHILD_NODE_DEFINITION, NAME)
+                        .setProperty(REP_DECLARING_NODE_TYPE, typeName, NAME);
                 }
             }
         }
@@ -407,11 +403,11 @@ class RegistrationEditor extends Default
             }
             for (String name : types.getChildNodeNames()) {
                 NodeBuilder type = types.child(name);
-                String listName = OAK_PRIMARY_SUBTYPES;
+                String listName = REP_PRIMARY_SUBTYPES;
                 if (type.getBoolean(JCR_ISMIXIN)) {
-                    listName = OAK_MIXIN_SUBTYPES;
+                    listName = REP_MIXIN_SUBTYPES;
                 }
-                for (String supername : getNames(type, OAK_SUPERTYPES)) {
+                for (String supername : getNames(type, REP_SUPERTYPES)) {
                     addNameToList(types.child(supername), listName, name);
                 }
             }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypePredicate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypePredicate.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypePredicate.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypePredicate.java Thu Jan  9 15:13:54 2014
@@ -16,6 +16,14 @@
  */
 package org.apache.jackrabbit.oak.plugins.nodetype;
 
+import java.util.Arrays;
+import java.util.Set;
+import javax.annotation.Nonnull;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import org.apache.jackrabbit.oak.spi.state.NodeState;
+
 import static com.google.common.base.Preconditions.checkNotNull;
 import static com.google.common.base.Predicates.in;
 import static com.google.common.collect.Iterables.any;
@@ -26,17 +34,8 @@ import static org.apache.jackrabbit.JcrC
 import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
 import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_NODE_TYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MIXIN_SUBTYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PRIMARY_SUBTYPES;
-
-import java.util.Arrays;
-import java.util.Set;
-
-import javax.annotation.Nonnull;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import org.apache.jackrabbit.oak.spi.state.NodeState;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MIXIN_SUBTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PRIMARY_SUBTYPES;
 
 /**
  * Inheritance-aware node type predicate for {@link NodeState node states}.
@@ -106,7 +105,7 @@ public class TypePredicate implements Pr
     private void addNodeType(NodeState types, String name) {
         NodeState type = types.getChildNode(name);
 
-        for (String primary : type.getNames(OAK_PRIMARY_SUBTYPES)) {
+        for (String primary : type.getNames(REP_PRIMARY_SUBTYPES)) {
             primaryTypes = add(primaryTypes, primary);
         }
 
@@ -115,7 +114,7 @@ public class TypePredicate implements Pr
 
             // Only mixin types can have mixin descendants, so we
             // only fill the mixinTypes set in this branch of code.
-            for (String mixin : type.getNames(OAK_MIXIN_SUBTYPES)) {
+            for (String mixin : type.getNames(REP_MIXIN_SUBTYPES)) {
                 mixinTypes = add(mixinTypes, mixin);
             }
         } else {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java Thu Jan  9 15:13:54 2014
@@ -27,10 +27,10 @@ import static org.apache.jackrabbit.JcrC
 import static org.apache.jackrabbit.JcrConstants.NT_BASE;
 import static org.apache.jackrabbit.oak.api.Type.NAME;
 import static org.apache.jackrabbit.oak.api.Type.NAMES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MIXIN_SUBTYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_SINGLE_VALUED_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PRIMARY_SUBTYPES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_SUPERTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_MIXIN_SUBTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_SINGLE_VALUED_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PRIMARY_SUBTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
 
 import java.util.ArrayList;
 import java.util.Set;
@@ -115,12 +115,12 @@ public class SelectorImpl extends Source
         this.matchesAllTypes = NT_BASE.equals(nodeTypeName);
 
         if (!this.matchesAllTypes) {
-            this.supertypes = newHashSet(nodeType.getNames(OAK_SUPERTYPES));
+            this.supertypes = newHashSet(nodeType.getNames(REP_SUPERTYPES));
             supertypes.add(nodeTypeName);
 
             this.primaryTypes = newHashSet(nodeType
-                    .getNames(OAK_PRIMARY_SUBTYPES));
-            this.mixinTypes = newHashSet(nodeType.getNames(OAK_MIXIN_SUBTYPES));
+                    .getNames(REP_PRIMARY_SUBTYPES));
+            this.mixinTypes = newHashSet(nodeType.getNames(REP_MIXIN_SUBTYPES));
             if (nodeType.getBoolean(JCR_ISMIXIN)) {
                 mixinTypes.add(nodeTypeName);
             } else {
@@ -169,7 +169,7 @@ public class SelectorImpl extends Source
     }
 
     public Iterable<String> getWildcardColumns() {
-        return nodeType.getNames(OAK_NAMED_SINGLE_VALUED_PROPERTIES);
+        return nodeType.getNames(REP_NAMED_SINGLE_VALUED_PROPERTIES);
     }
 
     @Override

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/TreeUtil.java Thu Jan  9 15:13:54 2014
@@ -40,9 +40,9 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_CREATEDBY;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_IS_ABSTRACT;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_LASTMODIFIEDBY;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_CHILD_NODE_DEFINITIONS;
 
 import java.util.Calendar;
 import java.util.List;
@@ -212,11 +212,11 @@ public final class TreeUtil {
         List<String> mixins = Lists.newArrayList();
         String primary = getName(tree, JCR_PRIMARYTYPE);
         if (primary != null
-                && Iterables.contains(getNames(type, NodeTypeConstants.OAK_PRIMARY_SUBTYPES), primary)) {
+                && Iterables.contains(getNames(type, NodeTypeConstants.REP_PRIMARY_SUBTYPES), primary)) {
             return;
         }
 
-        Set<String> subMixins = Sets.newHashSet(getNames(type, NodeTypeConstants.OAK_MIXIN_SUBTYPES));
+        Set<String> subMixins = Sets.newHashSet(getNames(type, NodeTypeConstants.REP_MIXIN_SUBTYPES));
         for (String mixin : getNames(tree, NodeTypeConstants.JCR_MIXINTYPES)) {
             if (mixinName.equals(mixin) || subMixins.contains(mixin)) {
                 return;
@@ -232,14 +232,14 @@ public final class TreeUtil {
 
     public static void autoCreateItems(Tree tree, Tree type, Tree typeRoot, String userID)
             throws RepositoryException {
-        // TODO: use a separate oak:autoCreatePropertyDefinitions
-        Tree properties = type.getChild(OAK_NAMED_PROPERTY_DEFINITIONS);
+        // TODO: use a separate rep:autoCreatePropertyDefinitions
+        Tree properties = type.getChild(REP_NAMED_PROPERTY_DEFINITIONS);
         for (Tree definitions : properties.getChildren()) {
             String name = definitions.getName();
-            if (name.equals("oak:primaryType")
-                    || name.equals("oak:mixinTypes")) {
+            if (name.equals(NodeTypeConstants.REP_PRIMARY_TYPE)
+                    || name.equals(NodeTypeConstants.REP_MIXIN_TYPES)) {
                 continue;
-            } else if (name.equals("oak:uuid")) {
+            } else if (name.equals(NodeTypeConstants.REP_UUID)) {
                 name = JCR_UUID;
             }
             for (Tree definition : definitions.getChildren()) {
@@ -260,11 +260,11 @@ public final class TreeUtil {
             }
         }
 
-        // TODO: use a separate oak:autoCreateChildNodeDefinitions
+        // TODO: use a separate rep:autoCreateChildNodeDefinitions
         // Note that we use only named, non-SNS child node definitions
         // as there can be no reasonable default values for residual or
         // SNS child nodes
-        Tree childNodes = type.getChild(OAK_NAMED_CHILD_NODE_DEFINITIONS);
+        Tree childNodes = type.getChild(REP_NAMED_CHILD_NODE_DEFINITIONS);
         for (Tree definitions : childNodes.getChildren()) {
             String name = definitions.getName();
             for (Tree definition : definitions.getChildren()) {
@@ -336,7 +336,7 @@ public final class TreeUtil {
         // first look for named node definitions
         for (Tree type : types) {
             Tree definitions = type
-                    .getChild(OAK_NAMED_CHILD_NODE_DEFINITIONS)
+                    .getChild(REP_NAMED_CHILD_NODE_DEFINITIONS)
                     .getChild(name);
             String defaultName = findDefaultPrimaryType(definitions, sns);
             if (defaultName != null) {
@@ -347,7 +347,7 @@ public final class TreeUtil {
         // then check residual definitions
         for (Tree type : types) {
             Tree definitions = type
-                    .getChild(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS);
+                    .getChild(REP_RESIDUAL_CHILD_NODE_DEFINITIONS);
             String defaultName = findDefaultPrimaryType(definitions, sns);
             if (defaultName != null) {
                 return defaultName;

Modified: jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/nodetype/write/builtin_nodetypes.cnd Thu Jan  9 15:13:54 2014
@@ -439,39 +439,39 @@
 /**
  * @since oak 1.0
  */
-[oak:NodeType] > nt:nodeType
-  - oak:supertypes (NAME) protected multiple autocreated
-  - oak:primarySubtypes (NAME) protected multiple autocreated
-  - oak:mixinSubtypes (NAME) protected multiple autocreated
-  - oak:mandatoryProperties (NAME) protected multiple autocreated
-  - oak:mandatoryChildNodes (NAME) protected multiple autocreated
-  - oak:protectedProperties (NAME) protected multiple autocreated
-  - oak:protectedChildNodes (NAME) protected multiple autocreated
-  - oak:hasProtectedResidualProperties (BOOLEAN) protected autocreated
-  - oak:hasProtectedResidualChildNodes (BOOLEAN) protected autocreated
-  - oak:namedSingleValuedProperties (NAME) protected multiple autocreated
-  + oak:namedPropertyDefinitions (oak:NamedPropertyDefinitions) = oak:NamedPropertyDefinitions protected mandatory
-  + oak:residualPropertyDefinitions (oak:PropertyDefinitions) = oak:PropertyDefinitions protected mandatory
-  + oak:namedChildNodeDefinitions (oak:NamedChildNodeDefinitions) = oak:NamedChildNodeDefinitions protected mandatory
-  + oak:residualChildNodeDefinitions (oak:ChildNodeDefinitions) = oak:ChildNodeDefinitions protected mandatory
-
-[oak:NamedPropertyDefinitions]
-  + * (oak:PropertyDefinitions) = oak:PropertyDefinitions protected
-
-[oak:PropertyDefinitions]
-  + * (oak:PropertyDefinition) = oak:PropertyDefinition protected
-
-[oak:PropertyDefinition] > nt:propertyDefinition
-  - oak:declaringNodeType (NAME) protected mandatory
+[rep:NodeType] > nt:nodeType
+  - rep:supertypes (NAME) protected multiple autocreated
+  - rep:primarySubtypes (NAME) protected multiple autocreated
+  - rep:mixinSubtypes (NAME) protected multiple autocreated
+  - rep:mandatoryProperties (NAME) protected multiple autocreated
+  - rep:mandatoryChildNodes (NAME) protected multiple autocreated
+  - rep:protectedProperties (NAME) protected multiple autocreated
+  - rep:protectedChildNodes (NAME) protected multiple autocreated
+  - rep:hasProtectedResidualProperties (BOOLEAN) protected autocreated
+  - rep:hasProtectedResidualChildNodes (BOOLEAN) protected autocreated
+  - rep:namedSingleValuedProperties (NAME) protected multiple autocreated
+  + rep:namedPropertyDefinitions (rep:NamedPropertyDefinitions) = rep:NamedPropertyDefinitions protected mandatory
+  + rep:residualPropertyDefinitions (rep:PropertyDefinitions) = rep:PropertyDefinitions protected mandatory
+  + rep:namedChildNodeDefinitions (rep:NamedChildNodeDefinitions) = rep:NamedChildNodeDefinitions protected mandatory
+  + rep:residualChildNodeDefinitions (rep:ChildNodeDefinitions) = rep:ChildNodeDefinitions protected mandatory
+
+[rep:NamedPropertyDefinitions]
+  + * (rep:PropertyDefinitions) = rep:PropertyDefinitions protected
+
+[rep:PropertyDefinitions]
+  + * (rep:PropertyDefinition) = rep:PropertyDefinition protected
+
+[rep:PropertyDefinition] > nt:propertyDefinition
+  - rep:declaringNodeType (NAME) protected mandatory
 
-[oak:NamedChildNodeDefinitions]
-  + * (oak:ChildNodeDefinitions) = oak:ChildNodeDefinitions protected
+[rep:NamedChildNodeDefinitions]
+  + * (rep:ChildNodeDefinitions) = rep:ChildNodeDefinitions protected
 
-[oak:ChildNodeDefinitions]
-  + * (oak:ChildNodeDefinition) = oak:ChildNodeDefinition protected
+[rep:ChildNodeDefinitions]
+  + * (rep:ChildNodeDefinition) = rep:ChildNodeDefinition protected
 
-[oak:ChildNodeDefinition] > nt:childNodeDefinition
-  - oak:declaringNodeType (NAME) protected mandatory
+[rep:ChildNodeDefinition] > nt:childNodeDefinition
+  - rep:declaringNodeType (NAME) protected mandatory
 
 /**
  * This node type used to store a property definition within a node type definition,

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java Thu Jan  9 15:13:54 2014
@@ -41,6 +41,7 @@ import org.apache.jackrabbit.oak.api.Typ
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
+import org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants;
 import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
 import org.apache.jackrabbit.oak.util.TreeUtil;
 
@@ -73,15 +74,15 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.commons.PathUtils.dropIndexFromName;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_IS_ABSTRACT;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.NODE_TYPES_PATH;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_NAMED_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PROTECTED_CHILD_NODES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_PROTECTED_PROPERTIES;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_CHILD_NODE_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_RESIDUAL_PROPERTY_DEFINITIONS;
-import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_SUPERTYPES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_HAS_PROTECTED_RESIDUAL_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_NAMED_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PROTECTED_CHILD_NODES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_PROTECTED_PROPERTIES;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_CHILD_NODE_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_RESIDUAL_PROPERTY_DEFINITIONS;
+import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.REP_SUPERTYPES;
 import static org.apache.jackrabbit.oak.util.TreeUtil.getBoolean;
 import static org.apache.jackrabbit.oak.util.TreeUtil.getNames;
 
@@ -153,11 +154,11 @@ public class NodeDelegate extends ItemDe
 
         boolean protectedResidual = false;
         for (Tree type : types) {
-            if (contains(TreeUtil.getNames(type, OAK_PROTECTED_CHILD_NODES), name)) {
+            if (contains(TreeUtil.getNames(type, REP_PROTECTED_CHILD_NODES), name)) {
                 return true;
             } else if (!protectedResidual) {
                 protectedResidual = TreeUtil.getBoolean(
-                        type, OAK_HAS_PROTECTED_RESIDUAL_CHILD_NODES);
+                        type, REP_HAS_PROTECTED_RESIDUAL_CHILD_NODES);
             }
         }
 
@@ -168,12 +169,12 @@ public class NodeDelegate extends ItemDe
             Set<String> typeNames = newHashSet();
             for (Tree type : TreeUtil.getEffectiveType(tree, typeRoot)) {
                 typeNames.add(TreeUtil.getName(type, JCR_NODETYPENAME));
-                addAll(typeNames, TreeUtil.getNames(type, OAK_SUPERTYPES));
+                addAll(typeNames, TreeUtil.getNames(type, REP_SUPERTYPES));
             }
 
             for (Tree type : types) {
                 Tree definitions =
-                        type.getChild(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS);
+                        type.getChild(REP_RESIDUAL_CHILD_NODE_DEFINITIONS);
                 for (String typeName : typeNames) {
                     Tree definition = definitions.getChild(typeName);
                     if ((!sns || TreeUtil.getBoolean(definition, JCR_SAMENAMESIBLINGS))
@@ -194,11 +195,11 @@ public class NodeDelegate extends ItemDe
 
         boolean protectedResidual = false;
         for (Tree type : types) {
-            if (contains(TreeUtil.getNames(type, OAK_PROTECTED_PROPERTIES), property)) {
+            if (contains(TreeUtil.getNames(type, REP_PROTECTED_PROPERTIES), property)) {
                 return true;
             } else if (!protectedResidual) {
                 protectedResidual = TreeUtil.getBoolean(
-                        type, OAK_HAS_PROTECTED_RESIDUAL_PROPERTIES);
+                        type, REP_HAS_PROTECTED_RESIDUAL_PROPERTIES);
             }
         }
 
@@ -207,7 +208,7 @@ public class NodeDelegate extends ItemDe
         // there's a matching, protected one.
         if (protectedResidual) {
             for (Tree type : types) {
-                Tree definitions = type.getChild(OAK_RESIDUAL_PROPERTY_DEFINITIONS);
+                Tree definitions = type.getChild(REP_RESIDUAL_PROPERTY_DEFINITIONS);
                 for (Tree definition : definitions.getChildren()) {
                     // TODO: check for matching property type?
                     if (TreeUtil.getBoolean(definition, JCR_PROTECTED)) {
@@ -434,7 +435,7 @@ public class NodeDelegate extends ItemDe
             Set<String> typeNames = newLinkedHashSet();
             for (Tree type : getNodeTypes(child, typeRoot)) {
                 typeNames.add(TreeUtil.getName(type, JCR_NODETYPENAME));
-                addAll(typeNames, getNames(type, OAK_SUPERTYPES));
+                addAll(typeNames, getNames(type, REP_SUPERTYPES));
             }
 
             Tree oldDefinition = findMatchingChildNodeDefinition(
@@ -536,7 +537,7 @@ public class NodeDelegate extends ItemDe
             return true;
         } else if (primaryName != null) {
             Tree type = typeRoot.getChild(primaryName);
-            if (contains(getNames(type, OAK_SUPERTYPES), typeName)) {
+            if (contains(getNames(type, REP_SUPERTYPES), typeName)) {
                 return true;
             }
         }
@@ -546,7 +547,7 @@ public class NodeDelegate extends ItemDe
                 return true;
             } else {
                 Tree type = typeRoot.getChild(mixinName);
-                if (contains(getNames(type, OAK_SUPERTYPES), typeName)) {
+                if (contains(getNames(type, REP_SUPERTYPES), typeName)) {
                     return true;
                 }
             }
@@ -561,11 +562,11 @@ public class NodeDelegate extends ItemDe
         // Escape the property name for looking up a matching definition
         String escapedName;
         if (JCR_PRIMARYTYPE.equals(propertyName)) {
-            escapedName = "oak:primaryType";
+            escapedName = NodeTypeConstants.REP_PRIMARY_TYPE;
         } else if (JCR_MIXINTYPES.equals(propertyName)) {
-            escapedName = "oak:mixinTypes";
+            escapedName = NodeTypeConstants.REP_MIXIN_TYPES;
         } else if (JCR_UUID.equals(propertyName)) {
-            escapedName = "oak:uuid";
+            escapedName = NodeTypeConstants.REP_UUID;
         } else {
             escapedName = propertyName;
         }
@@ -580,7 +581,7 @@ public class NodeDelegate extends ItemDe
         Tree fuzzyMatch = null;
         for (Tree type : types) {
             Tree definitions = type
-                    .getChild(OAK_NAMED_PROPERTY_DEFINITIONS)
+                    .getChild(REP_NAMED_PROPERTY_DEFINITIONS)
                     .getChild(escapedName);
             Tree definition = definitions.getChild(definedType);
             if (definition.exists()) {
@@ -603,7 +604,7 @@ public class NodeDelegate extends ItemDe
 
         // Then look through any residual property definitions
         for (Tree type : types) {
-            Tree definitions = type.getChild(OAK_RESIDUAL_PROPERTY_DEFINITIONS);
+            Tree definitions = type.getChild(REP_RESIDUAL_PROPERTY_DEFINITIONS);
             Tree definition = definitions.getChild(definedType);
             if (definition.exists()) {
                 return definition;
@@ -630,7 +631,7 @@ public class NodeDelegate extends ItemDe
         // First look for a matching named property definition
         for (Tree type : types) {
             Tree definitions = type
-                    .getChild(OAK_NAMED_CHILD_NODE_DEFINITIONS)
+                    .getChild(REP_NAMED_CHILD_NODE_DEFINITIONS)
                     .getChild(childNodeName);
             for (String typeName : typeNames) {
                 Tree definition = definitions.getChild(typeName);
@@ -643,7 +644,7 @@ public class NodeDelegate extends ItemDe
         // Then look through any residual property definitions
         for (Tree type : types) {
             Tree definitions = type
-                    .getChild(OAK_RESIDUAL_CHILD_NODE_DEFINITIONS);
+                    .getChild(REP_RESIDUAL_CHILD_NODE_DEFINITIONS);
             for (String typeName : typeNames) {
                 Tree definition = definitions.getChild(typeName);
                 if (definition.exists()) {

Modified: jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java?rev=1556828&r1=1556827&r2=1556828&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java (original)
+++ jackrabbit/oak/trunk/oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/RepositoryUpgrade.java Thu Jan  9 15:13:54 2014
@@ -163,13 +163,13 @@ public class RepositoryUpgrade {
             "nt:versionHistory",
             "nt:versionLabels",
             "nt:versionedChild",
-            "oak:ChildNodeDefinition",
-            "oak:ChildNodeDefinitions",
-            "oak:NamedChildNodeDefinitions",
-            "oak:NamedPropertyDefinitions",
-            "oak:NodeType",
-            "oak:PropertyDefinition",
-            "oak:PropertyDefinitions",
+            "rep:ChildNodeDefinition",
+            "rep:ChildNodeDefinitions",
+            "rep:NamedChildNodeDefinitions",
+            "rep:NamedPropertyDefinitions",
+            "rep:NodeType",
+            "rep:PropertyDefinition",
+            "rep:PropertyDefinitions",
             "oak:QueryIndexDefinition",
             "oak:Unstructured",
             "rep:ACE",



Mime
View raw message