You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/04/23 00:33:58 UTC

svn commit: r164286 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java

Author: elecharny
Date: Fri Apr 22 15:33:57 2005
New Revision: 164286

URL: http://svn.apache.org/viewcvs?rev=164286&view=rev
Log:
Corrected the typo Heirarchy -> Hierarchy (JIRA DIREVE-153)

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java?rev=164286&r1=164285&r2=164286&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/db/jdbm/JdbmDatabase.java Fri Apr 22 15:33:57 2005
@@ -81,7 +81,7 @@
     /** the attribute existance index */
     private Index existanceIdx;
     /** the parent child relationship index */
-    private Index heirarchyIdx;
+    private Index hierarchyIdx;
     /** the one level scope alias index */
     private Index oneAliasIdx;
     /** the subtree scope alias index */
@@ -172,27 +172,27 @@
 
     
     /**
-     * @see org.apache.ldap.server.db.Database#getHeirarchyIndex()
+     * @see org.apache.ldap.server.db.Database#getHierarchyIndex()
      */
-    public Index getHeirarchyIndex() 
+    public Index getHierarchyIndex() 
     {
-        return heirarchyIdx;
+        return hierarchyIdx;
     }
     
 
     /**
      * @see Database#setExistanceIndexOn(AttributeType)
      */
-    public void setHeirarchyIndexOn( AttributeType attrType ) throws NamingException
+    public void setHierarchyIndexOn( AttributeType attrType ) throws NamingException
     {
-        if ( heirarchyIdx != null )
+        if ( hierarchyIdx != null )
         {
             NamingException e = new NamingException( "Index already set!" );
             throw e;
         }
 
-        heirarchyIdx = new JdbmIndex( attrType, wkdir );
-        sysIndices.put( attrType.getName().toLowerCase(), heirarchyIdx );
+        hierarchyIdx = new JdbmIndex( attrType, wkdir );
+        sysIndices.put( attrType.getName().toLowerCase(), hierarchyIdx );
     }
 
     
@@ -435,7 +435,7 @@
     public BigInteger getParentId( String dn ) throws NamingException
     {
         BigInteger childId = ndnIdx.forwardLookup( dn );
-        return ( BigInteger ) heirarchyIdx.reverseLookup( childId );
+        return ( BigInteger ) hierarchyIdx.reverseLookup( childId );
     }
 
 
@@ -444,7 +444,7 @@
      */
     public BigInteger getParentId( BigInteger childId ) throws NamingException
     {
-        return ( BigInteger ) heirarchyIdx.reverseLookup( childId );
+        return ( BigInteger ) hierarchyIdx.reverseLookup( childId );
     }
     
     
@@ -480,7 +480,7 @@
      * Removes the index entries for an alias before the entry is deleted from
      * the master table.
      * 
-     * @todo Optimize this by walking the heirarchy index instead of the name 
+     * @todo Optimize this by walking the hierarchy index instead of the name 
      * @param aliasId the id of the alias entry in the master table
      * @throws NamingException if we cannot delete the indices
      */
@@ -710,7 +710,7 @@
         
         ndnIdx.add( dn.toString(), id );
         updnIdx.add( updn, id );
-        heirarchyIdx.add( parentId, id );
+        hierarchyIdx.add( parentId, id );
         
         // Now work on the user defined indices
         NamingEnumeration list = entry.getIDs();
@@ -762,12 +762,12 @@
 
         ndnIdx.drop( id );
         updnIdx.drop( id );
-        heirarchyIdx.drop( id );
+        hierarchyIdx.drop( id );
         
         // Remove parent's reference to entry only if entry is not the upSuffix
         if ( ! parentId.equals( BigInteger.ZERO ) )
         {
-            heirarchyIdx.drop( parentId, id );
+            hierarchyIdx.drop( parentId, id );
         }
         
         while ( attrs.hasMore() ) 
@@ -797,7 +797,7 @@
      */
     public NamingEnumeration list( BigInteger id ) throws  NamingException
     {
-        return heirarchyIdx.listIndices( id );
+        return hierarchyIdx.listIndices( id );
     }
 
 
@@ -806,7 +806,7 @@
      */
     public int getChildCount( BigInteger id ) throws NamingException
     {
-        return heirarchyIdx.count( id );
+        return hierarchyIdx.count( id );
     }
 
 
@@ -847,7 +847,7 @@
         array.add( aliasIdx );
         array.add( oneAliasIdx );
         array.add( subAliasIdx );
-        array.add( heirarchyIdx );
+        array.add( hierarchyIdx );
         array.add( existanceIdx );
         
         Iterator list = array.iterator();
@@ -937,9 +937,9 @@
             array.add( subAliasIdx );
         }
 
-        if ( null != heirarchyIdx )
+        if ( null != hierarchyIdx )
         {
-            array.add( heirarchyIdx );
+            array.add( hierarchyIdx );
         }
 
         if ( null != existanceIdx )
@@ -1078,7 +1078,7 @@
 
         // Get all parent child mappings for this entry as the parent using the
         // key 'child' with many entries following it.
-        list = heirarchyIdx.listIndices( id );
+        list = hierarchyIdx.listIndices( id );
         while ( list.hasMore() ) 
         {
             IndexRecord rec = ( IndexRecord ) list.next();
@@ -1552,8 +1552,8 @@
          * Drop the old parent child relationship and add the new one
          * Set the new parent id for the child replacing the old parent id
          */
-        heirarchyIdx.drop( oldParentId, childId );
-        heirarchyIdx.add( newParentId, childId );
+        hierarchyIdx.drop( oldParentId, childId );
+        hierarchyIdx.add( newParentId, childId );
 
         /*
          * Build the new user provided DN (updn) for the child using the child's