jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r293034 [2/2] - in /incubator/jackrabbit/trunk/src: java/org/apache/jackrabbit/ java/org/apache/jackrabbit/core/ java/org/apache/jackrabbit/core/lock/ java/org/apache/jackrabbit/core/nodetype/ java/org/apache/jackrabbit/core/nodetype/virtua...
Date Sat, 01 Oct 2005 22:20:39 GMT
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/QueryFormat.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.query.sql;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.query.AndQueryNode;
 import org.apache.jackrabbit.core.query.DerefQueryNode;
 import org.apache.jackrabbit.core.query.ExactQueryNode;
@@ -152,7 +151,7 @@
 
             if (ntCount == 0) {
                 sb.append(" ");
-                sb.append(Constants.NT_BASE.toJCRName(resolver));
+                sb.append(QName.NT_BASE.toJCRName(resolver));
             }
 
             // append WHERE clause
@@ -284,7 +283,7 @@
         try {
             if (containsDescendantOrSelf(node)) {
                 sb.append("(");
-                sb.append(Constants.JCR_PATH.toJCRName(resolver));
+                sb.append(QName.JCR_PATH.toJCRName(resolver));
                 sb.append(" LIKE '");
                 LocationStepQueryNode[] steps = node.getPathSteps();
                 for (int i = 0; i < steps.length; i++) {
@@ -299,7 +298,7 @@
                 }
                 sb.append('\'');
                 sb.append(" OR ");
-                sb.append(Constants.JCR_PATH.toJCRName(resolver));
+                sb.append(QName.JCR_PATH.toJCRName(resolver));
                 sb.append(" LIKE '");
                 for (int i = 0; i < steps.length; i++) {
                     if (steps[i].getNameTest() == null
@@ -312,7 +311,7 @@
                 }
                 sb.append("')");
             } else if (containsAllChildrenMatch(node)) {
-                sb.append(Constants.JCR_PATH.toJCRName(resolver));
+                sb.append(QName.JCR_PATH.toJCRName(resolver));
                 sb.append(" LIKE '");
                 StringBuffer path = new StringBuffer();
                 LocationStepQueryNode[] steps = node.getPathSteps();
@@ -326,12 +325,12 @@
                 sb.append(path);
                 sb.append('\'');
                 sb.append(" AND NOT ");
-                sb.append(Constants.JCR_PATH.toJCRName(resolver));
+                sb.append(QName.JCR_PATH.toJCRName(resolver));
                 sb.append(" LIKE '");
                 sb.append(path).append("/%").append('\'');
             } else {
                 // just do a best effort
-                sb.append(Constants.JCR_PATH.toJCRName(resolver));
+                sb.append(QName.JCR_PATH.toJCRName(resolver));
                 sb.append(" LIKE '");
                 LocationStepQueryNode[] steps = node.getPathSteps();
                 for (int i = 0; i < steps.length; i++) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/QueryFormat.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.query.xpath;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.query.AndQueryNode;
 import org.apache.jackrabbit.core.query.DerefQueryNode;
 import org.apache.jackrabbit.core.query.ExactQueryNode;
@@ -198,7 +197,7 @@
         StringBuffer sb = (StringBuffer) data;
         try {
             sb.append("@");
-            sb.append(Constants.JCR_PRIMARYTYPE.toJCRName(resolver));
+            sb.append(QName.JCR_PRIMARYTYPE.toJCRName(resolver));
             sb.append("='").append(node.getValue().toJCRName(resolver));
             sb.append("'");
         } catch (NoPrefixDeclaredException e) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.query.xpath;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.SearchManager;
 import org.apache.jackrabbit.core.query.AndQueryNode;
 import org.apache.jackrabbit.core.query.DerefQueryNode;
@@ -91,7 +90,7 @@
     /**
      * QName for jcr:xmltext
      */
-    static final QName JCR_XMLTEXT = new QName(Constants.NS_JCR_URI, "xmltext");
+    static final QName JCR_XMLTEXT = new QName(QName.NS_JCR_URI, "xmltext");
 
     /**
      * QName for last function.
@@ -111,27 +110,27 @@
     /**
      * QName for jcr:like
      */
-    static final QName JCR_LIKE = new QName(Constants.NS_JCR_URI, "like");
+    static final QName JCR_LIKE = new QName(QName.NS_JCR_URI, "like");
 
     /**
      * QName for jcr:deref
      */
-    static final QName JCR_DEREF = new QName(Constants.NS_JCR_URI, "deref");
+    static final QName JCR_DEREF = new QName(QName.NS_JCR_URI, "deref");
 
     /**
      * QName for jcr:contains
      */
-    static final QName JCR_CONTAINS = new QName(Constants.NS_JCR_URI, "contains");
+    static final QName JCR_CONTAINS = new QName(QName.NS_JCR_URI, "contains");
 
     /**
      * QName for jcr:root
      */
-    static final QName JCR_ROOT = new QName(Constants.NS_JCR_URI, "root");
+    static final QName JCR_ROOT = new QName(QName.NS_JCR_URI, "root");
 
     /**
      * QName for jcr:score
      */
-    static final QName JCR_SCORE = new QName(Constants.NS_JCR_URI, "score");
+    static final QName JCR_SCORE = new QName(QName.NS_JCR_URI, "score");
 
     /**
      * String constant for operator 'eq'
@@ -586,7 +585,7 @@
         node.childrenAccept(this, rqn);
 
         // if property name is jcr:primaryType treat special
-        if (Constants.JCR_PRIMARYTYPE.equals(rqn.getProperty())) {
+        if (QName.JCR_PRIMARYTYPE.equals(rqn.getProperty())) {
             if (rqn.getValueType() == RelationQueryNode.TYPE_STRING) {
                 try {
                     QName ntName = QName.fromJCRName(rqn.getStringValue(), resolver);

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.state;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
@@ -500,7 +499,7 @@
                                           NodeTypeRegistry ntReg)
             throws ItemStateException {
 
-        NodeState rootState = createInstance(rootNodeUUID, Constants.REP_ROOT, null);
+        NodeState rootState = createInstance(rootNodeUUID, QName.REP_ROOT, null);
 
         // FIXME need to manually setup root node by creating mandatory jcr:primaryType property
         // @todo delegate setup of root node to NodeTypeInstanceHandler
@@ -511,8 +510,8 @@
         PropDef propDef;
         try {
             nodeDefId = ntReg.getRootNodeDef().getId();
-            EffectiveNodeType ent = ntReg.getEffectiveNodeType(Constants.REP_ROOT);
-            propDef = ent.getApplicablePropertyDef(Constants.JCR_PRIMARYTYPE,
+            EffectiveNodeType ent = ntReg.getEffectiveNodeType(QName.REP_ROOT);
+            propDef = ent.getApplicablePropertyDef(QName.JCR_PRIMARYTYPE,
                     PropertyType.NAME, false);
         } catch (NoSuchNodeTypeException nsnte) {
             String msg = "internal error: failed to create root node";
@@ -529,7 +528,7 @@
         rootState.addPropertyName(propDef.getName());
 
         PropertyState prop = createInstance(propDef.getName(), rootNodeUUID);
-        prop.setValues(new InternalValue[]{InternalValue.create(Constants.REP_ROOT)});
+        prop.setValues(new InternalValue[]{InternalValue.create(QName.REP_ROOT)});
         prop.setType(propDef.getRequiredType());
         prop.setMultiValued(propDef.isMultiple());
         prop.setDefinitionId(propDef.getId());

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.NodeImpl;
 import org.apache.jackrabbit.core.PropertyImpl;
 import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
@@ -42,7 +41,7 @@
  * Implements a <code>InternalFrozenNode</code>
  */
 public class InternalFrozenNodeImpl extends InternalFreezeImpl
-        implements InternalFrozenNode, Constants {
+        implements InternalFrozenNode {
 
     /**
      * checkin mode version.
@@ -108,15 +107,15 @@
 
         for (int i = 0; i < props.length; i++) {
             PropertyState prop = props[i];
-            if (prop.getName().equals(JCR_FROZENUUID)) {
+            if (prop.getName().equals(QName.JCR_FROZENUUID)) {
                 // special property
-                frozenUUID = node.getPropertyValue(JCR_FROZENUUID).internalValue().toString();
-            } else if (prop.getName().equals(JCR_FROZENPRIMARYTYPE)) {
+                frozenUUID = node.getPropertyValue(QName.JCR_FROZENUUID).internalValue().toString();
+            } else if (prop.getName().equals(QName.JCR_FROZENPRIMARYTYPE)) {
                 // special property
-                frozenPrimaryType = (QName) node.getPropertyValue(JCR_FROZENPRIMARYTYPE).internalValue();
-            } else if (prop.getName().equals(JCR_FROZENMIXINTYPES)) {
+                frozenPrimaryType = (QName) node.getPropertyValue(QName.JCR_FROZENPRIMARYTYPE).internalValue();
+            } else if (prop.getName().equals(QName.JCR_FROZENMIXINTYPES)) {
                 // special property
-                InternalValue[] values = node.getPropertyValues(JCR_FROZENMIXINTYPES);
+                InternalValue[] values = node.getPropertyValues(QName.JCR_FROZENMIXINTYPES);
                 if (values == null) {
                     frozenMixinTypes = new QName[0];
                 } else {
@@ -125,9 +124,9 @@
                         frozenMixinTypes[j] = (QName) values[j].internalValue();
                     }
                 }
-            } else if (prop.getName().equals(JCR_PRIMARYTYPE)) {
+            } else if (prop.getName().equals(QName.JCR_PRIMARYTYPE)) {
                 // ignore
-            } else if (prop.getName().equals(JCR_UUID)) {
+            } else if (prop.getName().equals(QName.JCR_UUID)) {
                 // ignore
             } else {
                 propList.add(prop);
@@ -258,21 +257,21 @@
             throws RepositoryException {
 
         // create new node
-        NodeStateEx node = parent.addNode(name, NT_FROZENNODE, null, true);
+        NodeStateEx node = parent.addNode(name, QName.NT_FROZENNODE, null, true);
 
         // initialize the internal properties
-        if (src.isNodeType(MIX_REFERENCEABLE)) {
-            node.setPropertyValue(JCR_FROZENUUID, InternalValue.create(src.getUUID()));
+        if (src.isNodeType(QName.MIX_REFERENCEABLE)) {
+            node.setPropertyValue(QName.JCR_FROZENUUID, InternalValue.create(src.getUUID()));
         }
-        node.setPropertyValue(JCR_FROZENPRIMARYTYPE,
+        node.setPropertyValue(QName.JCR_FROZENPRIMARYTYPE,
                 InternalValue.create(((NodeTypeImpl) src.getPrimaryNodeType()).getQName()));
-        if (src.hasProperty(NodeImpl.JCR_MIXINTYPES)) {
+        if (src.hasProperty(QName.JCR_MIXINTYPES)) {
             NodeType[] mixins = src.getMixinNodeTypes();
             InternalValue[] ivalues = new InternalValue[mixins.length];
             for (int i = 0; i < mixins.length; i++) {
                 ivalues[i] = InternalValue.create(((NodeTypeImpl) mixins[i]).getQName());
             }
-            node.setPropertyValues(JCR_FROZENMIXINTYPES, PropertyType.NAME, ivalues);
+            node.setPropertyValues(QName.JCR_FROZENMIXINTYPES, PropertyType.NAME, ivalues);
         }
 
         // add the properties
@@ -318,10 +317,10 @@
                 case OnParentVersionAction.INITIALIZE:
                     break;
                 case OnParentVersionAction.VERSION:
-                    if (child.isNodeType(MIX_VERSIONABLE)) {
+                    if (child.isNodeType(QName.MIX_VERSIONABLE)) {
                         // create frozen versionable child
-                        NodeStateEx newChild = node.addNode(child.getQName(), NT_VERSIONEDCHILD, null, false);
-                        newChild.setPropertyValue(JCR_CHILDVERSIONHISTORY,
+                        NodeStateEx newChild = node.addNode(child.getQName(), QName.NT_VERSIONEDCHILD, null, false);
+                        newChild.setPropertyValue(QName.JCR_CHILDVERSIONHISTORY,
                                 InternalValue.create(new UUID(child.getVersionHistory().getUUID())));
                         /*
                         newChild.setPropertyValue(JCR_BASEVERSION,

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.name.QName;
 
 import javax.jcr.RepositoryException;
@@ -63,7 +62,7 @@
      * {@inheritDoc}
      */
     public String getVersionHistoryId() {
-        return node.getPropertyValue(Constants.JCR_CHILDVERSIONHISTORY).internalValue().toString();
+        return node.getPropertyValue(QName.JCR_CHILDVERSIONHISTORY).internalValue().toString();
     }
 
     /**
@@ -82,7 +81,7 @@
      * {@inheritDoc}
      */
     public String getBaseVersionId() {
-        return (String) node.getPropertyValue(Constants.JCR_BASEVERSION).internalValue();
+        return (String) node.getPropertyValue(QName.JCR_BASEVERSION).internalValue();
     }
 
     /**

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.NodeImpl;
 import org.apache.jackrabbit.core.state.ItemStateException;
 import org.apache.jackrabbit.core.state.NodeState;
@@ -41,7 +40,7 @@
  * Implements a <code>InternalVersionHistory</code>
  */
 public class InternalVersionHistoryImpl extends InternalVersionItemImpl
-        implements InternalVersionHistory, Constants {
+        implements InternalVersionHistory {
 
     /**
      * default logger
@@ -110,13 +109,13 @@
         historyId = node.getUUID();
 
         // get versionable id
-        versionableId = (String) node.getPropertyValue(JCR_VERSIONABLEUUID).internalValue();
+        versionableId = (String) node.getPropertyValue(QName.JCR_VERSIONABLEUUID).internalValue();
 
         // get entries
         NodeStateEx[] children = node.getChildNodes();
         for (int i = 0; i < children.length; i++) {
             NodeStateEx child = children[i];
-            if (child.getName().equals(JCR_VERSIONLABELS)) {
+            if (child.getName().equals(QName.JCR_VERSIONLABELS)) {
                 labelNode = child;
                 continue;
             }
@@ -377,7 +376,7 @@
             throws RepositoryException {
 
         // copy predecessors from src node
-        Value[] preds = src.getProperty(JCR_PREDECESSORS).getValues();
+        Value[] preds = src.getProperty(QName.JCR_PREDECESSORS).getValues();
         InternalValue[] predecessors = new InternalValue[preds.length];
         for (int i = 0; i < preds.length; i++) {
             String predId = preds[i].getString();
@@ -389,17 +388,17 @@
         }
 
         String versionId = UUID.randomUUID().toString();
-        NodeStateEx vNode = node.addNode(name, NT_VERSION, versionId, true);
+        NodeStateEx vNode = node.addNode(name, QName.NT_VERSION, versionId, true);
 
         // initialize 'created' and 'predecessors'
-        vNode.setPropertyValue(JCR_CREATED, InternalValue.create(Calendar.getInstance()));
-        vNode.setPropertyValues(JCR_PREDECESSORS, PropertyType.REFERENCE, predecessors);
+        vNode.setPropertyValue(QName.JCR_CREATED, InternalValue.create(Calendar.getInstance()));
+        vNode.setPropertyValues(QName.JCR_PREDECESSORS, PropertyType.REFERENCE, predecessors);
 
         // initialize 'empty' successors; their values are dynamically resolved
-        vNode.setPropertyValues(JCR_SUCCESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
+        vNode.setPropertyValues(QName.JCR_SUCCESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
 
         // checkin source node
-        InternalFrozenNodeImpl.checkin(vNode, JCR_FROZENNODE, src);
+        InternalFrozenNodeImpl.checkin(vNode, QName.JCR_FROZENNODE, src);
 
         // update version graph
         InternalVersionImpl version = new InternalVersionImpl(this, vNode, name);
@@ -431,34 +430,34 @@
             throws RepositoryException {
 
         // create history node
-        NodeStateEx pNode = parent.addNode(name, NT_VERSIONHISTORY, historyId, true);
+        NodeStateEx pNode = parent.addNode(name, QName.NT_VERSIONHISTORY, historyId, true);
         created.add(pNode.getUUID());
 
         // set the versionable uuid
-        pNode.setPropertyValue(JCR_VERSIONABLEUUID, InternalValue.create(nodeState.getUUID()));
+        pNode.setPropertyValue(QName.JCR_VERSIONABLEUUID, InternalValue.create(nodeState.getUUID()));
 
         // create label node
-        NodeStateEx lNode = pNode.addNode(JCR_VERSIONLABELS, NT_VERSIONLABELS, null, false);
+        NodeStateEx lNode = pNode.addNode(QName.JCR_VERSIONLABELS, QName.NT_VERSIONLABELS, null, false);
         created.add(lNode.getUUID());
 
         // create root version
         String versionId = UUID.randomUUID().toString();
 
-        NodeStateEx vNode = pNode.addNode(JCR_ROOTVERSION, NT_VERSION, versionId, true);
+        NodeStateEx vNode = pNode.addNode(QName.JCR_ROOTVERSION, QName.NT_VERSION, versionId, true);
         created.add(vNode.getUUID());
 
         // initialize 'created' and 'predecessors'
-        vNode.setPropertyValue(JCR_CREATED, InternalValue.create(Calendar.getInstance()));
-        vNode.setPropertyValues(JCR_PREDECESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
-        vNode.setPropertyValues(JCR_SUCCESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
+        vNode.setPropertyValue(QName.JCR_CREATED, InternalValue.create(Calendar.getInstance()));
+        vNode.setPropertyValues(QName.JCR_PREDECESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
+        vNode.setPropertyValues(QName.JCR_SUCCESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
 
         // add also an empty frozen node to the root version
-        NodeStateEx node = vNode.addNode(JCR_FROZENNODE, NT_FROZENNODE, null, true);
+        NodeStateEx node = vNode.addNode(QName.JCR_FROZENNODE, QName.NT_FROZENNODE, null, true);
         created.add(node.getUUID());
         
         // initialize the internal properties
-        node.setPropertyValue(JCR_FROZENUUID, InternalValue.create(nodeState.getUUID()));
-        node.setPropertyValue(JCR_FROZENPRIMARYTYPE,
+        node.setPropertyValue(QName.JCR_FROZENUUID, InternalValue.create(nodeState.getUUID()));
+        node.setPropertyValue(QName.JCR_FROZENPRIMARYTYPE,
                 InternalValue.create(nodeState.getNodeTypeName()));
 
         Set mixins = nodeState.getMixinTypeNames();
@@ -468,7 +467,7 @@
             for (int i = 0; i < mixins.size(); i++) {
                 ivalues[i] = InternalValue.create((QName) iter.next());
             }
-            node.setPropertyValues(JCR_FROZENMIXINTYPES, PropertyType.NAME, ivalues);
+            node.setPropertyValues(QName.JCR_FROZENMIXINTYPES, PropertyType.NAME, ivalues);
         }
 
         parent.store();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.name.QName;
@@ -33,7 +32,7 @@
  * Implements a <code>InternalVersion</code>
  */
 public class InternalVersionImpl extends InternalVersionItemImpl
-        implements InternalVersion, Constants {
+        implements InternalVersion {
 
     /**
      * the list/cache of predecessors (values == InternalVersion)
@@ -89,11 +88,11 @@
         this.name = name;
 
         // init internal values
-        InternalValue[] values = node.getPropertyValues(JCR_CREATED);
+        InternalValue[] values = node.getPropertyValues(QName.JCR_CREATED);
         if (values != null) {
             created = (Calendar) values[0].internalValue();
         }
-        isRoot = name.equals(JCR_ROOTVERSION);
+        isRoot = name.equals(QName.JCR_ROOTVERSION);
     }
 
     /**
@@ -123,7 +122,7 @@
     public InternalFrozenNode getFrozenNode() {
         // get frozen node
         try {
-            NodeState.ChildNodeEntry entry = node.getState().getChildNodeEntry(JCR_FROZENNODE, 1);
+            NodeState.ChildNodeEntry entry = node.getState().getChildNodeEntry(QName.JCR_FROZENNODE, 1);
             if (entry == null) {
                 throw new InternalError("version has no frozen node: " + getId());
             }
@@ -200,7 +199,7 @@
      * successor list.
      */
     void resolvePredecessors() {
-        InternalValue[] values = node.getPropertyValues(JCR_PREDECESSORS);
+        InternalValue[] values = node.getPropertyValues(QName.JCR_PREDECESSORS);
         if (values != null) {
             for (int i = 0; i < values.length; i++) {
                 InternalVersionImpl v = (InternalVersionImpl) versionHistory.getVersion(values[i].internalValue().toString());
@@ -229,7 +228,7 @@
         for (int i = 0; i < values.length; i++) {
             values[i] = InternalValue.create(new UUID(((InternalVersion) predecessors.get(i)).getId()));
         }
-        node.setPropertyValues(JCR_PREDECESSORS, PropertyType.STRING, values);
+        node.setPropertyValues(QName.JCR_PREDECESSORS, PropertyType.STRING, values);
     }
 
     /**

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/NodeStateEx.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.PropertyImpl;
@@ -45,7 +44,7 @@
 /**
  * This Class provides some basic node operations directly on the node state.
  */
-class NodeStateEx implements Constants {
+class NodeStateEx {
 
     /**
      * the underlying persistent state
@@ -406,7 +405,7 @@
 
         NodeStateEx node = createChildNode(nodeName, nodeTypeName, uuid);
         if (referenceable) {
-            node.setPropertyValue(JCR_UUID, InternalValue.create(node.getUUID()));
+            node.setPropertyValue(QName.JCR_UUID, InternalValue.create(node.getUUID()));
         }
         return node;
     }
@@ -432,7 +431,7 @@
 
         // create Node instance wrapping new node state
         NodeStateEx node = new NodeStateEx(stateMgr, ntReg, state, name);
-        node.setPropertyValue(JCR_PRIMARYTYPE, InternalValue.create(nodeTypeName));
+        node.setPropertyValue(QName.JCR_PRIMARYTYPE, InternalValue.create(nodeTypeName));
 
         // add new child node entryn
         nodeState.addChildNodeEntry(name, state.getUUID());

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java Sat Oct  1 15:18:50 2005
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.core.version;
 
 import org.apache.commons.collections.map.ReferenceMap;
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.state.ItemState;
@@ -40,8 +39,7 @@
 /**
  * This Class implements a virtual item state provider.
  */
-public class VersionItemStateProvider implements VirtualItemStateProvider,
-        Constants {
+public class VersionItemStateProvider implements VirtualItemStateProvider {
 
     /**
      * the default logger
@@ -127,7 +125,7 @@
             // special check for successors
             if (item instanceof PropertyState) {
                 PropertyState prop = (PropertyState) item;
-                if (prop.getName().equals(JCR_SUCCESSORS)) {
+                if (prop.getName().equals(QName.JCR_SUCCESSORS)) {
                     try {
                         InternalVersion v = vMgr.getVersion(prop.getParentUUID());
                         if (v != null) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java Sat Oct  1 15:18:50 2005
@@ -17,7 +17,6 @@
 package org.apache.jackrabbit.core.version;
 
 import org.apache.commons.collections.map.ReferenceMap;
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.NodeImpl;
@@ -63,7 +62,7 @@
 /**
  * This Class implements a VersionManager.
  */
-public class VersionManagerImpl implements VersionManager, Constants {
+public class VersionManagerImpl implements VersionManager {
 
     /**
      * the default logger
@@ -132,15 +131,15 @@
             if (!pMgr.exists(new NodeId(rootUUID))) {
                 NodeState root = pMgr.createNew(new NodeId(rootUUID));
                 root.setParentUUID(rootParentUUID);
-                root.setDefinitionId(ntReg.getEffectiveNodeType(REP_SYSTEM).getApplicableChildNodeDef(
-                        JCR_VERSIONSTORAGE, REP_VERSIONSTORAGE).getId());
-                root.setNodeTypeName(REP_VERSIONSTORAGE);
-                PropertyState pt = pMgr.createNew(new PropertyId(rootUUID, JCR_PRIMARYTYPE));
-                pt.setDefinitionId(ntReg.getEffectiveNodeType(REP_SYSTEM).getApplicablePropertyDef(
-                        JCR_PRIMARYTYPE, PropertyType.NAME, false).getId());
+                root.setDefinitionId(ntReg.getEffectiveNodeType(QName.REP_SYSTEM).getApplicableChildNodeDef(
+                        QName.JCR_VERSIONSTORAGE, QName.REP_VERSIONSTORAGE).getId());
+                root.setNodeTypeName(QName.REP_VERSIONSTORAGE);
+                PropertyState pt = pMgr.createNew(new PropertyId(rootUUID, QName.JCR_PRIMARYTYPE));
+                pt.setDefinitionId(ntReg.getEffectiveNodeType(QName.REP_SYSTEM).getApplicablePropertyDef(
+                        QName.JCR_PRIMARYTYPE, PropertyType.NAME, false).getId());
                 pt.setMultiValued(false);
                 pt.setType(PropertyType.NAME);
-                pt.setValues(new InternalValue[]{InternalValue.create(REP_VERSIONSTORAGE)});
+                pt.setValues(new InternalValue[]{InternalValue.create(QName.REP_VERSIONSTORAGE)});
                 root.addPropertyName(pt.getName());
                 ChangeLog cl = new ChangeLog();
                 cl.added(root);
@@ -150,7 +149,7 @@
             SharedItemStateManager sharedStateMgr = new SharedItemStateManager(pMgr, VERSION_STORAGE_NODE_UUID, ntReg);
             stateMgr = new LocalItemStateManager(sharedStateMgr, null);
             NodeState nodeState = (NodeState) stateMgr.getItemState(new NodeId(VERSION_STORAGE_NODE_UUID));
-            historyRoot = new NodeStateEx(stateMgr, ntReg, nodeState, JCR_VERSIONSTORAGE);
+            historyRoot = new NodeStateEx(stateMgr, ntReg, nodeState, QName.JCR_VERSIONSTORAGE);
 
             // create the virtual item state provider
             versProvider = new VersionItemStateProvider(this, sharedStateMgr);
@@ -246,15 +245,15 @@
             String uuid = node.getUUID();
             NodeStateEx root = historyRoot;
             for (int i = 0; i < 3; i++) {
-                QName name = new QName(NS_DEFAULT_URI, uuid.substring(i * 2, i * 2 + 2));
+                QName name = new QName(QName.NS_DEFAULT_URI, uuid.substring(i * 2, i * 2 + 2));
                 if (!root.hasNode(name)) {
-                    NodeStateEx n = root.addNode(name, REP_VERSIONSTORAGE, null, false);
+                    NodeStateEx n = root.addNode(name, QName.REP_VERSIONSTORAGE, null, false);
                     created.add(n.getUUID());
                     root.store();
                 }
                 root = root.getNode(name, 1);
             }
-            QName historyNodeName = new QName(NS_DEFAULT_URI, uuid);
+            QName historyNodeName = new QName(QName.NS_DEFAULT_URI, uuid);
             if (root.hasNode(historyNodeName)) {
                 // already exists
                 return null;
@@ -296,13 +295,13 @@
         String uuid = node.getUUID();
         NodeStateEx n = historyRoot;
         for (int i = 0; i < 3; i++) {
-            QName name = new QName(NS_DEFAULT_URI, uuid.substring(i * 2, i * 2 + 2));
+            QName name = new QName(QName.NS_DEFAULT_URI, uuid.substring(i * 2, i * 2 + 2));
             if (!n.hasNode(name)) {
                 return null;
             }
             n = n.getNode(name, 1);
         }
-        QName historyNodeName = new QName(NS_DEFAULT_URI, uuid);
+        QName historyNodeName = new QName(QName.NS_DEFAULT_URI, uuid);
         if (!n.hasNode(historyNodeName)) {
             return null;
         }
@@ -382,13 +381,13 @@
                     InternalVersionItem parent =
                             (parentUUID != null) ? getItem(parentUUID) : null;
                     QName ntName = state.getNodeTypeName();
-                    if (ntName.equals(NT_FROZENNODE)) {
+                    if (ntName.equals(QName.NT_FROZENNODE)) {
                         item = new InternalFrozenNodeImpl(this, pNode, parent);
-                    } else if (ntName.equals(NT_VERSIONEDCHILD)) {
+                    } else if (ntName.equals(QName.NT_VERSIONEDCHILD)) {
                         item = new InternalFrozenVHImpl(this, pNode, parent);
-                    } else if (ntName.equals(NT_VERSION)) {
+                    } else if (ntName.equals(QName.NT_VERSION)) {
                         item = ((InternalVersionHistory) parent).getVersion(uuid);
-                    } else if (ntName.equals(NT_VERSIONHISTORY)) {
+                    } else if (ntName.equals(QName.NT_VERSIONHISTORY)) {
                         item = new InternalVersionHistoryImpl(this, pNode);
                     } else {
                         //return null;
@@ -418,7 +417,7 @@
         // need to recalc successor prop
         InternalVersion[] preds = version.getPredecessors();
         for (int i=0; i<preds.length; i++) {
-            ItemState state = (ItemState) items.remove(new PropertyId(preds[i].getId(), JCR_SUCCESSORS));
+            ItemState state = (ItemState) items.remove(new PropertyId(preds[i].getId(), QName.JCR_SUCCESSORS));
             if (state != null) {
                 state.discard();
             }
@@ -446,11 +445,11 @@
         // assuming node is versionable and checkout (check in nodeimpl)
         // To create a new version of a versionable node N, the client calls N.checkin.
         // This causes the following series of events:
-        String histUUID = node.getProperty(Constants.JCR_VERSIONHISTORY).getString();
+        String histUUID = node.getProperty(QName.JCR_VERSIONHISTORY).getString();
         InternalVersionHistoryImpl history = (InternalVersionHistoryImpl) getVersionHistory(histUUID);
 
         // 0. resolve the predecessors
-        Value[] values = node.getProperty(Constants.JCR_PREDECESSORS).getValues();
+        Value[] values = node.getProperty(QName.JCR_PREDECESSORS).getValues();
         InternalVersion[] preds = new InternalVersion[values.length];
         for (int i = 0; i < values.length; i++) {
             preds[i] = history.getVersion(values[i].getString());
@@ -572,7 +571,7 @@
 
         InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl)
                 ((VersionHistoryImpl) history).getInternalVersionHistory();
-        NodeImpl labelNode = ((VersionHistoryImpl) history).getNode(JCR_VERSIONLABELS);
+        NodeImpl labelNode = ((VersionHistoryImpl) history).getNode(QName.JCR_VERSIONLABELS);
 
         try {
             stateMgr.edit();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.virtual;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.ItemId;
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
@@ -45,7 +44,7 @@
  * This Class implements a virtual item state provider, in order to expose the
  * versions to the version storage.
  */
-public abstract class AbstractVISProvider implements VirtualItemStateProvider, Constants {
+public abstract class AbstractVISProvider implements VirtualItemStateProvider {
     /**
      * the default logger
      */
@@ -267,7 +266,7 @@
         } catch (RepositoryException re) {
             // hack, use nt:unstructured as parent
             NodeTypeRegistry ntReg = getNodeTypeRegistry();
-            EffectiveNodeType ent = ntReg.getEffectiveNodeType(NT_UNSTRUCTURED);
+            EffectiveNodeType ent = ntReg.getEffectiveNodeType(QName.NT_UNSTRUCTURED);
             NodeDef cnd = ent.getApplicableChildNodeDef(name, nodeTypeName);
             ntReg.getNodeDef(cnd.getId());
             def = cnd.getId();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.virtual;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.state.ItemState;
 import org.apache.jackrabbit.core.state.NoSuchItemStateException;
 import org.apache.jackrabbit.core.state.NodeState;
@@ -31,7 +30,7 @@
 /**
  * This Class implements a virtual node state
  */
-public class VirtualNodeState extends NodeState implements Constants {
+public class VirtualNodeState extends NodeState {
 
     /**
      * The virtual item state provide that created this node state
@@ -67,7 +66,7 @@
         this.stateMgr = stateMgr;
         addListener(stateMgr);
         // add default properties
-        setPropertyValue(JCR_PRIMARYTYPE, InternalValue.create(nodeTypeName));
+        setPropertyValue(QName.JCR_PRIMARYTYPE, InternalValue.create(nodeTypeName));
         setMixinNodeTypes(mixins);
     }
 
@@ -197,7 +196,7 @@
                 values[i] = InternalValue.create(mixins[i]);
             }
             setMixinTypeNames(set);
-            setPropertyValues(JCR_MIXINTYPES, PropertyType.NAME, values);
+            setPropertyValues(QName.JCR_MIXINTYPES, PropertyType.NAME, values);
         }
     }
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/AbstractSAXEventGenerator.java Sat Oct  1 15:18:50 2005
@@ -17,7 +17,7 @@
 package org.apache.jackrabbit.core.xml;
 
 import org.apache.jackrabbit.BaseException;
-import org.apache.jackrabbit.Constants;
+import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.SessionNamespaceResolver;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.log4j.Logger;
@@ -47,7 +47,7 @@
  * </ul>
  * for every item it encounters.
  */
-abstract class AbstractSAXEventGenerator implements Constants {
+abstract class AbstractSAXEventGenerator {
 
     private static Logger log = Logger.getLogger(AbstractSAXEventGenerator.class);
 
@@ -120,12 +120,12 @@
         // resolve the names of some wellknown properties
         // allowing for session-local prefix mappings
         try {
-            jcrPrimaryType = JCR_PRIMARYTYPE.toJCRName(nsResolver);
-            jcrMixinTypes = JCR_MIXINTYPES.toJCRName(nsResolver);
-            jcrUUID = JCR_UUID.toJCRName(nsResolver);
-            jcrRoot = JCR_ROOT.toJCRName(nsResolver);
-            jcrXMLText = JCR_XMLTEXT.toJCRName(nsResolver);
-            jcrXMLCharacters = JCR_XMLCHARACTERS.toJCRName(nsResolver);
+            jcrPrimaryType = QName.JCR_PRIMARYTYPE.toJCRName(nsResolver);
+            jcrMixinTypes = QName.JCR_MIXINTYPES.toJCRName(nsResolver);
+            jcrUUID = QName.JCR_UUID.toJCRName(nsResolver);
+            jcrRoot = QName.JCR_ROOT.toJCRName(nsResolver);
+            jcrXMLText = QName.JCR_XMLTEXT.toJCRName(nsResolver);
+            jcrXMLCharacters = QName.JCR_XMLCHARACTERS.toJCRName(nsResolver);
         } catch (BaseException e) {
             // should never get here...
             String msg = "internal error: failed to resolve namespace mappings";
@@ -164,7 +164,7 @@
         String[] prefixes = session.getNamespacePrefixes();
         for (int i = 0; i < prefixes.length; i++) {
             String prefix = prefixes[i];
-            if (NS_XML_PREFIX.equals(prefix)) {
+            if (QName.NS_XML_PREFIX.equals(prefix)) {
                 // skip 'xml' prefix as this would be an illegal namespace declaration
                 continue;
             }
@@ -183,7 +183,7 @@
         String[] prefixes = session.getNamespacePrefixes();
         for (int i = 0; i < prefixes.length; i++) {
             String prefix = prefixes[i];
-            if (NS_XML_PREFIX.equals(prefix)) {
+            if (QName.NS_XML_PREFIX.equals(prefix)) {
                 // skip 'xml' prefix as this would be an illegal namespace declaration
                 continue;
             }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java Sat Oct  1 15:18:50 2005
@@ -110,12 +110,12 @@
                 }
 
                 Importer.NodeInfo node =
-                        new Importer.NodeInfo(JCR_XMLTEXT, null, null, null);
+                        new Importer.NodeInfo(QName.JCR_XMLTEXT, null, null, null);
                 Importer.TextValue[] values =
                         new Importer.TextValue[]{textHandler};
                 ArrayList props = new ArrayList();
                 Importer.PropInfo prop =
-                        new Importer.PropInfo(JCR_XMLCHARACTERS,
+                        new Importer.PropInfo(QName.JCR_XMLCHARACTERS,
                                 PropertyType.STRING, values);
                 props.add(prop);
                 // call Importer
@@ -185,7 +185,7 @@
                     propValues[j] = InternalValue.create(strings[j]);
                 }
 */
-                if (propName.equals(JCR_PRIMARYTYPE)) {
+                if (propName.equals(QName.JCR_PRIMARYTYPE)) {
                     // jcr:primaryType
                     if (attrValue.length() > 0) {
                         try {
@@ -195,7 +195,7 @@
                                     + attrValue, be);
                         }
                     }
-                } else if (propName.equals(JCR_MIXINTYPES)) {
+                } else if (propName.equals(QName.JCR_MIXINTYPES)) {
                     // jcr:mixinTypes
                     if (attrValue.length() > 0) {
                         try {
@@ -206,7 +206,7 @@
                                     + attrValue, be);
                         }
                     }
-                } else if (propName.equals(JCR_UUID)) {
+                } else if (propName.equals(QName.JCR_UUID)) {
                     // jcr:uuid
                     if (attrValue.length() > 0) {
                         uuid = attrValue;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/ImportHandler.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/ImportHandler.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/ImportHandler.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/ImportHandler.java Sat Oct  1 15:18:50 2005
@@ -16,9 +16,9 @@
  */
 package org.apache.jackrabbit.core.xml;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.NamespaceRegistryImpl;
 import org.apache.jackrabbit.name.NamespaceResolver;
+import org.apache.jackrabbit.name.QName;
 import org.apache.log4j.Logger;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -218,7 +218,7 @@
         if (!initialized) {
             // the namespace of the first element determines the type of XML
             // (system view/document view)
-            systemViewXML = Constants.NS_SV_URI.equals(namespaceURI);
+            systemViewXML = QName.NS_SV_URI.equals(namespaceURI);
 
             if (systemViewXML) {
                 targetHandler = new SysViewImportHandler(importer, nsContext);
@@ -273,9 +273,6 @@
          * internally we're using " " instead
          */
         private static final String DUMMY_DEFAULT_URI = " ";
-        private static final String DEFAULT_URI = Constants.NS_DEFAULT_URI;
-
-        private static final String EMPTY_PREFIX = "";
 
         NamespaceContext() {
             nsContext = new NamespaceSupport();
@@ -306,7 +303,7 @@
          * {@inheritDoc}
          */
         boolean declarePrefix(String prefix, String uri) {
-            if (DEFAULT_URI.equals(uri)) {
+            if (QName.NS_DEFAULT_URI.equals(uri)) {
                 uri = DUMMY_DEFAULT_URI;
             }
             return nsContext.declarePrefix(prefix, uri);
@@ -321,7 +318,7 @@
             if (uri == null) {
                 throw new NamespaceException("unknown prefix");
             } else if (DUMMY_DEFAULT_URI.equals(uri)) {
-                return DEFAULT_URI;
+                return QName.NS_DEFAULT_URI;
             } else {
                 return uri;
             }
@@ -331,7 +328,7 @@
          * {@inheritDoc}
          */
         public String getPrefix(String uri) throws NamespaceException {
-            if (DEFAULT_URI.equals(uri)) {
+            if (QName.NS_DEFAULT_URI.equals(uri)) {
                 uri = DUMMY_DEFAULT_URI;
             }
             String prefix = nsContext.getPrefix(uri);
@@ -341,8 +338,8 @@
                  * (default) prefix; we have to do a reverse-lookup to check
                  * whether it's the current default namespace
                  */
-                if (uri.equals(nsContext.getURI(EMPTY_PREFIX))) {
-                    return EMPTY_PREFIX;
+                if (uri.equals(nsContext.getURI(QName.NS_EMPTY_PREFIX))) {
+                    return QName.NS_EMPTY_PREFIX;
                 }
                 throw new NamespaceException("unknown uri");
             }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.xml;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.NodeImpl;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
@@ -142,7 +141,7 @@
             node = createNode(parent, nodeInfo.getName(),
                     nodeInfo.getNodeTypeName(), nodeInfo.getMixinNames(), null);
             // remember uuid mapping
-            if (node.isNodeType(Constants.MIX_REFERENCEABLE)) {
+            if (node.isNodeType(QName.MIX_REFERENCEABLE)) {
                 refTracker.mappedUUID(nodeInfo.getUUID(), node.getUUID());
             }
         } else if (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW) {

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java Sat Oct  1 15:18:50 2005
@@ -114,7 +114,7 @@
                              String qName, Attributes atts)
             throws SAXException {
         // check namespace
-        if (!NS_SV_URI.equals(namespaceURI)) {
+        if (!QName.NS_SV_URI.equals(namespaceURI)) {
             throw new SAXException(new InvalidSerializedDataException("invalid namespace for element in system view xml document: "
                     + namespaceURI));
         }
@@ -245,7 +245,7 @@
 
             // check if all system properties (jcr:primaryType, jcr:uuid etc.)
             // have been collected and create node as necessary
-            if (currentPropName.equals(JCR_PRIMARYTYPE)) {
+            if (currentPropName.equals(QName.JCR_PRIMARYTYPE)) {
                 AppendableValue val = (AppendableValue) currentPropValues.get(0);
                 String s = null;
                 try {
@@ -258,7 +258,7 @@
                 } catch (UnknownPrefixException upe) {
                     throw new SAXException(new InvalidSerializedDataException("illegal node type name: " + s, upe));
                 }
-            } else if (currentPropName.equals(JCR_MIXINTYPES)) {
+            } else if (currentPropName.equals(QName.JCR_MIXINTYPES)) {
                 if (state.mixinNames == null) {
                     state.mixinNames = new ArrayList(currentPropValues.size());
                 }
@@ -278,7 +278,7 @@
                         throw new SAXException(new InvalidSerializedDataException("illegal mixin type name: " + s, upe));
                     }
                 }
-            } else if (currentPropName.equals(JCR_UUID)) {
+            } else if (currentPropName.equals(QName.JCR_UUID)) {
                 AppendableValue val = (AppendableValue) currentPropValues.get(0);
                 try {
                     state.uuid = val.retrieve();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java Sat Oct  1 15:18:50 2005
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.core.xml;
 
+import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.value.ValueHelper;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -40,23 +41,23 @@
      */
     public static final String NODE_ELEMENT = "node";
     public static final String PREFIXED_NODE_ELEMENT =
-            NS_SV_PREFIX + ":" + NODE_ELEMENT;
+        QName.NS_SV_PREFIX + ":" + NODE_ELEMENT;
 
     public static final String PROPERTY_ELEMENT = "property";
     public static final String PREFIXED_PROPERTY_ELEMENT =
-            NS_SV_PREFIX + ":" + PROPERTY_ELEMENT;;
+        QName.NS_SV_PREFIX + ":" + PROPERTY_ELEMENT;;
 
     public static final String VALUE_ELEMENT = "value";
     public static final String PREFIXED_VALUE_ELEMENT =
-            NS_SV_PREFIX + ":" + VALUE_ELEMENT;;
+        QName.NS_SV_PREFIX + ":" + VALUE_ELEMENT;;
 
     public static final String NAME_ATTRIBUTE = "name";
     public static final String PREFIXED_NAME_ATTRIBUTE =
-            NS_SV_PREFIX + ":" + NAME_ATTRIBUTE;
+        QName.NS_SV_PREFIX + ":" + NAME_ATTRIBUTE;
 
     public static final String TYPE_ATTRIBUTE = "type";
     public static final String PREFIXED_TYPE_ATTRIBUTE =
-            NS_SV_PREFIX + ":" + TYPE_ATTRIBUTE;
+        QName.NS_SV_PREFIX + ":" + TYPE_ATTRIBUTE;
 
     public static final String CDATA_TYPE = "CDATA";
     public static final String ENUMERATION_TYPE = "ENUMERATION";
@@ -95,10 +96,10 @@
             nodeName = node.getName();
         }
 
-        attrs.addAttribute(NS_SV_URI, NAME_ATTRIBUTE, PREFIXED_NAME_ATTRIBUTE,
+        attrs.addAttribute(QName.NS_SV_URI, NAME_ATTRIBUTE, PREFIXED_NAME_ATTRIBUTE,
                 CDATA_TYPE, nodeName);
         // start node element
-        contentHandler.startElement(NS_SV_URI, NODE_ELEMENT,
+        contentHandler.startElement(QName.NS_SV_URI, NODE_ELEMENT,
                 PREFIXED_NODE_ELEMENT, attrs);
     }
 
@@ -124,7 +125,7 @@
     protected void leaving(Node node, int level)
             throws RepositoryException, SAXException {
         // end node element
-        contentHandler.endElement(NS_SV_URI, NODE_ELEMENT, PREFIXED_NODE_ELEMENT);
+        contentHandler.endElement(QName.NS_SV_URI, NODE_ELEMENT, PREFIXED_NODE_ELEMENT);
     }
 
     /**
@@ -135,7 +136,7 @@
         String propName = prop.getName();
         AttributesImpl attrs = new AttributesImpl();
         // name attribute
-        attrs.addAttribute(NS_SV_URI, NAME_ATTRIBUTE, PREFIXED_NAME_ATTRIBUTE,
+        attrs.addAttribute(QName.NS_SV_URI, NAME_ATTRIBUTE, PREFIXED_NAME_ATTRIBUTE,
                 CDATA_TYPE, propName);
         // type attribute
         int type = prop.getType();
@@ -147,19 +148,19 @@
             throw new RepositoryException("unexpected property-type ordinal: "
                     + type, iae);
         }
-        attrs.addAttribute(NS_SV_URI, TYPE_ATTRIBUTE, PREFIXED_TYPE_ATTRIBUTE,
+        attrs.addAttribute(QName.NS_SV_URI, TYPE_ATTRIBUTE, PREFIXED_TYPE_ATTRIBUTE,
                 ENUMERATION_TYPE, typeName);
 
         // start property element
-        contentHandler.startElement(NS_SV_URI, PROPERTY_ELEMENT,
+        contentHandler.startElement(QName.NS_SV_URI, PROPERTY_ELEMENT,
                 PREFIXED_PROPERTY_ELEMENT, attrs);
 
         // values
         if (prop.getType() == PropertyType.BINARY && skipBinary) {
             // empty value element
-            contentHandler.startElement(NS_SV_URI, VALUE_ELEMENT,
+            contentHandler.startElement(QName.NS_SV_URI, VALUE_ELEMENT,
                     PREFIXED_VALUE_ELEMENT, new AttributesImpl());
-            contentHandler.endElement(NS_SV_URI, VALUE_ELEMENT,
+            contentHandler.endElement(QName.NS_SV_URI, VALUE_ELEMENT,
                     PREFIXED_VALUE_ELEMENT);
         } else {
             boolean multiValued = prop.getDefinition().isMultiple();
@@ -173,7 +174,7 @@
                 Value val = vals[i];
 
                 // start value element
-                contentHandler.startElement(NS_SV_URI, VALUE_ELEMENT,
+                contentHandler.startElement(QName.NS_SV_URI, VALUE_ELEMENT,
                         PREFIXED_VALUE_ELEMENT, new AttributesImpl());
 
                 // characters
@@ -208,7 +209,7 @@
                 }
 
                 // end value element
-                contentHandler.endElement(NS_SV_URI, VALUE_ELEMENT,
+                contentHandler.endElement(QName.NS_SV_URI, VALUE_ELEMENT,
                         PREFIXED_VALUE_ELEMENT);
             }
         }
@@ -219,7 +220,7 @@
      */
     protected void leaving(Property prop, int level)
             throws RepositoryException, SAXException {
-        contentHandler.endElement(NS_SV_URI, PROPERTY_ELEMENT,
+        contentHandler.endElement(QName.NS_SV_URI, PROPERTY_ELEMENT,
                 PREFIXED_PROPERTY_ELEMENT);
     }
 }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.xml;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.log4j.Logger;
 import org.xml.sax.helpers.DefaultHandler;
@@ -34,7 +33,7 @@
  * classes <code>{@link DocViewImportHandler}</code> and
  * <code>{@link SysViewImportHandler}</code>.
  */
-abstract class TargetImportHandler extends DefaultHandler implements Constants {
+abstract class TargetImportHandler extends DefaultHandler {
 
     private static Logger log = Logger.getLogger(TargetImportHandler.class);
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.xml;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.BatchedItemOperations;
 import org.apache.jackrabbit.core.HierarchyManager;
 import org.apache.jackrabbit.core.NodeId;
@@ -61,7 +60,7 @@
 /**
  * <code>WorkspaceImporter</code> ...
  */
-public class WorkspaceImporter implements Importer, Constants {
+public class WorkspaceImporter implements Importer {
 
     private static Logger log = Logger.getLogger(WorkspaceImporter.class);
 
@@ -157,7 +156,7 @@
                     nodeInfo.getNodeTypeName(), nodeInfo.getMixinNames(), null);
             // remember uuid mapping
             EffectiveNodeType ent = itemOps.getEffectiveNodeType(node);
-            if (ent.includesNodeType(MIX_REFERENCEABLE)) {
+            if (ent.includesNodeType(QName.MIX_REFERENCEABLE)) {
                 refTracker.mappedUUID(nodeInfo.getUUID(), node.getUUID());
             }
         } else if (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW) {
@@ -268,7 +267,7 @@
          * todo FIXME delegate to 'node type instance handler'
          */
         EffectiveNodeType ent = itemOps.getEffectiveNodeType(node);
-        if (ent.includesNodeType(MIX_VERSIONABLE)) {
+        if (ent.includesNodeType(QName.MIX_VERSIONABLE)) {
             PropDef def;
             PropertyState prop;
             SessionImpl session = (SessionImpl) wsp.getSession();
@@ -287,37 +286,37 @@
             }
 
             // jcr:versionHistory
-            if (!node.hasPropertyName(JCR_VERSIONHISTORY)) {
-                def = itemOps.findApplicablePropertyDefinition(JCR_VERSIONHISTORY,
+            if (!node.hasPropertyName(QName.JCR_VERSIONHISTORY)) {
+                def = itemOps.findApplicablePropertyDefinition(QName.JCR_VERSIONHISTORY,
                         PropertyType.REFERENCE, false, node);
-                prop = itemOps.createPropertyState(node, JCR_VERSIONHISTORY,
+                prop = itemOps.createPropertyState(node, QName.JCR_VERSIONHISTORY,
                         PropertyType.REFERENCE, def);
                 prop.setValues(new InternalValue[]{InternalValue.create(new UUID(vh.getUUID()))});
             }
 
             // jcr:baseVersion
-            if (!node.hasPropertyName(JCR_BASEVERSION)) {
-                def = itemOps.findApplicablePropertyDefinition(JCR_BASEVERSION,
+            if (!node.hasPropertyName(QName.JCR_BASEVERSION)) {
+                def = itemOps.findApplicablePropertyDefinition(QName.JCR_BASEVERSION,
                         PropertyType.REFERENCE, false, node);
-                prop = itemOps.createPropertyState(node, JCR_BASEVERSION,
+                prop = itemOps.createPropertyState(node, QName.JCR_BASEVERSION,
                         PropertyType.REFERENCE, def);
                 prop.setValues(new InternalValue[]{InternalValue.create(new UUID(vh.getRootVersion().getUUID()))});
             }
 
             // jcr:predecessors
-            if (!node.hasPropertyName(JCR_PREDECESSORS)) {
-                def = itemOps.findApplicablePropertyDefinition(JCR_PREDECESSORS,
+            if (!node.hasPropertyName(QName.JCR_PREDECESSORS)) {
+                def = itemOps.findApplicablePropertyDefinition(QName.JCR_PREDECESSORS,
                         PropertyType.REFERENCE, true, node);
-                prop = itemOps.createPropertyState(node, JCR_PREDECESSORS,
+                prop = itemOps.createPropertyState(node, QName.JCR_PREDECESSORS,
                         PropertyType.REFERENCE, def);
                 prop.setValues(new InternalValue[]{InternalValue.create(new UUID(vh.getRootVersion().getUUID()))});
             }
 
             // jcr:isCheckedOut
-            if (!node.hasPropertyName(JCR_ISCHECKEDOUT)) {
-                def = itemOps.findApplicablePropertyDefinition(JCR_ISCHECKEDOUT,
+            if (!node.hasPropertyName(QName.JCR_ISCHECKEDOUT)) {
+                def = itemOps.findApplicablePropertyDefinition(QName.JCR_ISCHECKEDOUT,
                         PropertyType.BOOLEAN, false, node);
-                prop = itemOps.createPropertyState(node, JCR_ISCHECKEDOUT,
+                prop = itemOps.createPropertyState(node, QName.JCR_ISCHECKEDOUT,
                         PropertyType.BOOLEAN, def);
                 prop.setValues(new InternalValue[]{InternalValue.create(true)});
             }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/Path.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/Path.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/Path.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/Path.java Sat Oct  1 15:18:50 2005
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.name;
 
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.util.Text;
 import org.apache.xerces.util.XMLChar;
 
@@ -1107,7 +1106,7 @@
         static final String LITERAL = "*";
 
         private RootElement() {
-            super(Constants.NS_DEFAULT_URI, "");
+            super(QName.NS_DEFAULT_URI, "");
         }
 
         // PathElement override
@@ -1146,7 +1145,7 @@
         static final String LITERAL = ".";
 
         private CurrentElement() {
-            super(Constants.NS_DEFAULT_URI, LITERAL);
+            super(QName.NS_DEFAULT_URI, LITERAL);
         }
 
         // PathElement override
@@ -1185,7 +1184,7 @@
         static final String LITERAL = "..";
 
         private ParentElement() {
-            super(Constants.NS_DEFAULT_URI, LITERAL);
+            super(QName.NS_DEFAULT_URI, LITERAL);
         }
 
         // PathElement override

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/QName.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/QName.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/QName.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/name/QName.java Sat Oct  1 15:18:50 2005
@@ -70,6 +70,442 @@
  */
 public class QName implements Cloneable, Comparable, Serializable {
 
+    //------------------------------------------< namespace related constants >
+
+    // default namespace (empty uri)
+    public static final String NS_EMPTY_PREFIX = "";
+    public static final String NS_DEFAULT_URI = "";
+
+    // reserved namespace for repository internal node types
+    public static final String NS_REP_PREFIX = "rep";
+    public static final String NS_REP_URI = "internal";
+
+    // reserved namespace for items defined by built-in node types
+    public static final String NS_JCR_PREFIX = "jcr";
+    public static final String NS_JCR_URI = "http://www.jcp.org/jcr/1.0";
+
+    // reserved namespace for built-in primary node types
+    public static final String NS_NT_PREFIX = "nt";
+    public static final String NS_NT_URI = "http://www.jcp.org/jcr/nt/1.0";
+
+    // reserved namespace for built-in mixin node types
+    public static final String NS_MIX_PREFIX = "mix";
+    public static final String NS_MIX_URI = "http://www.jcp.org/jcr/mix/1.0";
+
+    // reserved namespace used in the system view XML serialization format
+    public static final String NS_SV_PREFIX = "sv";
+    public static final String NS_SV_URI = "http://www.jcp.org/jcr/sv/1.0";
+
+    // reserved namespaces that must not be redefined and should not be used
+    public static final String NS_XML_PREFIX = "xml";
+    public static final String NS_XML_URI = "http://www.w3.org/XML/1998/namespace";
+    public static final String NS_XMLNS_PREFIX = "xmlns";
+    public static final String NS_XMLNS_URI = "http://www.w3.org/2000/xmlns/";
+
+    //------------------------------------------< general item name constants >
+
+    /**
+     * Empty name
+     */
+    public static final QName EMPTY = new QName(NS_DEFAULT_URI, "");
+
+    /**
+     * Wildcard name
+     */
+    public static final QName WILDCARD = new QName(NS_DEFAULT_URI, "*");
+
+    /**
+     * jcr:system
+     */
+    public static final QName JCR_SYSTEM = new QName(NS_JCR_URI, "system");
+
+    /**
+     * jcr:nodeTypes
+     */
+    public static final QName JCR_NODETYPES = new QName(NS_JCR_URI, "nodeTypes");
+
+    /**
+     * jcr:uuid
+     */
+    public static final QName JCR_UUID = new QName(NS_JCR_URI, "uuid");
+
+    /**
+     * jcr:primaryType
+     */
+    public static final QName JCR_PRIMARYTYPE = new QName(NS_JCR_URI, "primaryType");
+
+    /**
+     * jcr:mixinTypes
+     */
+    public static final QName JCR_MIXINTYPES = new QName(NS_JCR_URI, "mixinTypes");
+
+    /**
+     * jcr:created
+     */
+    public static final QName JCR_CREATED = new QName(NS_JCR_URI, "created");
+
+    /**
+     * jcr:lastModified
+     */
+    public static final QName JCR_LASTMODIFIED = new QName(NS_JCR_URI, "lastModified");
+
+    /**
+     * jcr:encoding
+     */
+    public static final QName JCR_ENCODING = new QName(NS_JCR_URI, "encoding");
+
+    /**
+     * jcr:mimeType
+     */
+    public static final QName JCR_MIMETYPE = new QName(NS_JCR_URI, "mimeType");
+
+    /**
+     * jcr:data
+     */
+    public static final QName JCR_DATA = new QName(NS_JCR_URI, "data");
+
+    /**
+     * jcr:content
+     */
+    public static final QName JCR_CONTENT = new QName(NS_JCR_URI, "content");
+
+    //--------------------------------------< xml related item name constants >
+
+    /**
+     * jcr:root (dummy name for root node used in XML serialization)
+     */
+    public static final QName JCR_ROOT = new QName(NS_JCR_URI, "root");
+
+    /**
+     * jcr:xmltext
+     */
+    public static final QName JCR_XMLTEXT = new QName(NS_JCR_URI, "xmltext");
+
+    /**
+     * jcr:xmlcharacters
+     */
+    public static final QName JCR_XMLCHARACTERS = new QName(NS_JCR_URI, "xmlcharacters");
+
+    //-----------------------------------------< query related name constants >
+
+    /**
+     * jcr:score
+     */
+    public static final QName JCR_SCORE = new QName(NS_JCR_URI, "score");
+
+    /**
+     * jcr:path
+     */
+    public static final QName JCR_PATH = new QName(NS_JCR_URI, "path");
+
+    /**
+     * jcr:statement
+     */
+    public static final QName JCR_STATEMENT = new QName(NS_JCR_URI, "statement");
+
+    /**
+     * jcr:language
+     */
+    public static final QName JCR_LANGUAGE = new QName(NS_JCR_URI, "language");
+
+    //----------------------------------< locking related item name constants >
+
+    /**
+     * jcr:lockOwner
+     */
+    public static final QName JCR_LOCKOWNER = new QName(NS_JCR_URI, "lockOwner");
+
+    /**
+     * jcr:lockIsDeep
+     */
+    public static final QName JCR_LOCKISDEEP = new QName(NS_JCR_URI, "lockIsDeep");
+
+    //-------------------------------< versioning related item name constants >
+
+    /**
+     * jcr:versionStorage
+     */
+    public static final QName JCR_VERSIONSTORAGE = new QName(NS_JCR_URI, "versionStorage");
+
+    /**
+     * jcr:mergeFailed
+     */
+    public static final QName JCR_MERGEFAILED = new QName(NS_JCR_URI, "mergeFailed");
+
+    /**
+     * jcr:frozenNode
+     */
+    public static final QName JCR_FROZENNODE = new QName(NS_JCR_URI, "frozenNode");
+
+    /**
+     * jcr:frozenUuid
+     */
+    public static final QName JCR_FROZENUUID = new QName(NS_JCR_URI, "frozenUuid");
+
+    /**
+     * jcr:frozenPrimaryType
+     */
+    public static final QName JCR_FROZENPRIMARYTYPE = new QName(NS_JCR_URI, "frozenPrimaryType");
+
+    /**
+     * jcr:frozenMixinTypes
+     */
+    public static final QName JCR_FROZENMIXINTYPES = new QName(NS_JCR_URI, "frozenMixinTypes");
+
+    /**
+     * jcr:predecessors
+     */
+    public static final QName JCR_PREDECESSORS = new QName(NS_JCR_URI, "predecessors");
+
+    /**
+     * jcr:versionLabels
+     */
+    public static final QName JCR_VERSIONLABELS = new QName(NS_JCR_URI, "versionLabels");
+
+    /**
+     * jcr:successors
+     */
+    public static final QName JCR_SUCCESSORS = new QName(NS_JCR_URI, "successors");
+
+    /**
+     * jcr:isCheckedOut
+     */
+    public static final QName JCR_ISCHECKEDOUT = new QName(NS_JCR_URI, "isCheckedOut");
+
+    /**
+     * jcr:versionHistory
+     */
+    public static final QName JCR_VERSIONHISTORY = new QName(NS_JCR_URI, "versionHistory");
+
+    /**
+     * jcr:baseVersion
+     */
+    public static final QName JCR_BASEVERSION = new QName(NS_JCR_URI, "baseVersion");
+
+    /**
+     * jcr:childVersionHistory
+     */
+    public static final QName JCR_CHILDVERSIONHISTORY = new QName(NS_JCR_URI, "childVersionHistory");
+
+    /**
+     * jcr:rootVersion
+     */
+    public static final QName JCR_ROOTVERSION = new QName(NS_JCR_URI, "rootVersion");
+
+    /**
+     * jcr:versionableUuid
+     */
+    public static final QName JCR_VERSIONABLEUUID = new QName(NS_JCR_URI, "versionableUuid");
+
+    //--------------------------------< node type related item name constants >
+
+    /**
+     * jcr:nodeTypeName
+     */
+    public static final QName JCR_NODETYPENAME = new QName(NS_JCR_URI, "nodeTypeName");
+
+    /**
+     * jcr:hasOrderableChildNodes
+     */
+    public static final QName JCR_HASORDERABLECHILDNODES = new QName(NS_JCR_URI, "hasOrderableChildNodes");
+
+    /**
+     * jcr:isMixin
+     */
+    public static final QName JCR_ISMIXIN = new QName(NS_JCR_URI, "isMixin");
+
+    /**
+     * jcr:supertypes
+     */
+    public static final QName JCR_SUPERTYPES = new QName(NS_JCR_URI, "supertypes");
+
+    /**
+     * jcr:propertyDefinition
+     */
+    public static final QName JCR_PROPERTYDEFINITION = new QName(NS_JCR_URI, "propertyDefinition");
+
+    /**
+     * jcr:name
+     */
+    public static final QName JCR_NAME = new QName(NS_JCR_URI, "name");
+
+    /**
+     * jcr:mandatory
+     */
+    public static final QName JCR_MANDATORY = new QName(NS_JCR_URI, "mandatory");
+
+    /**
+     * jcr:protected
+     */
+    public static final QName JCR_PROTECTED = new QName(NS_JCR_URI, "protected");
+
+    /**
+     * jcr:requiredType
+     */
+    public static final QName JCR_REQUIREDTYPE = new QName(NS_JCR_URI, "requiredType");
+
+    /**
+     * jcr:onParentVersion
+     */
+    public static final QName JCR_ONPARENTVERSION = new QName(NS_JCR_URI, "onParentVersion");
+
+    /**
+     * jcr:primaryItemName
+     */
+    public static final QName JCR_PRIMARYITEMNAME = new QName(NS_JCR_URI, "primaryItemName");
+
+    /**
+     * jcr:multiple
+     */
+    public static final QName JCR_MULTIPLE = new QName(NS_JCR_URI, "multiple");
+
+    /**
+     * jcr:valueConstraints
+     */
+    public static final QName JCR_VALUECONSTRAINTS = new QName(NS_JCR_URI, "valueConstraints");
+
+    /**
+     * jcr:defaultValues
+     */
+    public static final QName JCR_DEFAULTVALUES = new QName(NS_JCR_URI, "defaultValues");
+
+    /**
+     * jcr:autoCreated
+     */
+    public static final QName JCR_AUTOCREATED = new QName(NS_JCR_URI, "autoCreated");
+
+    /**
+     * jcr:childNodeDefinition
+     */
+    public static final QName JCR_CHILDNODEDEFINITION = new QName(NS_JCR_URI, "childNodeDefinition");
+
+    /**
+     * jcr:sameNameSiblings
+     */
+    public static final QName JCR_SAMENAMESIBLINGS = new QName(NS_JCR_URI, "sameNameSiblings");
+
+    /**
+     * jcr:defaultPrimaryType
+     */
+    public static final QName JCR_DEFAULTPRIMARYTYPE = new QName(NS_JCR_URI, "defaultPrimaryType");
+
+    /**
+     * jcr:requiredPrimaryTypes
+     */
+    public static final QName JCR_REQUIREDPRIMARYTYPES = new QName(NS_JCR_URI, "requiredPrimaryTypes");
+
+    //---------------------------------------------< node type name constants >
+
+    /**
+     * rep:root
+     */
+    public static final QName REP_ROOT = new QName(NS_REP_URI, "root");
+
+    /**
+     * rep:system
+     */
+    public static final QName REP_SYSTEM = new QName(NS_REP_URI, "system");
+
+    /**
+     * rep:versionStorage
+     */
+    public static final QName REP_VERSIONSTORAGE = new QName(NS_REP_URI, "versionStorage");
+
+    /**
+     * rep:versionStorage
+     */
+    public static final QName REP_NODETYPES = new QName(NS_REP_URI, "nodeTypes");
+
+    /**
+     * nt:unstructured
+     */
+    public static final QName NT_UNSTRUCTURED = new QName(NS_NT_URI, "unstructured");
+
+    /**
+     * nt:base
+     */
+    public static final QName NT_BASE = new QName(NS_NT_URI, "base");
+
+    /**
+     * nt:hierarchyNode
+     */
+    public static final QName NT_HIERARCHYNODE = new QName(NS_NT_URI, "hierarchyNode");
+
+    /**
+     * nt:resource
+     */
+    public static final QName NT_RESOURCE = new QName(NS_NT_URI, "resource");
+
+    /**
+     * nt:file
+     */
+    public static final QName NT_FILE = new QName(NS_NT_URI, "file");
+
+    /**
+     * nt:folder
+     */
+    public static final QName NT_FOLDER = new QName(NS_NT_URI, "folder");
+
+    /**
+     * nt:query
+     */
+    public static final QName NT_QUERY = new QName(NS_NT_URI, "query");
+
+    /**
+     * mix:referenceable
+     */
+    public static final QName MIX_REFERENCEABLE = new QName(NS_MIX_URI, "referenceable");
+
+    /**
+     * mix:referenceable
+     */
+    public static final QName MIX_LOCKABLE = new QName(NS_MIX_URI, "lockable");
+
+    /**
+     * mix:versionable
+     */
+    public static final QName MIX_VERSIONABLE = new QName(NS_MIX_URI, "versionable");
+
+    /**
+     * nt:versionHistory
+     */
+    public static final QName NT_VERSIONHISTORY = new QName(NS_NT_URI, "versionHistory");
+
+    /**
+     * nt:version
+     */
+    public static final QName NT_VERSION = new QName(NS_NT_URI, "version");
+
+    /**
+     * nt:versionLabels
+     */
+    public static final QName NT_VERSIONLABELS = new QName(NS_NT_URI, "versionLabels");
+
+    /**
+     * nt:versionedChild
+     */
+    public static final QName NT_VERSIONEDCHILD = new QName(NS_NT_URI, "versionedChild");
+
+    /**
+     * nt:frozenNode
+     */
+    public static final QName NT_FROZENNODE = new QName(NS_NT_URI, "frozenNode");
+
+    /**
+     * nt:nodeType
+     */
+    public static final QName NT_NODETYPE = new QName(NS_NT_URI, "nodeType");
+
+    /**
+     * nt:propertyDefinition
+     */
+    public static final QName NT_PROPERTYDEFINITION = new QName(NS_NT_URI, "propertyDefinition");
+
+    /**
+     * nt:childNodeDefinition
+     */
+    public static final QName NT_CHILDNODEDEFINITION = new QName(NS_NT_URI, "childNodeDefinition");
+
     /** Serialization UID of this class. */
     static final long serialVersionUID = -2712313010017755368L;
 

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/SimpleNamespaceRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/SimpleNamespaceRegistry.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/SimpleNamespaceRegistry.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/SimpleNamespaceRegistry.java Sat Oct  1 15:18:50 2005
@@ -20,7 +20,7 @@
 
 import javax.jcr.NamespaceRegistry;
 
-import org.apache.jackrabbit.Constants;
+import org.apache.jackrabbit.name.QName;
 
 /**
  * Simple utility implementation of the NamespaceRegistry interface.
@@ -38,11 +38,11 @@
      * Creates a simple namespace registry.
      */
     public SimpleNamespaceRegistry() {
-        registerNamespace(Constants.NS_JCR_PREFIX, Constants.NS_JCR_URI);
-        registerNamespace(Constants.NS_MIX_PREFIX, Constants.NS_MIX_URI);
-        registerNamespace(Constants.NS_NT_PREFIX, Constants.NS_NT_URI);
-        registerNamespace(Constants.NS_REP_PREFIX, Constants.NS_REP_URI);
-        registerNamespace(Constants.NS_EMPTY_PREFIX, Constants.NS_EMPTY_PREFIX);
+        registerNamespace(QName.NS_JCR_PREFIX, QName.NS_JCR_URI);
+        registerNamespace(QName.NS_MIX_PREFIX, QName.NS_MIX_URI);
+        registerNamespace(QName.NS_NT_PREFIX, QName.NS_NT_URI);
+        registerNamespace(QName.NS_REP_PREFIX, QName.NS_REP_URI);
+        registerNamespace(QName.NS_EMPTY_PREFIX, QName.NS_EMPTY_PREFIX);
     }
 
     /** {@inheritDoc} */

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java?rev=293034&r1=293033&r2=293034&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java Sat Oct  1 15:18:50 2005
@@ -18,7 +18,6 @@
 
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
-import org.apache.jackrabbit.Constants;
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
 import org.apache.jackrabbit.core.nodetype.NodeDef;
 import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
@@ -201,8 +200,7 @@
                 10, def.getPropertyDefs().length);
         PropDef[] defs = def.getPropertyDefs();
         assertEquals("itemNodeType wildcard property",
-                new QName(Constants.NS_DEFAULT_URI, "*"),
-                defs[0].getName());
+                QName.WILDCARD, defs[0].getName());
     }
 
     /** Test for the empty item definition. */



Mime
View raw message