jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r827966 [4/15] - in /jackrabbit/sandbox/JCR-1456: ./ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/management/ jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/...
Date Wed, 21 Oct 2009 11:38:44 GMT
Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java?rev=827966&r1=827965&r2=827966&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/EffectiveNodeType.java Wed Oct 21 11:38:31 2009
@@ -19,6 +19,10 @@
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QValueConstraint;
+import org.apache.jackrabbit.spi.QItemDefinition;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
+import org.apache.jackrabbit.spi.QNodeDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -32,6 +36,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
+import java.util.Set;
+import java.util.HashSet;
 
 /**
  * An <code>EffectiveNodeType</code> represents one or more
@@ -51,9 +57,9 @@
     // (through inheritance) included node types.
     private final TreeSet<Name> allNodeTypes;
     // map of named item definitions (maps name to list of definitions)
-    private final HashMap<Name, List<ItemDef>> namedItemDefs;
+    private final HashMap<Name, List<QItemDefinition>> namedItemDefs;
     // list of unnamed item definitions (i.e. residual definitions)
-    private final ArrayList<ItemDef> unnamedItemDefs;
+    private final ArrayList<QItemDefinition> unnamedItemDefs;
 
     // flag indicating whether any included node type supports orderable child nodes
     private boolean orderableChildNodes;
@@ -67,8 +73,8 @@
         mergedNodeTypes = new TreeSet<Name>();
         inheritedNodeTypes = new TreeSet<Name>();
         allNodeTypes = new TreeSet<Name>();
-        namedItemDefs = new HashMap<Name, List<ItemDef>>();
-        unnamedItemDefs = new ArrayList<ItemDef>();
+        namedItemDefs = new HashMap<Name, List<QItemDefinition>>();
+        unnamedItemDefs = new ArrayList<QItemDefinition>();
         orderableChildNodes = false;
         primaryItemName = null;
     }
@@ -89,9 +95,9 @@
      * @throws NoSuchNodeTypeException if a node type reference (e.g. a supertype)
      *                                 could not be resolved.
      */
