directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r642677 - in /directory/sandbox/akarasulu/bigbang/apacheds: btree-base/src/main/java/org/apache/directory/server/xdbm/ core-constants/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/partit...
Date Sun, 30 Mar 2008 04:01:08 GMT
Author: akarasulu
Date: Sat Mar 29 21:01:06 2008
New Revision: 642677

URL: http://svn.apache.org/viewvc?rev=642677&view=rev
Log:
changes to xdbm, jdbm-store and various other things ...

 o renamed hierarchy index to onelevel
 o renamed existence index to presence
 o moved attributes in Oid.java to Store interface where they belong
 o removed this bogus Oid class in core-constants
 o changed schema for apache ds specific attributeTypes for these indices
 o various other minor cleanups
 o fixed failing test due to new index causing surprise 


Removed:
    directory/sandbox/akarasulu/bigbang/apacheds/core-constants/src/main/java/org/apache/directory/server/core/
Modified:
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/schema/apache.schema
    directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ScopeEvaluator.java

Modified: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/Store.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/Store.java
Sat Mar 29 21:01:06 2008
@@ -47,6 +47,23 @@
  */
 public interface Store<E>
 {
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.1) for apacheNdn op attrib */
+    String NDN = "1.3.6.1.4.1.18060.0.4.1.2.1";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.2) for apacheUpdn op attrib */
+    String UPDN = "1.3.6.1.4.1.18060.0.4.1.2.2";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.5) for apacheOneAlias index */
+    String ONEALIAS = "1.3.6.1.4.1.18060.0.4.1.2.5";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.6) for apacheSubAlias index */
+    String SUBALIAS = "1.3.6.1.4.1.18060.0.4.1.2.6";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.7) for apacheAlias index */
+    String ALIAS = "1.3.6.1.4.1.18060.0.4.1.2.7";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.43) for apacheSubLevel index*/
+    String SUBLEVEL = "1.3.6.1.4.1.18060.0.4.1.2.43";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.3) for apachePresence op attrib */
+    String PRESENCE = "1.3.6.1.4.1.18060.0.4.1.2.3";
+    /** Private OID (1.3.6.1.4.1.18060.0.4.1.2.4) for apacheOneLevel op attrib */
+    String ONELEVEL = "1.3.6.1.4.1.18060.0.4.1.2.4";
+
     /*
      * W H Y   H A V E   A   S T O R E   I N T E R F A C E  ?
      * ------------------------------------------------------
@@ -176,16 +193,22 @@
     void addIndex( Index index ) throws NamingException;
 
 
-    Index<String,E> getExistanceIndex();
+    Index<String,E> getPresenceIndex();
+
+
+    void setPresenceIndex( Index<String,E> index ) throws NamingException;
+
+
+    Index<Long,E> getOneLevelIndex();
 
 
-    void setExistanceIndex( Index<String,E> index ) throws NamingException;
+    void setOneLevelIndex( Index<Long,E> index ) throws NamingException;
 
 
-    Index<Long,E> getHierarchyIndex();
+    Index<Long,E> getSubLevelIndex();
 
 
-    void setHierarchyIndex( Index<Long,E> index ) throws NamingException;
+    void setSubLevelIndex( Index<Long,E> index ) throws NamingException;
 
 
     Index<String,E> getAliasIndex();

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Sat Mar 29 21:01:06 2008
@@ -36,7 +36,6 @@
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
-import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.gui.PartitionViewer;
 import org.apache.directory.server.schema.registries.Registries;
@@ -72,13 +71,13 @@
     static
     {
         Set<String> set = new HashSet<String>();
-        set.add( Oid.ALIAS );
-        set.add( Oid.EXISTANCE );
-        set.add( Oid.HIERARCHY );
-        set.add( Oid.NDN );
-        set.add( Oid.ONEALIAS );
-        set.add( Oid.SUBALIAS );
-        set.add( Oid.UPDN );
+        set.add( Store.ALIAS );
+        set.add( Store.PRESENCE );
+        set.add( Store.ONELEVEL );
+        set.add( Store.NDN );
+        set.add( Store.ONEALIAS );
+        set.add( Store.SUBALIAS );
+        set.add( Store.UPDN );
         SYS_INDEX_OIDS = Collections.unmodifiableSet( set );
     }
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Sat Mar 29 21:01:06 2008
@@ -29,7 +29,6 @@
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
-import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.core.partition.impl.btree.DefaultOptimizer;
@@ -38,6 +37,7 @@
 import org.apache.directory.server.core.partition.impl.btree.ExpressionEvaluator;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexNotFoundException;
+import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.core.partition.impl.btree.NoOpOptimizer;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationNotSupportedException;
@@ -200,31 +200,31 @@
             String oid = registries.getOidRegistry().getOid( index.getAttributeId() );
             if ( SYS_INDEX_OIDS.contains( registries.getOidRegistry().getOid( index.getAttributeId()
) ) )
             {
-                if ( oid.equals( Oid.ALIAS ) )
+                if ( oid.equals( Store.ALIAS ) )
                 {
                     store.setAliasIndex( index );
                 }
-                else if ( oid.equals( Oid.EXISTANCE ) )
+                else if ( oid.equals( Store.PRESENCE ) )
                 {
-                    store.setExistanceIndex( index );
+                    store.setPresenceIndex( index );
                 }
-                else if ( oid.equals( Oid.HIERARCHY ) )
+                else if ( oid.equals( Store.ONELEVEL ) )
                 {
-                    store.setHierarchyIndex( index );
+                    store.setOneLevelIndex( index );
                 }
-                else if ( oid.equals( Oid.NDN ) )
+                else if ( oid.equals( Store.NDN ) )
                 {
                     store.setNdnIndex( index );
                 }
-                else if ( oid.equals( Oid.ONEALIAS ) )
+                else if ( oid.equals( Store.ONEALIAS ) )
                 {
                     store.setOneAliasIndex( index );
                 }
-                else if ( oid.equals( Oid.SUBALIAS ) )
+                else if ( oid.equals( Store.SUBALIAS ) )
                 {
                     store.setSubAliasIndex( index );
                 }
-                else if ( oid.equals( Oid.UPDN ) )
+                else if ( oid.equals( Store.UPDN ) )
                 {
                     store.setUpdnIndex( index );
                 }
@@ -279,7 +279,7 @@
 
     public final Index getExistanceIndex()
     {
-        return store.getExistanceIndex();
+        return store.getPresenceIndex();
     }
 
 
@@ -287,14 +287,14 @@
     {
         if ( index instanceof JdbmIndex )
         {
-            store.setExistanceIndex( ( JdbmIndex ) index );
+            store.setPresenceIndex( ( JdbmIndex ) index );
         }
     }
 
 
     public final Index getHierarchyIndex()
     {
-        return store.getHierarchyIndex();
+        return store.getOneLevelIndex();
     }
 
 
@@ -302,7 +302,7 @@
     {
         if ( index instanceof JdbmIndex )
         {
-            store.setHierarchyIndex( ( JdbmIndex ) index );
+            store.setOneLevelIndex( ( JdbmIndex ) index );
         }
     }
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Sat Mar 29 21:01:06 2008
@@ -28,7 +28,6 @@
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerEntryUtils;
-import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.core.partition.impl.btree.*;
 import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
@@ -322,65 +321,65 @@
         if ( ndnIdx == null )
         {
             ndnIdx = new JdbmIndex<String,E>();
-            ndnIdx.setAttributeId( Oid.NDN );
-            systemIndices.put( Oid.NDN, ndnIdx );
-            ndnIdx.init( attributeTypeRegistry.lookup( Oid.NDN ), workingDirectory );
+            ndnIdx.setAttributeId( NDN );
+            systemIndices.put( NDN, ndnIdx );
+            ndnIdx.init( attributeTypeRegistry.lookup( NDN ), workingDirectory );
         }
 
         if ( updnIdx == null )
         {
             updnIdx = new JdbmIndex<String,E>();
-            updnIdx.setAttributeId( Oid.UPDN );
-            systemIndices.put( Oid.UPDN, updnIdx );
-            updnIdx.init( attributeTypeRegistry.lookup( Oid.UPDN ), workingDirectory );
+            updnIdx.setAttributeId( UPDN );
+            systemIndices.put( UPDN, updnIdx );
+            updnIdx.init( attributeTypeRegistry.lookup( UPDN ), workingDirectory );
         }
 
         if ( existanceIdx == null )
         {
             existanceIdx = new JdbmIndex<String,E>();
-            existanceIdx.setAttributeId( Oid.EXISTANCE );
-            systemIndices.put( Oid.EXISTANCE, existanceIdx );
-            existanceIdx.init( attributeTypeRegistry.lookup( Oid.EXISTANCE ), workingDirectory
);
+            existanceIdx.setAttributeId( PRESENCE );
+            systemIndices.put( PRESENCE, existanceIdx );
+            existanceIdx.init( attributeTypeRegistry.lookup( PRESENCE ), workingDirectory
);
         }
 
         if ( hierarchyIdx == null )
         {
             hierarchyIdx = new JdbmIndex<Long,E>();
-            hierarchyIdx.setAttributeId( Oid.HIERARCHY );
-            systemIndices.put( Oid.HIERARCHY, hierarchyIdx );
-            hierarchyIdx.init( attributeTypeRegistry.lookup( Oid.HIERARCHY ), workingDirectory
);
+            hierarchyIdx.setAttributeId( ONELEVEL );
+            systemIndices.put( ONELEVEL, hierarchyIdx );
+            hierarchyIdx.init( attributeTypeRegistry.lookup( ONELEVEL ), workingDirectory
);
         }
 
         if ( oneAliasIdx == null )
         {
             oneAliasIdx = new JdbmIndex<Long,E>();
-            oneAliasIdx.setAttributeId( Oid.ONEALIAS );
-            systemIndices.put( Oid.ONEALIAS, oneAliasIdx );
-            oneAliasIdx.init( attributeTypeRegistry.lookup( Oid.ONEALIAS ), workingDirectory
);
+            oneAliasIdx.setAttributeId( ONEALIAS );
+            systemIndices.put( ONEALIAS, oneAliasIdx );
+            oneAliasIdx.init( attributeTypeRegistry.lookup( ONEALIAS ), workingDirectory
);
         }
 
         if ( subAliasIdx == null )
         {
             subAliasIdx = new JdbmIndex<Long,E>();
-            subAliasIdx.setAttributeId( Oid.SUBALIAS );
-            systemIndices.put( Oid.SUBALIAS, subAliasIdx );
-            subAliasIdx.init( attributeTypeRegistry.lookup( Oid.SUBALIAS ), workingDirectory
);
+            subAliasIdx.setAttributeId( SUBALIAS );
+            systemIndices.put( SUBALIAS, subAliasIdx );
+            subAliasIdx.init( attributeTypeRegistry.lookup( SUBALIAS ), workingDirectory
);
         }
 
         if ( aliasIdx == null )
         {
             aliasIdx = new JdbmIndex<String,E>();
-            aliasIdx.setAttributeId( Oid.ALIAS );
-            systemIndices.put( Oid.ALIAS, aliasIdx );
-            aliasIdx.init( attributeTypeRegistry.lookup( Oid.ALIAS ), workingDirectory );
+            aliasIdx.setAttributeId( ALIAS );
+            systemIndices.put( ALIAS, aliasIdx );
+            aliasIdx.init( attributeTypeRegistry.lookup( ALIAS ), workingDirectory );
         }
         
         if ( subLevelIdx == null )
         {
             subLevelIdx = new JdbmIndex<Long, E>();
-            subLevelIdx.setAttributeId( Oid.SUBLEVEL );
-            systemIndices.put( Oid.SUBLEVEL, subLevelIdx );
-            subLevelIdx.init( attributeTypeRegistry.lookup( Oid.SUBLEVEL ), workingDirectory
);
+            subLevelIdx.setAttributeId( SUBLEVEL );
+            systemIndices.put( SUBLEVEL, subLevelIdx );
+            subLevelIdx.init( attributeTypeRegistry.lookup( SUBLEVEL ), workingDirectory
);
         }
     }
 
@@ -586,13 +585,13 @@
     }
 
 
-    public Index<String,E> getExistanceIndex()
+    public Index<String,E> getPresenceIndex()
     {
         return existanceIdx;
     }
 
 
-    public void setExistanceIndex( Index<String,E> index ) throws NamingException
+    public void setPresenceIndex( Index<String,E> index ) throws NamingException
     {
         protect( "existanceIndex" );
         existanceIdx = ( JdbmIndex<String,E> ) convertIndex( index );
@@ -600,13 +599,13 @@
     }
 
 
-    public Index<Long,E> getHierarchyIndex()
+    public Index<Long,E> getOneLevelIndex()
     {
         return hierarchyIdx;
     }
 
 
-    public void setHierarchyIndex( Index<Long,E> index ) throws NamingException
+    public void setOneLevelIndex( Index<Long,E> index ) throws NamingException
     {
         protect( "hierarchyIndex" );
         hierarchyIdx = ( JdbmIndex<Long,E> ) convertIndex( index );
@@ -1497,7 +1496,6 @@
 
     public void modify( LdapDN dn, ModificationOperation modOp, ServerEntry mods ) throws
Exception
     {
-        NamingEnumeration<String> attrs;
         Long id = getEntryId( dn.toString() );
         Attributes entry = master.get( id );
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Sat Mar 29 21:01:06 2008
@@ -149,13 +149,13 @@
         store.setContextEntry( new DefaultServerEntry( registries, new LdapDN() ) );
         assertNotNull( store.getContextEntry() );
 
-        assertNull( store.getExistanceIndex() );
-        store.setExistanceIndex( new JdbmIndex<String,Attributes>( "existence" ) );
-        assertNotNull( store.getExistanceIndex() );
-
-        assertNull( store.getHierarchyIndex() );
-        store.setHierarchyIndex( new JdbmIndex<Long,Attributes>( "hierarchy" ) );
-        assertNotNull( store.getHierarchyIndex() );
+        assertNull( store.getPresenceIndex() );
+        store.setPresenceIndex( new JdbmIndex<String,Attributes>( "existence" ) );
+        assertNotNull( store.getPresenceIndex() );
+
+        assertNull( store.getOneLevelIndex() );
+        store.setOneLevelIndex( new JdbmIndex<Long,Attributes>( "hierarchy" ) );
+        assertNotNull( store.getOneLevelIndex() );
 
         assertNull( store.getName() );
         store.setName( "foo" );
@@ -219,12 +219,12 @@
         try { store.setContextEntry( new DefaultServerEntry( registries, new LdapDN() ) );
fail(); }
         catch( IllegalStateException e ) {}
 
-        assertNotNull( store.getExistanceIndex() );
-        try { store.setExistanceIndex( new JdbmIndex<String,Attributes>( "existence"
) ); fail(); }
+        assertNotNull( store.getPresenceIndex() );
+        try { store.setPresenceIndex( new JdbmIndex<String,Attributes>( "existence"
) ); fail(); }
         catch( IllegalStateException e ) {}
 
-        assertNotNull( store.getHierarchyIndex() );
-        try { store.setHierarchyIndex( new JdbmIndex<Long,Attributes>( "hierarchy"
) ); fail(); }
+        assertNotNull( store.getOneLevelIndex() );
+        try { store.setOneLevelIndex( new JdbmIndex<Long,Attributes>( "hierarchy" )
); fail(); }
         catch( IllegalStateException e ) {}
 
         assertNotNull( store.getName() );
@@ -251,7 +251,7 @@
         try { store.setUpdnIndex( new JdbmIndex<String,Attributes>( "updn" ) ); fail();
}
         catch( IllegalStateException e ) {}
         Iterator<String> systemIndices = store.systemIndices();
-        for ( int ii = 0; ii < 7; ii++ )
+        for ( int ii = 0; ii < 8; ii++ )
         {
             assertTrue( systemIndices.hasNext() );
             assertNotNull( systemIndices.next() );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/schema/apache.schema
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/schema/apache.schema?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/schema/apache.schema
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/schema-bootstrap/src/main/schema/apache.schema
Sat Mar 29 21:01:06 2008
@@ -33,7 +33,7 @@
     NO-USER-MODIFICATION
     USAGE dSAOperation )
 
-attributetype ( 1.3.6.1.4.1.18060.0.4.1.2.3 NAME 'apacheExistance'
+attributetype ( 1.3.6.1.4.1.18060.0.4.1.2.3 NAME 'apachePresence'
     DESC 'Index attribute used to track the existence of attributes'
     SUP name
     EQUALITY caseIgnoreMatch
@@ -41,7 +41,7 @@
     NO-USER-MODIFICATION
     USAGE dSAOperation )
 
-attributetype ( 1.3.6.1.4.1.18060.0.4.1.2.4 NAME 'apacheHierarchy'
+attributetype ( 1.3.6.1.4.1.18060.0.4.1.2.4 NAME 'apacheOneLevel'
     DESC 'Index attribute used to track the DIT hierarchy'
     EQUALITY integerMatch
     SYNTAX 1.3.6.1.4.1.1466.115.121.1.27

Modified: directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/DIRSERVER951ITest.java
Sat Mar 29 21:01:06 2008
@@ -22,8 +22,8 @@
 
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.core.partition.Oid;
 import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.unit.AbstractServerTest;
@@ -78,13 +78,13 @@
 
         // Add indexed attributes for system partition
         Set<Index> indexedAttrs = new HashSet<Index>();
-        indexedAttrs.add( new JdbmIndex( Oid.ALIAS ) );
-        indexedAttrs.add( new JdbmIndex( Oid.EXISTANCE ) );
-        indexedAttrs.add( new JdbmIndex( Oid.HIERARCHY ) );
-        indexedAttrs.add( new JdbmIndex( Oid.NDN ) );
-        indexedAttrs.add( new JdbmIndex( Oid.ONEALIAS ) );
-        indexedAttrs.add( new JdbmIndex( Oid.SUBALIAS ) );
-        indexedAttrs.add( new JdbmIndex( Oid.UPDN ) );
+        indexedAttrs.add( new JdbmIndex( Store.ALIAS ) );
+        indexedAttrs.add( new JdbmIndex( Store.PRESENCE ) );
+        indexedAttrs.add( new JdbmIndex( Store.ONELEVEL ) );
+        indexedAttrs.add( new JdbmIndex( Store.NDN ) );
+        indexedAttrs.add( new JdbmIndex( Store.ONEALIAS ) );
+        indexedAttrs.add( new JdbmIndex( Store.SUBALIAS ) );
+        indexedAttrs.add( new JdbmIndex( Store.UPDN ) );
         indexedAttrs.add( new JdbmIndex( "objectClass" ) );
         indexedAttrs.add( new JdbmIndex( "ou" ) );
         systemCfg.setIndexedAttributes( indexedAttrs );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
Sat Mar 29 21:01:06 2008
@@ -319,7 +319,7 @@
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
-            Index<String,E> idx = db.getExistanceIndex();
+            Index<String,E> idx = db.getPresenceIndex();
             return idx.count( node.getAttribute() );
         }
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
Sat Mar 29 21:01:06 2008
@@ -53,7 +53,7 @@
 
         if ( db.hasUserIndexOn( type.getOid() ) )
         {
-            existenceCursor = db.getExistanceIndex().forwardCursor( type.getOid() );
+            existenceCursor = db.getPresenceIndex().forwardCursor( type.getOid() );
             ndnCursor = null;
         }
         else

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
Sat Mar 29 21:01:06 2008
@@ -59,7 +59,7 @@
 
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
-            idx = db.getExistanceIndex();
+            idx = db.getPresenceIndex();
         }
         else
         {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ScopeEvaluator.java?rev=642677&r1=642676&r2=642677&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ScopeEvaluator.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ScopeEvaluator.java
Sat Mar 29 21:01:06 2008
@@ -163,7 +163,7 @@
     {
         AliasDerefMode mode = node.getDerefAliases();
         Long baseId = db.getEntryId( node.getBaseDn() );
-        Index<Long,E> idx = db.getHierarchyIndex();
+        Index<Long,E> idx = db.getOneLevelIndex();
         boolean isChild = idx.has( baseId, id );
 
         /*



Mime
View raw message