jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r813757 - in /jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: nodetype/NodeTypeRegistry.java state/NodeState.java
Date Fri, 11 Sep 2009 10:15:41 GMT
Author: mreutegg
Date: Fri Sep 11 10:15:40 2009
New Revision: 813757

URL: http://svn.apache.org/viewvc?rev=813757&view=rev
Log:
JCR-2170: Remove PropDefId and NodeDefId
- more DefId clean up

Modified:
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java?rev=813757&r1=813756&r2=813757&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.java
Fri Sep 11 10:15:40 2009
@@ -92,11 +92,6 @@
     // definition of the root node
     private final QNodeDefinition rootNodeDef;
 
-    // map of id's and property definitions
-    private final Map<PropDefId, QPropertyDefinition> propDefs;
-    // map of id's and node definitions
-    private final Map<NodeDefId, QNodeDefinition> nodeDefs;
-
     /**
      * namespace registry for resolving prefixes and namespace URI's;
      * used for (de)serializing node type definitions
@@ -559,14 +554,6 @@
     }
 
     /**
-     * @param id node def id
-     * @return the node definition for the given id.
-     */
-    public QNodeDefinition getNodeDef(NodeDefId id) {
-        return nodeDefs.get(id);
-    }
-
-    /**
      * Add a <code>NodeTypeRegistryListener</code>
      *
      * @param listener the new listener to be informed on (un)registration
@@ -733,12 +720,9 @@
         // for the old one)
         entCache = new BitsetENTCacheImpl();
         registeredNTDefs = new ConcurrentReaderHashMap();
-        propDefs = new ConcurrentReaderHashMap();
-        nodeDefs = new ConcurrentReaderHashMap();
 
         // setup definition of root node
         rootNodeDef = createRootNodeDef();
-        nodeDefs.put(new NodeDefId(rootNodeDef), rootNodeDef);
 
         // load and register pre-defined (i.e. built-in) node types
         builtInNTDefs = new NodeTypeDefStore();
@@ -1216,16 +1200,6 @@
         ntd = (NodeTypeDef) ntd.clone();
         registeredNTDefs.put(name, ntd);
 
-        // store property & child node definitions of new node type by id
-        QPropertyDefinition[] pda = ntd.getPropertyDefs();
-        for (QPropertyDefinition aPda : pda) {
-            propDefs.put(new PropDefId(aPda), aPda);
-        }
-        QNodeDefinition[] nda = ntd.getChildNodeDefs();
-        for (QNodeDefinition aNda : nda) {
-            nodeDefs.put(new NodeDefId(aNda), aNda);
-        }
-
         return ent;
     }
 
@@ -1301,15 +1275,6 @@
             // register clone of node type definition
             ntd = (NodeTypeDef) ntd.clone();
             registeredNTDefs.put(ntd.getName(), ntd);
-            // store property & child node definitions of new node type by id
-            QPropertyDefinition[] pda = ntd.getPropertyDefs();
-            for (QPropertyDefinition aPda : pda) {
-                propDefs.put(new PropDefId(aPda), aPda);
-            }
-            QNodeDefinition[] nda = ntd.getChildNodeDefs();
-            for (QNodeDefinition aNda : nda) {
-                nodeDefs.put(new NodeDefId(aNda), aNda);
-            }
         }
 
         // finally add newly created effective node types to entCache
@@ -1323,16 +1288,6 @@
         }
         registeredNTDefs.remove(name);
         entCache.invalidate(name);
-
-        // remove property & child node definitions
-        QPropertyDefinition[] pda = ntd.getPropertyDefs();
-        for (QPropertyDefinition aPda : pda) {
-            propDefs.remove(new PropDefId(aPda));
-        }
-        QNodeDefinition[] nda = ntd.getChildNodeDefs();
-        for (QNodeDefinition aNda : nda) {
-            nodeDefs.remove(new NodeDefId(aNda));
-        }
     }
 
     private void internalUnregister(Collection<Name> ntNames)

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java?rev=813757&r1=813756&r2=813757&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
Fri Sep 11 10:15:40 2009
@@ -18,9 +18,7 @@
 
 import org.apache.jackrabbit.core.id.ItemId;
 import org.apache.jackrabbit.core.id.NodeId;
-import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.spi.Name;
-import org.apache.jackrabbit.spi.QNodeDefinition;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -57,16 +55,6 @@
     private NodeId parentId;
 
     /**
-     * id of this node's definition
-     */
-    private NodeDefId defId;
-
-    /**
-     * this node's definition
-     */
-    private QNodeDefinition def;
-
-    /**
      * insertion-ordered collection of ChildNodeEntry objects
      */
     private ChildNodeEntries childNodeEntries = new ChildNodeEntries();
@@ -133,7 +121,6 @@
             parentId = nodeState.parentId;
             nodeTypeName = nodeState.nodeTypeName;
             mixinTypeNames = (NameSet) nodeState.mixinTypeNames.clone();
-            defId = nodeState.defId;
             propertyNames = (NameSet) nodeState.propertyNames.clone();
             childNodeEntries = (ChildNodeEntries) nodeState.childNodeEntries.clone();
             if (syncModCount) {



Mime
View raw message