-    static EffectiveNodeType create(NodeTypeDef ntd,
+    static EffectiveNodeType create(QNodeTypeDefinition ntd,
                                     EffectiveNodeTypeCache entCache,
-                                    Map<Name, NodeTypeDef> ntdCache)
+                                    Map<Name, QNodeTypeDefinition> ntdCache)
             throws NodeTypeConflictException, NoSuchNodeTypeException {
         // create empty effective node type instance
         EffectiveNodeType ent = new EffectiveNodeType();
@@ -104,13 +110,13 @@
         // map of all item definitions (maps id to definition)
         // used to effectively detect ambiguous child definitions where
         // ambiguity is defined in terms of definition identity
-        HashMap<Object, ItemDef> itemDefIds = new HashMap<Object, ItemDef>();
+        Set<QItemDefinition> itemDefs = new HashSet<QItemDefinition>();
 
-        NodeDef[] cnda = ntd.getChildNodeDefs();
-        for (NodeDef aCnda : cnda) {
+        QNodeDefinition[] cnda = ntd.getChildNodeDefs();
+        for (QNodeDefinition aCnda : cnda) {
             // check if child node definition would be ambiguous within
             // this node type definition
-            if (itemDefIds.containsKey(aCnda.getId())) {
+            if (itemDefs.contains(aCnda)) {
                 // conflict
                 String msg;
                 if (aCnda.definesResidual()) {
@@ -122,7 +128,7 @@
                 log.debug(msg);
                 throw new NodeTypeConflictException(msg);
             } else {
-                itemDefIds.put(aCnda.getId(), aCnda);
+                itemDefs.add(aCnda);
             }
             if (aCnda.definesResidual()) {
                 // residual node definition
@@ -130,9 +136,9 @@
             } else {
                 // named node definition
                 Name name = aCnda.getName();
-                List<ItemDef> defs = ent.namedItemDefs.get(name);
+                List<QItemDefinition> defs = ent.namedItemDefs.get(name);
                 if (defs == null) {
-                    defs = new ArrayList<ItemDef>();
+                    defs = new ArrayList<QItemDefinition>();
                     ent.namedItemDefs.put(name, defs);
                 }
                 if (defs.size() > 0) {
@@ -140,7 +146,7 @@
                      * there already exists at least one definition with that
                      * name; make sure none of them is auto-create
                      */
-                    for (ItemDef def : defs) {
+                    for (QItemDefinition def : defs) {
                         if (aCnda.isAutoCreated() || def.isAutoCreated()) {
                             // conflict
                             String msg = "There are more than one 'auto-create' item definitions for '"
@@ -153,11 +159,11 @@
                 defs.add(aCnda);
             }
         }
-        PropDef[] pda = ntd.getPropertyDefs();
-        for (PropDef aPda : pda) {
+        QPropertyDefinition[] pda = ntd.getPropertyDefs();
+        for (QPropertyDefinition aPda : pda) {
             // check if property definition would be ambiguous within
             // this node type definition
-            if (itemDefIds.containsKey(aPda.getId())) {
+            if (itemDefs.contains(aPda)) {
                 // conflict
                 String msg;
                 if (aPda.definesResidual()) {
@@ -169,7 +175,7 @@
                 log.debug(msg);
                 throw new NodeTypeConflictException(msg);
             } else {
-                itemDefIds.put(aPda.getId(), aPda);
+                itemDefs.add(aPda);
             }
             if (aPda.definesResidual()) {
                 // residual property definition
@@ -177,9 +183,9 @@
             } else {
                 // named property definition
                 Name name = aPda.getName();
-                List<ItemDef> defs = ent.namedItemDefs.get(name);
+                List<QItemDefinition> defs = ent.namedItemDefs.get(name);
                 if (defs == null) {
-                    defs = new ArrayList<ItemDef>();
+                    defs = new ArrayList<QItemDefinition>();
                     ent.namedItemDefs.put(name, defs);
                 }
                 if (defs.size() > 0) {
@@ -187,7 +193,7 @@
                      * there already exists at least one definition with that
                      * name; make sure none of them is auto-create
                      */
-                    for (ItemDef def : defs) {
+                    for (QItemDefinition def : defs) {
                         if (aPda.isAutoCreated() || def.isAutoCreated()) {
                             // conflict
                             String msg = "There are more than one 'auto-create' item definitions for '"
@@ -215,7 +221,7 @@
         } else {
             Name[] nta = ent.getInheritedNodeTypes();
             for (Name aNta : nta) {
-                NodeTypeDef def = ntdCache.get(aNta);
+                QNodeTypeDefinition def = ntdCache.get(aNta);
                 if (def.hasOrderableChildNodes()) {
                     ent.orderableChildNodes = true;
                     break;
@@ -229,7 +235,7 @@
         } else {
             Name[] nta = ent.getInheritedNodeTypes();
             for (Name aNta : nta) {
-                NodeTypeDef def = ntdCache.get(aNta);
+                QNodeTypeDefinition def = ntdCache.get(aNta);
                 if (def.getPrimaryItemName() != null) {
                     ent.primaryItemName = def.getPrimaryItemName();
                     break;
@@ -276,280 +282,280 @@
         return allNodeTypes.toArray(new Name[allNodeTypes.size()]);
     }
 
-    public ItemDef[] getAllItemDefs() {
+    public QItemDefinition[] getAllItemDefs() {
         if (namedItemDefs.size() == 0 && unnamedItemDefs.size() == 0) {
-            return ItemDef.EMPTY_ARRAY;
+            return QItemDefinition.EMPTY_ARRAY;
         }
-        ArrayList<ItemDef> defs = new ArrayList<ItemDef>(namedItemDefs.size() + unnamedItemDefs.size());
-        for (List<ItemDef> itemDefs : namedItemDefs.values()) {
+        ArrayList<QItemDefinition> defs = new ArrayList<QItemDefinition>(namedItemDefs.size() + unnamedItemDefs.size());
+        for (List<QItemDefinition> itemDefs : namedItemDefs.values()) {
             defs.addAll(itemDefs);
         }
         defs.addAll(unnamedItemDefs);
         if (defs.size() == 0) {
-            return ItemDef.EMPTY_ARRAY;
+            return QItemDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new ItemDef[defs.size()]);
+        return defs.toArray(new QItemDefinition[defs.size()]);
     }
 
-    public ItemDef[] getNamedItemDefs() {
+    public QItemDefinition[] getNamedItemDefs() {
         if (namedItemDefs.size() == 0) {
-            return ItemDef.EMPTY_ARRAY;
+            return QItemDefinition.EMPTY_ARRAY;
         }
-        ArrayList<ItemDef> defs = new ArrayList<ItemDef>(namedItemDefs.size());
-        for (List<ItemDef> itemDefs : namedItemDefs.values()) {
+        ArrayList<QItemDefinition> defs = new ArrayList<QItemDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> itemDefs : namedItemDefs.values()) {
             defs.addAll(itemDefs);
         }
         if (defs.size() == 0) {
-            return ItemDef.EMPTY_ARRAY;
+            return QItemDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new ItemDef[defs.size()]);
+        return defs.toArray(new QItemDefinition[defs.size()]);
     }
 
-    public ItemDef[] getUnnamedItemDefs() {
+    public QItemDefinition[] getUnnamedItemDefs() {
         if (unnamedItemDefs.size() == 0) {
-            return ItemDef.EMPTY_ARRAY;
+            return QItemDefinition.EMPTY_ARRAY;
         }
-        return unnamedItemDefs.toArray(new ItemDef[unnamedItemDefs.size()]);
+        return unnamedItemDefs.toArray(new QItemDefinition[unnamedItemDefs.size()]);
     }
 
     public boolean hasNamedItemDef(Name name) {
         return namedItemDefs.containsKey(name);
     }
 
-    public ItemDef[] getNamedItemDefs(Name name) {
-        List<ItemDef> defs = namedItemDefs.get(name);
+    public QItemDefinition[] getNamedItemDefs(Name name) {
+        List<QItemDefinition> defs = namedItemDefs.get(name);
         if (defs == null || defs.size() == 0) {
-            return ItemDef.EMPTY_ARRAY;
+            return QItemDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new ItemDef[defs.size()]);
+        return defs.toArray(new QItemDefinition[defs.size()]);
     }
 
-    public NodeDef[] getAllNodeDefs() {
+    public QNodeDefinition[] getAllNodeDefs() {
         if (namedItemDefs.size() == 0 && unnamedItemDefs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        ArrayList<NodeDef> defs = new ArrayList<NodeDef>(namedItemDefs.size() + unnamedItemDefs.size());
-        for (ItemDef def : unnamedItemDefs) {
+        ArrayList<QNodeDefinition> defs = new ArrayList<QNodeDefinition>(namedItemDefs.size() + unnamedItemDefs.size());
+        for (QItemDefinition def : unnamedItemDefs) {
             if (def.definesNode()) {
-                defs.add((NodeDef) def);
+                defs.add((QNodeDefinition) def);
             }
         }
-        for (List<ItemDef> list: namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        for (List<QItemDefinition> list: namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (def.definesNode()) {
-                    defs.add((NodeDef) def);
+                    defs.add((QNodeDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new NodeDef[defs.size()]);
+        return defs.toArray(new QNodeDefinition[defs.size()]);
     }
 
-    public NodeDef[] getNamedNodeDefs() {
+    public QItemDefinition[] getNamedNodeDefs() {
         if (namedItemDefs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        ArrayList<NodeDef> defs = new ArrayList<NodeDef>(namedItemDefs.size());
-        for (List<ItemDef> list : namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        ArrayList<QNodeDefinition> defs = new ArrayList<QNodeDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> list : namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (def.definesNode()) {
-                    defs.add((NodeDef) def);
+                    defs.add((QNodeDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new NodeDef[defs.size()]);
+        return defs.toArray(new QNodeDefinition[defs.size()]);
     }
 
-    public NodeDef[] getNamedNodeDefs(Name name) {
-        List<ItemDef> list = namedItemDefs.get(name);
+    public QItemDefinition[] getNamedNodeDefs(Name name) {
+        List<QItemDefinition> list = namedItemDefs.get(name);
         if (list == null || list.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        ArrayList<NodeDef> defs = new ArrayList<NodeDef>(list.size());
-        for (ItemDef def : list) {
+        ArrayList<QNodeDefinition> defs = new ArrayList<QNodeDefinition>(list.size());
+        for (QItemDefinition def : list) {
             if (def.definesNode()) {
-                defs.add((NodeDef) def);
+                defs.add((QNodeDefinition) def);
             }
         }
         if (defs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new NodeDef[defs.size()]);
+        return defs.toArray(new QNodeDefinition[defs.size()]);
     }
 
-    public NodeDef[] getUnnamedNodeDefs() {
+    public QNodeDefinition[] getUnnamedNodeDefs() {
         if (unnamedItemDefs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        ArrayList<NodeDef> defs = new ArrayList<NodeDef>(unnamedItemDefs.size());
-        for (ItemDef def : unnamedItemDefs) {
+        ArrayList<QNodeDefinition> defs = new ArrayList<QNodeDefinition>(unnamedItemDefs.size());
+        for (QItemDefinition def : unnamedItemDefs) {
             if (def.definesNode()) {
-                defs.add((NodeDef) def);
+                defs.add((QNodeDefinition) def);
             }
         }
         if (defs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new NodeDef[defs.size()]);
+        return defs.toArray(new QNodeDefinition[defs.size()]);
     }
 
-    public NodeDef[] getAutoCreateNodeDefs() {
+    public QNodeDefinition[] getAutoCreateNodeDefs() {
         // since auto-create items must have a name,
         // we're only searching the named item definitions
         if (namedItemDefs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        ArrayList<NodeDef> defs = new ArrayList<NodeDef>(namedItemDefs.size());
-        for (List<ItemDef> list : namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        ArrayList<QNodeDefinition> defs = new ArrayList<QNodeDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> list : namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (def.definesNode() && def.isAutoCreated()) {
-                    defs.add((NodeDef) def);
+                    defs.add((QNodeDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new NodeDef[defs.size()]);
+        return defs.toArray(new QNodeDefinition[defs.size()]);
     }
 
-    public PropDef[] getAllPropDefs() {
+    public QPropertyDefinition[] getAllPropDefs() {
         if (namedItemDefs.size() == 0 && unnamedItemDefs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        ArrayList<PropDef> defs = new ArrayList<PropDef>(namedItemDefs.size() + unnamedItemDefs.size());
-        for (ItemDef def : unnamedItemDefs) {
+        ArrayList<QPropertyDefinition> defs = new ArrayList<QPropertyDefinition>(namedItemDefs.size() + unnamedItemDefs.size());
+        for (QItemDefinition def : unnamedItemDefs) {
             if (!def.definesNode()) {
-                defs.add((PropDef) def);
+                defs.add((QPropertyDefinition) def);
             }
         }
-        for (List<ItemDef> list: namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        for (List<QItemDefinition> list: namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (!def.definesNode()) {
-                    defs.add((PropDef) def);
+                    defs.add((QPropertyDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new PropDef[defs.size()]);
+        return defs.toArray(new QPropertyDefinition[defs.size()]);
     }
 
-    public PropDef[] getNamedPropDefs() {
+    public QPropertyDefinition[] getNamedPropDefs() {
         if (namedItemDefs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        ArrayList<PropDef> defs = new ArrayList<PropDef>(namedItemDefs.size());
-        for (List<ItemDef> list : namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        ArrayList<QPropertyDefinition> defs = new ArrayList<QPropertyDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> list : namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (!def.definesNode()) {
-                    defs.add((PropDef) def);
+                    defs.add((QPropertyDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new PropDef[defs.size()]);
+        return defs.toArray(new QPropertyDefinition[defs.size()]);
     }
 
-    public PropDef[] getNamedPropDefs(Name name) {
-        List<ItemDef> list = namedItemDefs.get(name);
+    public QPropertyDefinition[] getNamedPropDefs(Name name) {
+        List<QItemDefinition> list = namedItemDefs.get(name);
         if (list == null || list.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        ArrayList<PropDef> defs = new ArrayList<PropDef>(list.size());
-        for (ItemDef def : list) {
+        ArrayList<QPropertyDefinition> defs = new ArrayList<QPropertyDefinition>(list.size());
+        for (QItemDefinition def : list) {
             if (!def.definesNode()) {
-                defs.add((PropDef) def);
+                defs.add((QPropertyDefinition) def);
             }
         }
         if (defs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new PropDef[defs.size()]);
+        return defs.toArray(new QPropertyDefinition[defs.size()]);
     }
 
-    public PropDef[] getUnnamedPropDefs() {
+    public QPropertyDefinition[] getUnnamedPropDefs() {
         if (unnamedItemDefs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        ArrayList<PropDef> defs = new ArrayList<PropDef>(unnamedItemDefs.size());
-        for (ItemDef def : unnamedItemDefs) {
+        ArrayList<QPropertyDefinition> defs = new ArrayList<QPropertyDefinition>(unnamedItemDefs.size());
+        for (QItemDefinition def : unnamedItemDefs) {
             if (!def.definesNode()) {
-                defs.add((PropDef) def);
+                defs.add((QPropertyDefinition) def);
             }
         }
         if (defs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new PropDef[defs.size()]);
+        return defs.toArray(new QPropertyDefinition[defs.size()]);
     }
 
-    public PropDef[] getAutoCreatePropDefs() {
+    public QPropertyDefinition[] getAutoCreatePropDefs() {
         // since auto-create items must have a name,
         // we're only searching the named item definitions
         if (namedItemDefs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        ArrayList<PropDef> defs = new ArrayList<PropDef>(namedItemDefs.size());
-        for (List<ItemDef> list : namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        ArrayList<QPropertyDefinition> defs = new ArrayList<QPropertyDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> list : namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (!def.definesNode() && def.isAutoCreated()) {
-                    defs.add((PropDef) def);
+                    defs.add((QPropertyDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new PropDef[defs.size()]);
+        return defs.toArray(new QPropertyDefinition[defs.size()]);
     }
 
-    public PropDef[] getMandatoryPropDefs() {
+    public QPropertyDefinition[] getMandatoryPropDefs() {
         // since mandatory items must have a name,
         // we're only searching the named item definitions
         if (namedItemDefs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        ArrayList<PropDef> defs = new ArrayList<PropDef>(namedItemDefs.size());
-        for (List<ItemDef> list : namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        ArrayList<QPropertyDefinition> defs = new ArrayList<QPropertyDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> list : namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (!def.definesNode() && def.isMandatory()) {
-                    defs.add((PropDef) def);
+                    defs.add((QPropertyDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return PropDef.EMPTY_ARRAY;
+            return QPropertyDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new PropDef[defs.size()]);
+        return defs.toArray(new QPropertyDefinition[defs.size()]);
     }
 
-    public NodeDef[] getMandatoryNodeDefs() {
+    public QNodeDefinition[] getMandatoryNodeDefs() {
         // since mandatory items must have a name,
         // we're only searching the named item definitions
         if (namedItemDefs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        ArrayList<NodeDef> defs = new ArrayList<NodeDef>(namedItemDefs.size());
-        for (List<ItemDef> list : namedItemDefs.values()) {
-            for (ItemDef def : list) {
+        ArrayList<QNodeDefinition> defs = new ArrayList<QNodeDefinition>(namedItemDefs.size());
+        for (List<QItemDefinition> list : namedItemDefs.values()) {
+            for (QItemDefinition def : list) {
                 if (def.definesNode() && def.isMandatory()) {
-                    defs.add((NodeDef) def);
+                    defs.add((QNodeDefinition) def);
                 }
             }
         }
         if (defs.size() == 0) {
-            return NodeDef.EMPTY_ARRAY;
+            return QNodeDefinition.EMPTY_ARRAY;
         }
-        return defs.toArray(new NodeDef[defs.size()]);
+        return defs.toArray(new QNodeDefinition[defs.size()]);
     }
 
     /**
@@ -591,7 +597,7 @@
      *                                      by the the specified values
      * @throws RepositoryException          if another error occurs
      */
-    public static void checkSetPropertyValueConstraints(PropDef pd,
+    public static void checkSetPropertyValueConstraints(QPropertyDefinition pd,
                                                         InternalValue[] values)
             throws ConstraintViolationException, RepositoryException {
         // check multi-value flag
@@ -653,7 +659,7 @@
                                         NodeTypeRegistry ntReg)
             throws ConstraintViolationException, NoSuchNodeTypeException {
         if (nodeTypeName != null) {
-            NodeTypeDef ntDef = ntReg.getNodeTypeDef(nodeTypeName);
+            QNodeTypeDefinition ntDef = ntReg.getNodeTypeDef(nodeTypeName);
             if (ntDef.isAbstract()) {
                 throw new ConstraintViolationException(nodeTypeName + " is abstract.");
             }
@@ -661,7 +667,7 @@
                 throw new ConstraintViolationException(nodeTypeName + " is mixin.");
             }
         }
-        NodeDef nd = getApplicableChildNodeDef(name, nodeTypeName, ntReg);
+        QItemDefinition nd = getApplicableChildNodeDef(name, nodeTypeName, ntReg);
         if (nd.isProtected()) {
             throw new ConstraintViolationException(name + " is protected");
         }
@@ -683,7 +689,7 @@
      * @throws ConstraintViolationException if no applicable child node definition
      *                                      could be found
      */
-    public NodeDef getApplicableChildNodeDef(Name name, Name nodeTypeName,
+    public QNodeDefinition getApplicableChildNodeDef(Name name, Name nodeTypeName,
                                              NodeTypeRegistry ntReg)
             throws NoSuchNodeTypeException, ConstraintViolationException {
         EffectiveNodeType entTarget;
@@ -694,10 +700,10 @@
         }
 
         // try named node definitions first
-        ItemDef[] defs = getNamedItemDefs(name);
-        for (ItemDef def : defs) {
+        QItemDefinition[] defs = getNamedItemDefs(name);
+        for (QItemDefinition def : defs) {
             if (def.definesNode()) {
-                NodeDef nd = (NodeDef) def;
+                QNodeDefinition nd = (QNodeDefinition) def;
                 Name[] types = nd.getRequiredPrimaryTypes();
                 // node definition with that name exists
                 if (entTarget != null && types != null) {
@@ -715,8 +721,8 @@
 
         // no item with that name defined;
         // try residual node definitions
-        NodeDef[] nda = getUnnamedNodeDefs();
-        for (NodeDef nd : nda) {
+        QNodeDefinition[] nda = getUnnamedNodeDefs();
+        for (QNodeDefinition nd : nda) {
             if (entTarget != null && nd.getRequiredPrimaryTypes() != null) {
                 // check 'required primary types' constraint
                 if (!entTarget.includesNodeTypes(nd.getRequiredPrimaryTypes())) {
@@ -755,11 +761,11 @@
      * @throws ConstraintViolationException if no applicable property definition
      *                                      could be found
      */
-    public PropDef getApplicablePropertyDef(Name name, int type,
+    public QPropertyDefinition getApplicablePropertyDef(Name name, int type,
                                             boolean multiValued)
             throws ConstraintViolationException {
         // try named property definitions first
-        PropDef match =
+        QPropertyDefinition match =
                 getMatchingPropDef(getNamedPropDefs(name), type, multiValued);
         if (match != null) {
             return match;
@@ -797,10 +803,10 @@
      * @throws ConstraintViolationException if no applicable property definition
      *                                      could be found
      */
-    public PropDef getApplicablePropertyDef(Name name, int type)
+    public QPropertyDefinition getApplicablePropertyDef(Name name, int type)
             throws ConstraintViolationException {
         // try named property definitions first
-        PropDef match = getMatchingPropDef(getNamedPropDefs(name), type);
+        QPropertyDefinition match = getMatchingPropDef(getNamedPropDefs(name), type);
         if (match != null) {
             return match;
         }
@@ -816,9 +822,9 @@
         throw new ConstraintViolationException("no matching property definition found for " + name);
     }
 
-    private PropDef getMatchingPropDef(PropDef[] defs, int type) {
-        PropDef match = null;
-        for (PropDef pd : defs) {
+    private QPropertyDefinition getMatchingPropDef(QPropertyDefinition[] defs, int type) {
+        QPropertyDefinition match = null;
+        for (QPropertyDefinition pd : defs) {
             int reqType = pd.getRequiredType();
             // match type
             if (reqType == PropertyType.UNDEFINED
@@ -851,10 +857,10 @@
         return match;
     }
 
-    private PropDef getMatchingPropDef(PropDef[] defs, int type,
+    private QPropertyDefinition getMatchingPropDef(QPropertyDefinition[] defs, int type,
                                        boolean multiValued) {
-        PropDef match = null;
-        for (PropDef pd : defs) {
+        QPropertyDefinition match = null;
+        for (QPropertyDefinition pd : defs) {
             int reqType = pd.getRequiredType();
             // match type
             if (reqType == PropertyType.UNDEFINED
@@ -886,9 +892,9 @@
          * as there might be multiple definitions with the same name and we
          * don't know which one is applicable, we check all of them
          */
-        ItemDef[] defs = getNamedItemDefs(name);
+        QItemDefinition[] defs = getNamedItemDefs(name);
         if (defs != null) {
-            for (ItemDef def : defs) {
+            for (QItemDefinition def : defs) {
                 if (def.isMandatory()) {
                     throw new ConstraintViolationException("can't remove mandatory item");
                 }
@@ -908,9 +914,9 @@
          * as there might be multiple definitions with the same name and we
          * don't know which one is applicable, we check all of them
          */
-        ItemDef[] defs = getNamedNodeDefs(name);
+        QItemDefinition[] defs = getNamedNodeDefs(name);
         if (defs != null) {
-            for (ItemDef def : defs) {
+            for (QItemDefinition def : defs) {
                 if (def.isMandatory()) {
                     throw new ConstraintViolationException("can't remove mandatory node");
                 }
@@ -930,9 +936,9 @@
          * as there might be multiple definitions with the same name and we
          * don't know which one is applicable, we check all of them
          */
-        ItemDef[] defs = getNamedPropDefs(name);
+        QItemDefinition[] defs = getNamedPropDefs(name);
         if (defs != null) {
-            for (ItemDef def : defs) {
+            for (QItemDefinition def : defs) {
                 if (def.isMandatory()) {
                     throw new ConstraintViolationException("can't remove mandatory property");
                 }
@@ -992,18 +998,18 @@
         }
 
         // named item definitions
-        ItemDef[] defs = other.getNamedItemDefs();
-        for (ItemDef def : defs) {
+        QItemDefinition[] defs = other.getNamedItemDefs();
+        for (QItemDefinition def : defs) {
             if (includesNodeType(def.getDeclaringNodeType())) {
                 // ignore redundant definitions
                 continue;
             }
             Name name = def.getName();
-            List<ItemDef> existingDefs = namedItemDefs.get(name);
+            List<QItemDefinition> existingDefs = namedItemDefs.get(name);
             if (existingDefs != null) {
                 if (existingDefs.size() > 0) {
                     // there already exists at least one definition with that name
-                    for (ItemDef existingDef : existingDefs) {
+                    for (QItemDefinition existingDef : existingDefs) {
                         // make sure none of them is auto-create
                         if (def.isAutoCreated() || existingDef.isAutoCreated()) {
                             // conflict
@@ -1020,8 +1026,8 @@
                         if (def.definesNode() == existingDef.definesNode()) {
                             if (!def.definesNode()) {
                                 // property definition
-                                PropDef pd = (PropDef) def;
-                                PropDef epd = (PropDef) existingDef;
+                                QPropertyDefinition pd = (QPropertyDefinition) def;
+                                QPropertyDefinition epd = (QPropertyDefinition) existingDef;
                                 // compare type & multiValued flag
                                 if (pd.getRequiredType() == epd.getRequiredType()
                                         && pd.isMultiple() == epd.isMultiple()) {
@@ -1051,7 +1057,7 @@
                     }
                 }
             } else {
-                existingDefs = new ArrayList<ItemDef>();
+                existingDefs = new ArrayList<QItemDefinition>();
                 namedItemDefs.put(name, existingDefs);
             }
             existingDefs.add(def);
@@ -1059,18 +1065,18 @@
 
         // residual item definitions
         defs = other.getUnnamedItemDefs();
-        for (ItemDef def : defs) {
+        for (QItemDefinition def : defs) {
             if (includesNodeType(def.getDeclaringNodeType())) {
                 // ignore redundant definitions
                 continue;
             }
-            for (ItemDef existing : unnamedItemDefs) {
+            for (QItemDefinition existing : unnamedItemDefs) {
                 // compare with existing definition
                 if (def.definesNode() == existing.definesNode()) {
                     if (!def.definesNode()) {
                         // property definition
-                        PropDef pd = (PropDef) def;
-                        PropDef epd = (PropDef) existing;
+                        QPropertyDefinition pd = (QPropertyDefinition) def;
+                        QPropertyDefinition epd = (QPropertyDefinition) existing;
                         // compare type & multiValued flag
                         if (pd.getRequiredType() == epd.getRequiredType()
                                 && pd.isMultiple() == epd.isMultiple()) {
@@ -1085,8 +1091,8 @@
                         }
                     } else {
                         // child node definition
-                        NodeDef nd = (NodeDef) def;
-                        NodeDef end = (NodeDef) existing;
+                        QNodeDefinition nd = (QNodeDefinition) def;
+                        QNodeDefinition end = (QNodeDefinition) existing;
                         // compare required & default primary types
                         if (Arrays.equals(nd.getRequiredPrimaryTypes(), end.getRequiredPrimaryTypes())
                                 && (nd.getDefaultPrimaryType() == null
@@ -1146,8 +1152,8 @@
         clone.inheritedNodeTypes.addAll(inheritedNodeTypes);
         clone.allNodeTypes.addAll(allNodeTypes);
         for (Name name : namedItemDefs.keySet()) {
-            List<ItemDef> list = namedItemDefs.get(name);
-            clone.namedItemDefs.put(name, new ArrayList<ItemDef>(list));
+            List<QItemDefinition> list = namedItemDefs.get(name);
+            clone.namedItemDefs.put(name, new ArrayList<QItemDefinition>(list));
         }
         clone.unnamedItemDefs.addAll(unnamedItemDefs);
         clone.orderableChildNodes = orderableChildNodes;

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java?rev=827966&r1=827965&r2=827966&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefId.java Wed Oct 21 11:38:31 2009
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.core.nodetype;
 
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.QNodeDefinition;
 
 import java.io.Serializable;
 import java.util.Arrays;
@@ -25,7 +26,7 @@
  * <code>NodeDefId</code> uniquely identifies a <code>NodeDef</code> in the
  * node type registry.
  */
-public class NodeDefId implements Serializable {
+class NodeDefId implements Serializable {
 
     /**
      * Serialization UID of this class.
@@ -45,7 +46,7 @@
      *
      * @param def <code>NodeDef</code> to create identifier for
      */
-    NodeDefId(NodeDef def) {
+    public NodeDefId(QNodeDefinition def) {
         if (def == null) {
             throw new IllegalArgumentException("NodeDef argument can not be null");
         }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java?rev=827966&r1=827965&r2=827966&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java Wed Oct 21 11:38:31 2009
@@ -27,6 +27,10 @@
 import javax.jcr.PropertyType;
 
 import org.apache.jackrabbit.spi.QValueConstraint;
+import org.apache.jackrabbit.spi.QItemDefinition;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
+import org.apache.jackrabbit.spi.QNodeDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 
 /**
  * A <code>NodeTypeDefDiff</code> represents the result of the comparison of
@@ -93,17 +97,17 @@
      */
     public static final int MAJOR = 3;
 
-    private final NodeTypeDef oldDef;
-    private final NodeTypeDef newDef;
+    private final QNodeTypeDefinition oldDef;
+    private final QNodeTypeDefinition newDef;
     private int type;
 
-    private List propDefDiffs = new ArrayList();
+    private List<PropDefDiff> propDefDiffs = new ArrayList<PropDefDiff>();
     private List childNodeDefDiffs = new ArrayList();
 
     /**
      * Constructor
      */
-    private NodeTypeDefDiff(NodeTypeDef oldDef, NodeTypeDef newDef) {
+    private NodeTypeDefDiff(QNodeTypeDefinition oldDef, QNodeTypeDefinition newDef) {
         this.oldDef = oldDef;
         this.newDef = newDef;
         init();
@@ -162,7 +166,7 @@
      * @param newDef
      * @return
      */
-    public static NodeTypeDefDiff create(NodeTypeDef oldDef, NodeTypeDef newDef) {
+    public static NodeTypeDefDiff create(QNodeTypeDefinition oldDef, QNodeTypeDefinition newDef) {
         if (oldDef == null || newDef == null) {
             throw new IllegalArgumentException("arguments can not be null");
         }
@@ -249,45 +253,38 @@
          */
 
         int maxType = NONE;
-        PropDef[] pda1 = oldDef.getPropertyDefs();
-        HashMap defs1 = new HashMap();
-        for (int i = 0; i < pda1.length; i++) {
-            defs1.put(pda1[i].getId(), pda1[i]);
+        Map<PropDefId, QPropertyDefinition> oldDefs = new HashMap<PropDefId, QPropertyDefinition>();
+        for (QPropertyDefinition def : oldDef.getPropertyDefs()) {
+            oldDefs.put(new PropDefId(def), def);
         }
 
-        PropDef[] pda2 = newDef.getPropertyDefs();
-        HashMap defs2 = new HashMap();
-        for (int i = 0; i < pda2.length; i++) {
-            defs2.put(pda2[i].getId(), pda2[i]);
+        Map<PropDefId, QPropertyDefinition> newDefs = new HashMap<PropDefId, QPropertyDefinition>();
+        for (QPropertyDefinition def : newDef.getPropertyDefs()) {
+            newDefs.put(new PropDefId(def), def);
         }
 
         /**
          * walk through defs1 and process all entries found in
          * both defs1 & defs2 and those found only in defs1
          */
-        Iterator iter = defs1.entrySet().iterator();
-        while (iter.hasNext()) {
-            Map.Entry entry = (Map.Entry) iter.next();
-            PropDefId id = (PropDefId) entry.getKey();
-            PropDef def1 = (PropDef) entry.getValue();
-            PropDef def2 = (PropDef) defs2.get(id);
+        for (Map.Entry<PropDefId, QPropertyDefinition> entry : oldDefs.entrySet()) {
+            PropDefId id = entry.getKey();
+            QPropertyDefinition def1 = entry.getValue();
+            QPropertyDefinition def2 = newDefs.get(id);
             PropDefDiff diff = new PropDefDiff(def1, def2);
             if (diff.getType() > maxType) {
                 maxType = diff.getType();
             }
             propDefDiffs.add(diff);
-            defs2.remove(id);
+            newDefs.remove(id);
         }
 
         /**
          * defs2 by now only contains entries found in defs2 only;
          * walk through defs2 and process all remaining entries
          */
-        iter = defs2.entrySet().iterator();
-        while (iter.hasNext()) {
-            Map.Entry entry = (Map.Entry) iter.next();
-            PropDefId id = (PropDefId) entry.getKey();
-            PropDef def = (PropDef) entry.getValue();
+        for (Map.Entry<PropDefId, QPropertyDefinition> entry : newDefs.entrySet()) {
+            QPropertyDefinition def = entry.getValue();
             PropDefDiff diff = new PropDefDiff(null, def);
             if (diff.getType() > maxType) {
                 maxType = diff.getType();
@@ -308,16 +305,16 @@
          */
 
         int maxType = NONE;
-        NodeDef[] cnda1 = oldDef.getChildNodeDefs();
+        QNodeDefinition[] cnda1 = oldDef.getChildNodeDefs();
         HashMap defs1 = new HashMap();
         for (int i = 0; i < cnda1.length; i++) {
-            defs1.put(cnda1[i].getId(), cnda1[i]);
+            defs1.put(new NodeDefId(cnda1[i]), cnda1[i]);
         }
 
-        NodeDef[] cnda2 = newDef.getChildNodeDefs();
+        QNodeDefinition[] cnda2 = newDef.getChildNodeDefs();
         HashMap defs2 = new HashMap();
         for (int i = 0; i < cnda2.length; i++) {
-            defs2.put(cnda2[i].getId(), cnda2[i]);
+            defs2.put(new NodeDefId(cnda2[i]), cnda2[i]);
         }
 
         /**
@@ -328,8 +325,8 @@
         while (iter.hasNext()) {
             Map.Entry entry = (Map.Entry) iter.next();
             NodeDefId id = (NodeDefId) entry.getKey();
-            NodeDef def1 = (NodeDef) entry.getValue();
-            NodeDef def2 = (NodeDef) defs2.get(id);
+            QItemDefinition def1 = (QItemDefinition) entry.getValue();
+            QItemDefinition def2 = (QItemDefinition) defs2.get(id);
             ChildNodeDefDiff diff = new ChildNodeDefDiff(def1, def2);
             if (diff.getType() > maxType) {
                 maxType = diff.getType();
@@ -346,7 +343,7 @@
         while (iter.hasNext()) {
             Map.Entry entry = (Map.Entry) iter.next();
             NodeDefId id = (NodeDefId) entry.getKey();
-            NodeDef def = (NodeDef) entry.getValue();
+            QItemDefinition def = (QItemDefinition) entry.getValue();
             ChildNodeDefDiff diff = new ChildNodeDefDiff(null, def);
             if (diff.getType() > maxType) {
                 maxType = diff.getType();
@@ -408,11 +405,11 @@
     //--------------------------------------------------------< inner classes >
 
     abstract class ChildItemDefDiff {
-        protected final ItemDef oldDef;
-        protected final ItemDef newDef;
+        protected final QItemDefinition oldDef;
+        protected final QItemDefinition newDef;
         protected int type;
 
-        ChildItemDefDiff(ItemDef oldDef, ItemDef newDef) {
+        ChildItemDefDiff(QItemDefinition oldDef, QItemDefinition newDef) {
             this.oldDef = oldDef;
             this.newDef = newDef;
             init();
@@ -495,7 +492,7 @@
                 operationString = "NONE";
             }
 
-            ItemDef itemDefinition = (oldDef != null) ? oldDef : newDef;
+            QItemDefinition itemDefinition = (oldDef != null) ? oldDef : newDef;
 
             return getClass().getName() + "[itemName="
                     + itemDefinition.getName() + ", type=" + typeString
@@ -506,16 +503,16 @@
 
     public class PropDefDiff extends ChildItemDefDiff {
 
-        PropDefDiff(PropDef oldDef, PropDef newDef) {
+        PropDefDiff(QPropertyDefinition oldDef, QPropertyDefinition newDef) {
             super(oldDef, newDef);
         }
 
-        public PropDef getOldDef() {
-            return (PropDef) oldDef;
+        public QPropertyDefinition getOldDef() {
+            return (QPropertyDefinition) oldDef;
         }
 
-        public PropDef getNewDef() {
-            return (PropDef) newDef;
+        public QPropertyDefinition getNewDef() {
+            return (QPropertyDefinition) newDef;
         }
 
         protected void init() {
@@ -584,16 +581,16 @@
 
     public class ChildNodeDefDiff extends ChildItemDefDiff {
 
-        ChildNodeDefDiff(NodeDef oldDef, NodeDef newDef) {
+        ChildNodeDefDiff(QItemDefinition oldDef, QItemDefinition newDef) {
             super(oldDef, newDef);
         }
 
-        public NodeDef getOldDef() {
-            return (NodeDef) oldDef;
+        public QNodeDefinition getOldDef() {
+            return (QNodeDefinition) oldDef;
         }
 
-        public NodeDef getNewDef() {
-            return (NodeDef) newDef;
+        public QNodeDefinition getNewDef() {
+            return (QNodeDefinition) newDef;
         }
 
         protected void init() {

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefStore.java?rev=827966&r1=827965&r2=827966&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefStore.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefStore.java Wed Oct 21 11:38:31 2009
@@ -28,12 +28,14 @@
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.RepositoryException;
 
+import org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefReader;
+import org.apache.jackrabbit.commons.cnd.ParseException;
 import org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader;
 import org.apache.jackrabbit.core.nodetype.xml.NodeTypeWriter;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.QNodeTypeDefinition;
-import org.apache.jackrabbit.spi.commons.nodetype.compact.CompactNodeTypeDefReader;
-import org.apache.jackrabbit.spi.commons.nodetype.compact.ParseException;
+import org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping;
+import org.apache.jackrabbit.spi.commons.nodetype.QDefinitionBuilderFactory;
 
 /**
  * <code>NodeTypeDefStore</code> ...
@@ -41,13 +43,13 @@
 public class NodeTypeDefStore {
 
     /** Map of node type names to node type definitions. */
-    private final Map<Name, NodeTypeDef> ntDefs;
+    private final Map<Name, QNodeTypeDefinition> ntDefs;
 
     /**
      * Empty default constructor.
      */
     public NodeTypeDefStore() throws RepositoryException {
-        ntDefs = new HashMap<Name, NodeTypeDef>();
+        ntDefs = new HashMap<Name, QNodeTypeDefinition>();
     }
 
     /**
@@ -58,15 +60,15 @@
     public void load(InputStream in)
             throws IOException, InvalidNodeTypeDefException,
             RepositoryException {
-        NodeTypeDef[] types = NodeTypeReader.read(in);
-        for (NodeTypeDef type : types) {
+        QNodeTypeDefinition[] types = NodeTypeReader.read(in);
+        for (QNodeTypeDefinition type : types) {
             add(type);
         }
     }
 
     /**
      * Loads node types from a CND stream.
-     * 
+     *
      * @param in reader containing the nodetype definitions
      * @param systemId optional name of the stream
      *
@@ -76,9 +78,12 @@
     public void loadCND(Reader in, String systemId)
             throws IOException, InvalidNodeTypeDefException {
         try {
-            CompactNodeTypeDefReader r = new CompactNodeTypeDefReader(in, systemId);
+            CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping> r =
+                new CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping>(
+                    in, systemId, new QDefinitionBuilderFactory());
+
             for (QNodeTypeDefinition qdef: r.getNodeTypeDefinitions()) {
-                add(new NodeTypeDef(qdef));
+                add(qdef);
             }
         } catch (ParseException e) {
             throw new InvalidNodeTypeDefException("Unable to parse CND stream.", e);
@@ -93,14 +98,14 @@
      */
     public void store(OutputStream out, NamespaceRegistry registry)
             throws IOException, RepositoryException {
-        NodeTypeDef[] types = ntDefs.values().toArray(new NodeTypeDef[ntDefs.size()]);
+        QNodeTypeDefinition[] types = ntDefs.values().toArray(new QNodeTypeDefinition[ntDefs.size()]);
         NodeTypeWriter.write(out, types, registry);
     }
 
     /**
      * @param ntd
      */
-    public void add(NodeTypeDef ntd) {
+    public void add(QNodeTypeDefinition ntd) {
         ntDefs.put(ntd.getName(), ntd);
     }
 
@@ -131,14 +136,14 @@
      * @param name
      * @return
      */
-    public NodeTypeDef get(Name name) {
+    public QNodeTypeDefinition get(Name name) {
         return ntDefs.get(name);
     }
 
     /**
      * @return
      */
-    public Collection<NodeTypeDef> all() {
+    public Collection<QNodeTypeDefinition> all() {
         return Collections.unmodifiableCollection(ntDefs.values());
     }
 }

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java?rev=827966&r1=827965&r2=827966&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java Wed Oct 21 11:38:31 2009
@@ -18,7 +18,12 @@
 
 import javax.jcr.nodetype.NodeTypeDefinition;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
+import org.apache.jackrabbit.spi.QItemDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl;
+import org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -29,7 +34,7 @@
 
 /**
  * This class implements the <code>NodeTypeDefinition</code> interface.
- * All method calls are delegated to the wrapped {@link NodeTypeDef},
+ * All method calls are delegated to the wrapped {@link QNodeTypeDefinition},
  * performing the translation from <code>Name</code>s to JCR names
  * (and vice versa) where necessary.
  */
@@ -37,12 +42,12 @@
 
     private static Logger log = LoggerFactory.getLogger(NodeTypeDefinitionImpl.class);
 
-    private final NodeTypeDef ntd;
+    private final QNodeTypeDefinition ntd;
     // resolver used to translate <code>Name</code>s to JCR name strings.
     private final NamePathResolver resolver;
     private final ValueFactory valueFactory;
 
-    public NodeTypeDefinitionImpl(NodeTypeDef ntd, NamePathResolver resolver, ValueFactory valueFactory) {
+    public NodeTypeDefinitionImpl(QNodeTypeDefinition ntd, NamePathResolver resolver, ValueFactory valueFactory) {
         this.ntd = ntd;
         this.resolver = resolver;
         this.valueFactory = valueFactory;
@@ -163,7 +168,7 @@
      * {@inheritDoc}
      */
     public NodeDefinition[] getDeclaredChildNodeDefinitions() {
-        NodeDef[] cnda = ntd.getChildNodeDefs();
+        QItemDefinition[] cnda = ntd.getChildNodeDefs();
         NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
         for (int i = 0; i < cnda.length; i++) {
             nodeDefs[i] = new NodeDefinitionImpl(cnda[i], null, resolver);
@@ -175,7 +180,7 @@
      * {@inheritDoc}
      */
     public PropertyDefinition[] getDeclaredPropertyDefinitions() {
-        PropDef[] pda = ntd.getPropertyDefs();
+        QPropertyDefinition[] pda = ntd.getPropertyDefs();
         PropertyDefinition[] propDefs = new PropertyDefinition[pda.length];
         for (int i = 0; i < pda.length; i++) {
             propDefs[i] = new PropertyDefinitionImpl(pda[i], null, resolver, valueFactory);

Propchange: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefinitionImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java?rev=827966&r1=827965&r2=827966&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java (original)
+++ jackrabbit/sandbox/JCR-1456/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java Wed Oct 21 11:38:31 2009
@@ -18,8 +18,9 @@
 
 import java.util.ArrayList;
 import java.util.HashSet;
+import java.util.Set;
+import java.util.List;
 
-import javax.jcr.NamespaceException;
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
@@ -34,6 +35,9 @@
 import org.apache.jackrabbit.core.data.DataStore;
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.QPropertyDefinition;
+import org.apache.jackrabbit.spi.QNodeDefinition;
+import org.apache.jackrabbit.spi.QNodeTypeDefinition;
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeType;
@@ -48,11 +52,8 @@
 
     private static Logger log = LoggerFactory.getLogger(NodeTypeImpl.class);
 
-    private final NodeTypeDef ntd;
     private final EffectiveNodeType ent;
     private final NodeTypeManagerImpl ntMgr;
-    // resolver used to translate translate <code>Name</code>s to JCR name strings.
-    private final NamePathResolver resolver;
     // value factory used for type conversion
     private final ValueFactory valueFactory;
     private final DataStore store;
@@ -60,32 +61,34 @@
     /**
      * Package private constructor
      * <p/>
-     * Creates a valid node type instance.
-     * We assume that the node type definition is valid and all referenced
-     * node types (supertypes, required node types etc.) do exist and are valid.
-     *
-     * @param ent        the effective (i.e. merged and resolved) node type representation
-     * @param ntd        the definition of this node type
-     * @param ntMgr      the node type manager associated with this node type
-     * @param resolver
-     */
-    NodeTypeImpl(EffectiveNodeType ent, NodeTypeDef ntd,
-                 NodeTypeManagerImpl ntMgr, NamePathResolver resolver,
-                 ValueFactory valueFactory, DataStore store) {
-        super(ntMgr);
+     * Creates a valid node type instance. We assume that the node type
+     * definition is valid and all referenced node types (supertypes, required
+     * node types etc.) do exist and are valid.
+     *
+     * @param ent          the effective (i.e. merged and resolved) node type
+     *                     representation
+     * @param ntd          the definition of this node type
+     * @param ntMgr        the node type manager associated with this node type
+     * @param resolver     the name path resolver of the session.
+     * @param valueFactory the value factory of the session.
+     * @param store        the data store or <code>null</code> if none is
+     *                     configured.
+     */
+    NodeTypeImpl(EffectiveNodeType ent,
+                 QNodeTypeDefinition ntd,
+                 NodeTypeManagerImpl ntMgr,
+                 NamePathResolver resolver,
+                 ValueFactory valueFactory,
+                 DataStore store) {
+        super(ntd, ntMgr, resolver);
         this.ent = ent;
         this.ntMgr = ntMgr;
-        this.resolver = resolver;
         this.valueFactory = valueFactory;
-        this.ntd = ntd;
         this.store = store;
     }
 
     /**
-     * Checks if the effective node type includes the given <code>nodeTypeName</code>.
-     *
-     * @param nodeTypeName
-     * @return true if the effective node type includes the given <code>nodeTypeName</code>.
+     * {@inheritDoc}
      */
     public boolean isNodeType(Name nodeTypeName) {
         return ent.includesNodeType(nodeTypeName);
@@ -95,7 +98,7 @@
      * Checks if this node type is directly or indirectly derived from the
      * specified node type.
      *
-     * @param nodeTypeName
+     * @param nodeTypeName the name of a node type.
      * @return true if this node type is directly or indirectly derived from the
      *         specified node type, otherwise false.
      */
@@ -104,16 +107,6 @@
     }
 
     /**
-     * Returns the definition of this node type.
-     *
-     * @return the definition of this node type
-     */
-    public NodeTypeDef getDefinition() {
-        // return clone to make sure nobody messes around with the 'live' definition
-        return (NodeTypeDef) ntd.clone();
-    }
-
-    /**
      * Returns an array containing only those child node definitions of this
      * node type (including the child node definitions inherited from supertypes
      * of this node type) where <code>{@link NodeDefinition#isAutoCreated()}</code>
@@ -123,10 +116,10 @@
      * @see NodeDefinition#isAutoCreated
      */
     public NodeDefinition[] getAutoCreatedNodeDefinitions() {
-        NodeDef[] cnda = ent.getAutoCreateNodeDefs();
+        QNodeDefinition[] cnda = ent.getAutoCreateNodeDefs();
         NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
         for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i].getId());
+            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]);
         }
         return nodeDefs;
     }
@@ -141,10 +134,10 @@
      * @see PropertyDefinition#isAutoCreated
      */
     public PropertyDefinition[] getAutoCreatedPropertyDefinitions() {
-        PropDef[] pda = ent.getAutoCreatePropDefs();
+        QPropertyDefinition[] pda = ent.getAutoCreatePropDefs();
         PropertyDefinition[] propDefs = new PropertyDefinition[pda.length];
         for (int i = 0; i < pda.length; i++) {
-            propDefs[i] = ntMgr.getPropertyDefinition(pda[i].getId());
+            propDefs[i] = ntMgr.getPropertyDefinition(pda[i]);
         }
         return propDefs;
     }
@@ -159,10 +152,10 @@
      * @see PropertyDefinition#isMandatory
      */
     public PropertyDefinition[] getMandatoryPropertyDefinitions() {
-        PropDef[] pda = ent.getMandatoryPropDefs();
+        QPropertyDefinition[] pda = ent.getMandatoryPropDefs();
         PropertyDefinition[] propDefs = new PropertyDefinition[pda.length];
         for (int i = 0; i < pda.length; i++) {
-            propDefs[i] = ntMgr.getPropertyDefinition(pda[i].getId());
+            propDefs[i] = ntMgr.getPropertyDefinition(pda[i]);
         }
         return propDefs;
     }
@@ -177,10 +170,10 @@
      * @see NodeDefinition#isMandatory
      */
     public NodeDefinition[] getMandatoryNodeDefinitions() {
-        NodeDef[] cnda = ent.getMandatoryNodeDefs();
+        QNodeDefinition[] cnda = ent.getMandatoryNodeDefs();
         NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
         for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i].getId());
+            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]);
         }
         return nodeDefs;
     }
@@ -204,19 +197,19 @@
     public NodeType[] getInheritedSupertypes() {
         // declared supertypes
         Name[] ntNames = ntd.getSupertypes();
-        HashSet declared = new HashSet();
-        for (int i = 0; i < ntNames.length; i++) {
-            declared.add(ntNames[i]);
+        Set<Name> declared = new HashSet<Name>();
+        for (Name ntName : ntNames) {
+            declared.add(ntName);
         }
         // all supertypes
         ntNames = ent.getInheritedNodeTypes();
 
         // filter from all supertypes those that are not declared
-        ArrayList inherited = new ArrayList();
-        for (int i = 0; i < ntNames.length; i++) {
-            if (!declared.contains(ntNames[i])) {
+        List<NodeType> inherited = new ArrayList<NodeType>();
+        for (Name ntName : ntNames) {
+            if (!declared.contains(ntName)) {
                 try {
-                    inherited.add(ntMgr.getNodeType(ntNames[i]));
+                    inherited.add(ntMgr.getNodeType(ntName));
                 } catch (NoSuchNodeTypeException e) {
                     // should never get here
                     log.error("undefined supertype", e);
@@ -225,81 +218,11 @@
             }
         }
 
-        return (NodeType[]) inherited.toArray(new NodeType[inherited.size()]);
+        return inherited.toArray(new NodeType[inherited.size()]);
     }
 
 
     //---------------------------------------------------< NodeTypeDefinition >
-    /**
-     * {@inheritDoc}
-     */
-    public String getName() {
-        try {
-            return resolver.getJCRName(ntd.getName());
-        } catch (NamespaceException e) {
-            // should never get here
-            log.error("encountered unregistered namespace in node type name", e);
-            return ntd.getName().toString();
-        }
-    }
-
-    /**
-     * Returns the names of the supertypes actually declared in this node type.
-     * <p/>
-     * In implementations that support node type registration, if this
-     * <code>NodeTypeDefinition</code> object is actually a newly-created empty
-     * <code>NodeTypeTemplate</code>, then this method will return an array
-     * containing a single string indicating the node type
-     * <code>nt:base</code>.
-     *
-     * @return an array of <code>String</code>s
-     * @since JCR 2.0
-     */
-    public String[] getDeclaredSupertypeNames() {
-        Name[] ntNames = ntd.getSupertypes();
-        String[] supertypes = new String[ntNames.length];
-        for (int i = 0; i < ntNames.length; i++) {
-            try {
-                supertypes[i] = resolver.getJCRName(ntNames[i]);
-            } catch (NamespaceException e) {
-                // should never get here
-                log.error("encountered unregistered namespace in node type name", e);
-                supertypes[i] = ntNames[i].toString();
-            }
-        }
-        return supertypes;
-    }
-
-    /**
-     * Returns <code>true</code> if this is an abstract node type; returns
-     * <code>false</code> otherwise.
-     * <p/>
-     * An abstract node type is one that cannot be assigned as the primary or
-     * mixin type of a node but can be used in the definitions of other node
-     * types as a superclass.
-     * <p/>
-     * In implementations that support node type registration, if this
-     * <code>NodeTypeDefinition</code> object is actually a newly-created empty
-     * <code>NodeTypeTemplate</code>, then this method will return
-     * <code>false</code>.
-     *
-     * @return a <code>boolean</code>
-     * @since JCR 2.0
-     */
-    public boolean isAbstract() {
-        return ntd.isAbstract();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isMixin() {
-        return ntd.isMixin();
-    }
-
-    public boolean isQueryable() {
-        return ntd.isQueryable();
-    }
 
     /**
      * {@inheritDoc}
@@ -308,72 +231,7 @@
         return ent.hasOrderableChildNodes();
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public String getPrimaryItemName() {
-        // TODO JCR-1947: JSR 283: Node Type Attribute Subtyping Rules
-        try {
-            Name piName = ntd.getPrimaryItemName();
-            if (piName != null) {
-                return resolver.getJCRName(piName);
-            } else {
-                return null;
-            }
-        } catch (NamespaceException e) {
-            // should never get here
-            log.error("encountered unregistered namespace in name of primary item", e);
-            return ntd.getName().toString();
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public NodeType[] getDeclaredSupertypes() {
-        Name[] ntNames = ntd.getSupertypes();
-        NodeType[] supertypes = new NodeType[ntNames.length];
-        for (int i = 0; i < ntNames.length; i++) {
-            try {
-                supertypes[i] = ntMgr.getNodeType(ntNames[i]);
-            } catch (NoSuchNodeTypeException e) {
-                // should never get here
-                log.error("undefined supertype", e);
-                return new NodeType[0];
-            }
-        }
-        return supertypes;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public NodeDefinition[] getDeclaredChildNodeDefinitions() {
-        NodeDef[] cnda = ntd.getChildNodeDefs();
-        NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
-        for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i].getId());
-        }
-        return nodeDefs;
-    }
-
     //-------------------------------------------------------------< NodeType >
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isNodeType(String nodeTypeName) {
-        Name ntName;
-        try {
-            ntName = resolver.getQName(nodeTypeName);
-        } catch (NamespaceException e) {
-            log.warn("invalid node type name: " + nodeTypeName, e);
-            return false;
-        } catch (NameException e) {
-            log.warn("invalid node type name: " + nodeTypeName, e);
-            return false;
-        }
-        return isNodeType(ntName);
-    }
 
     /**
      * {@inheritDoc}
@@ -397,10 +255,10 @@
      * {@inheritDoc}
      */
     public NodeDefinition[] getChildNodeDefinitions() {
-        NodeDef[] cnda = ent.getAllNodeDefs();
+        QNodeDefinition[] cnda = ent.getAllNodeDefs();
         NodeDefinition[] nodeDefs = new NodeDefinition[cnda.length];
         for (int i = 0; i < cnda.length; i++) {
-            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i].getId());
+            nodeDefs[i] = ntMgr.getNodeDefinition(cnda[i]);
         }
         return nodeDefs;
     }
@@ -409,10 +267,10 @@
      * {@inheritDoc}
      */
     public PropertyDefinition[] getPropertyDefinitions() {
-        PropDef[] pda = ent.getAllPropDefs();
+        QPropertyDefinition[] pda = ent.getAllPropDefs();
         PropertyDefinition[] propDefs = new PropertyDefinition[pda.length];
         for (int i = 0; i < pda.length; i++) {
-            propDefs[i] = ntMgr.getPropertyDefinition(pda[i].getId());
+            propDefs[i] = ntMgr.getPropertyDefinition(pda[i]);
         }
         return propDefs;
     }
@@ -427,7 +285,7 @@
         }
         try {
             Name name = resolver.getQName(propertyName);
-            PropDef def;
+            QPropertyDefinition def;
             try {
                 // try to get definition that matches the given value type
                 def = ent.getApplicablePropertyDef(name, value.getType(), false);
@@ -486,19 +344,19 @@
             Name name = resolver.getQName(propertyName);
             // determine type of values
             int type = PropertyType.UNDEFINED;
-            for (int i = 0; i < values.length; i++) {
-                if (values[i] == null) {
+            for (Value value : values) {
+                if (value == null) {
                     // skip null values as those would be purged
                     continue;
                 }
                 if (type == PropertyType.UNDEFINED) {
-                    type = values[i].getType();
-                } else if (type != values[i].getType()) {
+                    type = value.getType();
+                } else if (type != value.getType()) {
                     // inhomogeneous types
                     return false;
                 }
             }
-            PropDef def;
+            QPropertyDefinition def;
             try {
                 // try to get definition that matches the given value type
                 def = ent.getApplicablePropertyDef(name, type, true);
@@ -524,27 +382,25 @@
                 targetType = type;
             }
 
-            ArrayList list = new ArrayList();
+            List<InternalValue> list = new ArrayList<InternalValue>();
             // convert values and compact array (purge null entries)
-            for (int i = 0; i < values.length; i++) {
-                if (values[i] != null) {
+            for (Value value : values) {
+                if (value != null) {
                     // perform type conversion as necessary and create InternalValue
                     // from (converted) Value
                     InternalValue internalValue;
                     if (targetType != type) {
                         // type conversion required
-                        Value targetVal = ValueHelper.convert(
-                                values[i], targetType, valueFactory);
+                        Value targetVal = ValueHelper.convert(value, targetType, valueFactory);
                         internalValue = InternalValue.create(targetVal, resolver, store);
                     } else {
                         // no type conversion required
-                        internalValue = InternalValue.create(values[i], resolver, store);
+                        internalValue = InternalValue.create(value, resolver, store);
                     }
                     list.add(internalValue);
                 }
             }
-            InternalValue[] internalValues =
-                    (InternalValue[]) list.toArray(new InternalValue[list.size()]);
+            InternalValue[] internalValues = list.toArray(new InternalValue[list.size()]);
             EffectiveNodeType.checkSetPropertyValueConstraints(def, internalValues);
             return true;
         } catch (NameException be) {
@@ -603,18 +459,6 @@
         return false;
     }
 
-    /**
-     * {@inheritDoc}
-     */
-    public PropertyDefinition[] getDeclaredPropertyDefinitions() {
-        PropDef[] pda = ntd.getPropertyDefs();
-        PropertyDefinition[] propDefs = new PropertyDefinition[pda.length];
-        for (int i = 0; i < pda.length; i++) {
-            propDefs[i] = ntMgr.getPropertyDefinition(pda[i].getId());
-        }
-        return propDefs;
-    }
-
     //--------------------------------------------------< new JSR 283 methods >
     /**
      * Returns <code>true</code> if removing the child node called



Mime
View raw message