directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r895627 - in /directory: apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ apacheds...
Date Mon, 04 Jan 2010 13:58:35 GMT
Author: elecharny
Date: Mon Jan  4 13:58:21 2010
New Revision: 895627

URL: http://svn.apache.org/viewvc?rev=895627&view=rev
Log:
Renamed AttributeTypeAndValue to AVA (plus some other related renaming)

Added:
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java
      - copied, changed from r895576, directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
      - copied, changed from r895576, directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AtavSerializer.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java
      - copied, changed from r895576, directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValueTest.java
Removed:
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AtavSerializer.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValueTest.java
Modified:
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
    directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnSerializer.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java Mon Jan  4 13:58:21 2010
@@ -53,7 +53,7 @@
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -1375,7 +1375,7 @@
          * new Rdn attribute within this entry.
          */
 
-        for ( AttributeTypeAndValue newAtav : newRdn )
+        for ( AVA newAtav : newRdn )
         {
             String newNormType = newAtav.getNormType();
             String newNormValue = newAtav.getNormValue().getString();
@@ -1431,12 +1431,12 @@
         if ( deleteOldRdn )
         {
             Rdn oldRdn = updn.getRdn();
-            for ( AttributeTypeAndValue oldAtav : oldRdn )
+            for ( AVA oldAtav : oldRdn )
             {
                 // check if the new ATAV is part of the old Rdn
                 // if that is the case we do not remove the ATAV
                 boolean mustRemove = true;
-                for ( AttributeTypeAndValue newAtav : newRdn )
+                for ( AVA newAtav : newRdn )
                 {
                     if ( oldAtav.equals( newAtav ) )
                     {

Modified: directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Mon Jan  4 13:58:21 2010
@@ -84,7 +84,7 @@
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -811,7 +811,7 @@
         }
         else
         {
-            for ( AttributeTypeAndValue atav : rdn )
+            for ( AVA atav : rdn )
             {
                 serverEntry.put( atav.getUpType(), atav.getNormValue().getString() );
             }

Modified: directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Mon Jan  4 13:58:21 2010
@@ -67,7 +67,7 @@
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -511,9 +511,9 @@
         }
         else
         {
-            for ( Iterator<AttributeTypeAndValue> ii = rdn.iterator(); ii.hasNext(); /**/)
+            for ( Iterator<AVA> ii = rdn.iterator(); ii.hasNext(); /**/)
             {
-                AttributeTypeAndValue atav = ii.next();
+                AVA atav = ii.next();
 
                 // Add the Rdn attribute
                 boolean doRdnPut = attributes.get( atav.getNormType() ) == null;

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java Mon Jan  4 13:58:21 2010
@@ -47,7 +47,7 @@
 import org.apache.directory.shared.ldap.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.filter.ExprNode;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 import org.apache.directory.shared.ldap.name.Rdn;
@@ -356,7 +356,7 @@
         Rdn rdn = dn.getRdn();
 
         // Loop on all the AVAs
-        for ( AttributeTypeAndValue ava : rdn )
+        for ( AVA ava : rdn )
         {
             String value = ava.getNormValue().getString();
             String upValue = ava.getUpValue().getString();

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Mon Jan  4 13:58:21 2010
@@ -56,7 +56,7 @@
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -574,9 +574,9 @@
             // below we only process multi-valued rdns
             StringBuffer buf = new StringBuffer();
         
-            for ( Iterator<AttributeTypeAndValue> atavs = rdn.iterator(); atavs.hasNext(); /**/ )
+            for ( Iterator<AVA> atavs = rdn.iterator(); atavs.hasNext(); /**/ )
             {
-                AttributeTypeAndValue atav = atavs.next();
+                AVA atav = atavs.next();
                 String type = schemaManager.lookupAttributeTypeRegistry( rdn.getNormType() ).getName();
                 buf.append( type ).append( '=' ).append( atav.getNormValue() );
                 

Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Mon Jan  4 13:58:21 2010
@@ -87,7 +87,7 @@
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.CascadeControl;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -1125,13 +1125,13 @@
             // Delete the old RDN means we remove some attributes and values.
             // We must make sure that after this operation all must attributes
             // are still present in the entry.
-            for ( AttributeTypeAndValue atav : oldRDN )
+            for ( AVA atav : oldRDN )
             {
                 AttributeType type = schemaManager.lookupAttributeTypeRegistry( atav.getUpType() );
                 tmpEntry.remove( type, atav.getUpValue() );
             }
             
-            for ( AttributeTypeAndValue atav : newRdn )
+            for ( AVA atav : newRdn )
             {
                 AttributeType type = schemaManager.lookupAttributeTypeRegistry( atav.getUpType() );
 
@@ -1147,7 +1147,7 @@
             check( opContext.getNewDn(), tmpEntry );
 
             // Check that no operational attributes are removed
-            for ( AttributeTypeAndValue atav : oldRDN )
+            for ( AVA atav : oldRDN )
             {
                 AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( atav.getUpType() );
 
@@ -1942,7 +1942,7 @@
     
     private void assertRdn( LdapDN dn, ServerEntry entry ) throws Exception
     {
-        for ( AttributeTypeAndValue atav : dn.getRdn() )
+        for ( AVA atav : dn.getRdn() )
         {
             EntryAttribute attribute = entry.get( atav.getNormType() );
             

Modified: directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/branches/apacheds-schema/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Mon Jan  4 13:58:21 2010
@@ -58,7 +58,7 @@
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -1765,7 +1765,7 @@
          * new Rdn attribute within this entry.
          */
 
-        for ( AttributeTypeAndValue newAtav : newRdn )
+        for ( AVA newAtav : newRdn )
         {
             String newNormType = newAtav.getNormType();
             String newNormValue = newAtav.getNormValue().getString();
@@ -1821,12 +1821,12 @@
         if ( deleteOldRdn )
         {
             Rdn oldRdn = updn.getRdn();
-            for ( AttributeTypeAndValue oldAtav : oldRdn )
+            for ( AVA oldAtav : oldRdn )
             {
                 // check if the new ATAV is part of the old Rdn
                 // if that is the case we do not remove the ATAV
                 boolean mustRemove = true;
-                for ( AttributeTypeAndValue newAtav : newRdn )
+                for ( AVA newAtav : newRdn )
                 {
                     if ( oldAtav.equals( newAtav ) )
                     {

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java Mon Jan  4 13:58:21 2010
@@ -34,7 +34,7 @@
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -341,7 +341,7 @@
         // been renamed
         restored.setDn( parentDn );
 
-        for ( AttributeTypeAndValue ava:newRdn )
+        for ( AVA ava:newRdn )
         {
             // No need to add something which has already been added
             // in the previous modification
@@ -485,7 +485,7 @@
                 
                 // Does it overlap ?
                 // Is the new RDN AVAs contained into the entry?
-                for ( AttributeTypeAndValue atav:newRdn )
+                for ( AVA atav:newRdn )
                 {
                     if ( atav.equals( oldRdn.getAtav() ) )
                     {
@@ -558,17 +558,17 @@
                 boolean overlapping = false;
                 boolean existInEntry = false;
                 
-                Set<AttributeTypeAndValue> oldAtavs = new HashSet<AttributeTypeAndValue>();
+                Set<AVA> oldAtavs = new HashSet<AVA>();
 
                 // We first build a set with all the oldRDN ATAVs 
-                for ( AttributeTypeAndValue atav:oldRdn )
+                for ( AVA atav:oldRdn )
                 {
                     oldAtavs.add( atav );
                 }
                 
                 // Now we loop on the newRDN ATAVs to evaluate if the Rdns are overlaping
                 // and if the newRdn ATAVs are present in the entry
-                for ( AttributeTypeAndValue atav:newRdn )
+                for ( AVA atav:newRdn )
                 {
                     if ( oldAtavs.contains( atav ) )
                     {

Copied: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java (from r895576, directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java?p2=directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java&p1=directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java&r1=895576&r2=895627&rev=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java Mon Jan  4 13:58:21 2010
@@ -52,7 +52,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AttributeTypeAndValue implements Cloneable, Comparable, Externalizable
+public class AVA implements Cloneable, Comparable, Externalizable
 {
     /**
      * Declares the Serial Version Uid.
@@ -64,7 +64,7 @@
     private static final long serialVersionUID = 1L;
 
     /** The LoggerFactory used by this class */
-    private static Logger LOG = LoggerFactory.getLogger( AttributeTypeAndValue.class );
+    private static Logger LOG = LoggerFactory.getLogger( AVA.class );
 
     /** The normalized Name type */
     private String normType;
@@ -97,7 +97,7 @@
     /**
      * Construct an empty AttributeTypeAndValue
      */
-    public AttributeTypeAndValue()
+    public AVA()
     {
         normType = null;
         upType = null;
@@ -122,7 +122,7 @@
      * @param upValue The User Provided value
      * @param normValue The normalized value
      */
-    public AttributeTypeAndValue( String upType, String normType, String upValue, String normValue ) throws InvalidNameException
+    public AVA( String upType, String normType, String upValue, String normValue ) throws InvalidNameException
     {
         this( upType, normType, new ClientStringValue( upValue ), new ClientStringValue( normValue ) );
     }
@@ -143,7 +143,7 @@
      * @param upValue The User Provided value
      * @param normValue The normalized value
      */
-    public AttributeTypeAndValue( String upType, String normType, byte[] upValue, byte[] normValue ) throws InvalidNameException
+    public AVA( String upType, String normType, byte[] upValue, byte[] normValue ) throws InvalidNameException
     {
         this( upType, normType, new ClientBinaryValue( upValue ), new ClientBinaryValue( normValue ) );
     }
@@ -162,7 +162,7 @@
      * @param upValue The User Provided value
      * @param normValue The normalized value
      */
-    public AttributeTypeAndValue( String upType, String normType, Value<?> upValue, Value<?> normValue ) throws InvalidNameException
+    public AVA( String upType, String normType, Value<?> upValue, Value<?> normValue ) throws InvalidNameException
     {
         String upTypeTrimmed = StringTools.trim( upType );
         String normTypeTrimmed = StringTools.trim( normType );
@@ -218,7 +218,7 @@
      * @param normValue The normalized value
      * @param upName The User Provided name (may be escaped)
      */
-    public AttributeTypeAndValue( String upType, String normType, Value<?> upValue, Value<?> normValue, String upName )
+    public AVA( String upType, String normType, Value<?> upValue, Value<?> normValue, String upName )
         throws InvalidNameException
     {
         String upTypeTrimmed = StringTools.trim( upType );
@@ -277,7 +277,7 @@
      * @param length Length of this ATAV
      * @param upName The user provided name
      */
-    /**No protection*/ AttributeTypeAndValue( 
+    AVA( 
                             String upType, 
                             String normType, 
                             Value<?> upValue, 
@@ -516,9 +516,9 @@
      */
     public int compareTo( Object object )
     {
-        if ( object instanceof AttributeTypeAndValue )
+        if ( object instanceof AVA )
         {
-            AttributeTypeAndValue nc = ( AttributeTypeAndValue ) object;
+            AVA nc = ( AVA ) object;
 
             int res = compareType( normType, nc.normType );
 
@@ -550,9 +550,9 @@
      */
     public int compareToIgnoreCase( Object object )
     {
-        if ( object instanceof AttributeTypeAndValue )
+        if ( object instanceof AVA )
         {
-            AttributeTypeAndValue nc = ( AttributeTypeAndValue ) object;
+            AVA nc = ( AVA ) object;
 
             int res = compareType( normType, nc.normType );
 
@@ -795,12 +795,12 @@
             return true;
         }
         
-        if ( !( obj instanceof AttributeTypeAndValue ) )
+        if ( !( obj instanceof AVA ) )
         {
             return false;
         }
         
-        AttributeTypeAndValue instance = (AttributeTypeAndValue)obj;
+        AVA instance = (AVA)obj;
      
         // Compare the type
         if ( normType == null )
@@ -927,7 +927,7 @@
      * @see Externalizable#readExternal(ObjectInput)
      * 
      * We read back the data to create a new ATAV. The structure 
-     * read is exposed in the {@link AttributeTypeAndValue#writeExternal(ObjectOutput)} 
+     * read is exposed in the {@link AVA#writeExternal(ObjectOutput)} 
      * method<p>
      */
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException

Copied: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java (from r895576, directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AtavSerializer.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java?p2=directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java&p1=directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AtavSerializer.java&r1=895576&r2=895627&rev=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AtavSerializer.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java Mon Jan  4 13:58:21 2010
@@ -36,10 +36,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AtavSerializer
+public class AVASerializer
 {
     /** The LoggerFactory used by this class */
-    protected static final Logger LOG = LoggerFactory.getLogger( AtavSerializer.class );
+    protected static final Logger LOG = LoggerFactory.getLogger( AVASerializer.class );
 
     /**
      * Serialize an AttributeTypeAndValue object.
@@ -68,7 +68,7 @@
      * @param out the OutputStream in which the atav will be serialized
      * @throws IOException If we can't serialize the atav
      */
-    public static void serialize( AttributeTypeAndValue atav, ObjectOutput out ) throws IOException
+    public static void serialize( AVA atav, ObjectOutput out ) throws IOException
     {
         if ( StringTools.isEmpty( atav.getUpName() ) || 
              StringTools.isEmpty( atav.getUpType() ) ||
@@ -142,14 +142,14 @@
      * Deserialize an AttributeTypeAndValue object
      * 
      * We read back the data to create a new ATAV. The structure 
-     * read is exposed in the {@link AttributeTypeAndValue#writeExternal(ObjectOutput)} 
+     * read is exposed in the {@link AVA#writeExternal(ObjectOutput)} 
      * method<p>
      * 
      * @param in the input stream
      * @throws IOException If the input stream can't be read
      * @return The constructed AttributeTypeAndValue
      */
-    public static AttributeTypeAndValue deserialize( ObjectInput in ) throws IOException
+    public static AVA deserialize( ObjectInput in ) throws IOException
     {
         String upName = in.readUTF();
         int start = in.readInt();
@@ -163,8 +163,8 @@
         {
             Value<String> upValue = new ClientStringValue( in.readUTF() );
             Value<String> normValue = new ClientStringValue( in.readUTF() );
-            AttributeTypeAndValue atav = 
-                new AttributeTypeAndValue( upType, normType, upValue, normValue, start, length, upName );
+            AVA atav = 
+                new AVA( upType, normType, upValue, normValue, start, length, upName );
             
             return atav;
         }
@@ -178,8 +178,8 @@
             byte[] normValue = new byte[valueLength];
             in.readFully( normValue );
 
-            AttributeTypeAndValue atav = 
-                new AttributeTypeAndValue( upType, normType, 
+            AVA atav = 
+                new AVA( upType, normType, 
                     new ClientBinaryValue( upValue) , 
                     new ClientBinaryValue( normValue ), start, length, upName );
             

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java Mon Jan  4 13:58:21 2010
@@ -176,7 +176,7 @@
 
         String upName = name.substring( rdnStart, pos.start );
 
-        AttributeTypeAndValue ava = new AttributeTypeAndValue( type, type, new ClientStringValue( upValue ),
+        AVA ava = new AVA( type, type, new ClientStringValue( upValue ),
             new ClientStringValue( value ), upName );
         rdn.addAttributeTypeAndValue( ava );
 

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Mon Jan  4 13:58:21 2010
@@ -1444,7 +1444,7 @@
     }
 
 
-    private static AttributeTypeAndValue atavOidToName( AttributeTypeAndValue atav, Map<String, OidNormalizer> oidsMap )
+    private static AVA atavOidToName( AVA atav, Map<String, OidNormalizer> oidsMap )
         throws InvalidNameException, NamingException
     {
         String type = StringTools.trim( atav.getNormType() );
@@ -1466,7 +1466,7 @@
 
                 if ( oidNormalizer != null )
                 {
-                    return new AttributeTypeAndValue( 
+                    return new AVA( 
                         atav.getUpType(), 
                         oidNormalizer.getAttributeTypeOid(), 
                         atav.getUpValue(),
@@ -1507,7 +1507,7 @@
         String normStringValue = DefaultStringNormalizer.normalizeString( ( String ) upValue );
         String normValue = oidNormalizer.getNormalizer().normalize( normStringValue );
 
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( upType, oidNormalizer.getAttributeTypeOid(),
+        AVA atav = new AVA( upType, oidNormalizer.getAttributeTypeOid(),
             new ClientStringValue( upValue ), new ClientStringValue( normValue ), upName );
         rdn.addAttributeTypeAndValue( atav );
     }
@@ -1532,9 +1532,9 @@
             Rdn rdnCopy = ( Rdn ) rdn.clone();
             rdn.clear();
 
-            for ( AttributeTypeAndValue val:rdnCopy )
+            for ( AVA val:rdnCopy )
             {
-                AttributeTypeAndValue newAtav = atavOidToName( val, oidsMap );
+                AVA newAtav = atavOidToName( val, oidsMap );
                 rdn.addAttributeTypeAndValue( newAtav );
             }
 

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java Mon Jan  4 13:58:21 2010
@@ -108,7 +108,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class Rdn implements Cloneable, Comparable, Externalizable, Iterable<AttributeTypeAndValue>
+public class Rdn implements Cloneable, Comparable, Externalizable, Iterable<AVA>
 {
     /** The LoggerFactory used by this class */
     protected static final Logger LOG = LoggerFactory.getLogger( Rdn.class );
@@ -141,7 +141,7 @@
      * because we want the ATAVs to be sorted. An atav may contain more than one
      * value. In this case, the values are String stored in a List.
      */
-    private Set<AttributeTypeAndValue> atavs = null;
+    private Set<AVA> atavs = null;
 
     /**
      * We also keep a set of types, in order to use manipulations. A type is
@@ -163,7 +163,7 @@
      * case where we only have a single type=value. This will be 99.99% the
      * case. This avoids the creation of a HashMap.
      */
-    protected AttributeTypeAndValue atav = null;
+    protected AVA atav = null;
 
     /**
      * The number of atavs. We store this number here to avoid complex
@@ -313,17 +313,17 @@
                 return;
 
             case 1:
-                this.atav = ( AttributeTypeAndValue ) rdn.atav.clone();
+                this.atav = ( AVA ) rdn.atav.clone();
                 return;
 
             default:
                 // We must duplicate the treeSet and the hashMap
-                atavs = new TreeSet<AttributeTypeAndValue>();
+                atavs = new TreeSet<AVA>();
                 atavTypes = new MultiValueMap();
 
-                for ( AttributeTypeAndValue currentAtav : rdn.atavs )
+                for ( AVA currentAtav : rdn.atavs )
                 {
-                    atavs.add( ( AttributeTypeAndValue ) currentAtav.clone() );
+                    atavs.add( ( AVA ) currentAtav.clone() );
                     atavTypes.put( currentAtav.getNormType(), currentAtav );
                 }
 
@@ -370,7 +370,7 @@
 
                 boolean isFirst = true;
 
-                for ( AttributeTypeAndValue ata : atavs )
+                for ( AVA ata : atavs )
                 {
                     if ( isFirst )
                     {
@@ -438,7 +438,7 @@
         {
             case 0:
                 // This is the first AttributeTypeAndValue. Just stores it.
-                atav = new AttributeTypeAndValue( upType, type, upValue, normalizedValue );
+                atav = new AVA( upType, type, upValue, normalizedValue );
                 nbAtavs = 1;
                 atavType = normalizedType;
                 return;
@@ -447,7 +447,7 @@
                 // We already have an atav. We have to put it in the HashMap
                 // before adding a new one.
                 // First, create the HashMap,
-                atavs = new TreeSet<AttributeTypeAndValue>();
+                atavs = new TreeSet<AVA>();
 
                 // and store the existing AttributeTypeAndValue into it.
                 atavs.add( atav );
@@ -461,7 +461,7 @@
 
             default:
                 // add a new AttributeTypeAndValue
-                AttributeTypeAndValue newAtav = new AttributeTypeAndValue( upType, type, upValue, normalizedValue );
+                AVA newAtav = new AVA( upType, type, upValue, normalizedValue );
                 atavs.add( newAtav );
                 atavTypes.put( normalizedType, newAtav );
 
@@ -482,7 +482,7 @@
     // from outside this package.
     @SuppressWarnings(
         { "unchecked" })
-    /* Unspecified protection */void addAttributeTypeAndValue( AttributeTypeAndValue value )
+    /* Unspecified protection */void addAttributeTypeAndValue( AVA value )
     {
         String normalizedType = value.getNormType();
 
@@ -499,7 +499,7 @@
                 // We already have an atav. We have to put it in the HashMap
                 // before adding a new one.
                 // First, create the HashMap,
-                atavs = new TreeSet<AttributeTypeAndValue>();
+                atavs = new TreeSet<AVA>();
 
                 // and store the existing AttributeTypeAndValue into it.
                 atavs.add( atav );
@@ -570,11 +570,11 @@
             default:
                 if ( atavTypes.containsKey( normalizedType ) )
                 {
-                    Collection<AttributeTypeAndValue> atavList = ( Collection<AttributeTypeAndValue> ) atavTypes.get( normalizedType );
+                    Collection<AVA> atavList = ( Collection<AVA> ) atavTypes.get( normalizedType );
                     StringBuffer sb = new StringBuffer();
                     boolean isFirst = true;
 
-                    for ( AttributeTypeAndValue elem : atavList )
+                    for ( AVA elem : atavList )
                     {
                         if ( isFirst )
                         {
@@ -627,7 +627,7 @@
      *            The type of the NameArgument to be returned
      * @return The AttributeTypeAndValue, of null if none is found.
      */
-    public AttributeTypeAndValue getAttributeTypeAndValue( String type )
+    public AVA getAttributeTypeAndValue( String type )
     {
         // First, let's normalize the type
         String normalizedType = StringTools.lowerCaseAscii( StringTools.trim( type ) );
@@ -648,7 +648,7 @@
             default:
                 if ( atavTypes.containsKey( normalizedType ) )
                 {
-                    Collection<AttributeTypeAndValue> atavList = ( Collection<AttributeTypeAndValue> ) atavTypes.get( normalizedType );
+                    Collection<AVA> atavList = ( Collection<AVA> ) atavTypes.get( normalizedType );
                     return atavList.iterator().next();
                 }
 
@@ -664,11 +664,11 @@
      *
      * @return an iterator of the components of this RDN, each an AttributeTypeAndValue
      */
-    public Iterator<AttributeTypeAndValue> iterator()
+    public Iterator<AVA> iterator()
     {
         if ( nbAtavs == 1 || nbAtavs == 0 )
         {
-            return new Iterator<AttributeTypeAndValue>()
+            return new Iterator<AVA>()
             {
                 private boolean hasMoreElement = nbAtavs == 1;
 
@@ -679,9 +679,9 @@
                 }
 
 
-                public AttributeTypeAndValue next()
+                public AVA next()
                 {
-                    AttributeTypeAndValue obj = atav;
+                    AVA obj = atav;
                     hasMoreElement = false;
                     return obj;
                 }
@@ -719,18 +719,18 @@
                     break;
 
                 case 1:
-                    rdn.atav = ( AttributeTypeAndValue ) this.atav.clone();
+                    rdn.atav = ( AVA ) this.atav.clone();
                     rdn.atavTypes = atavTypes;
                     break;
 
                 default:
                     // We must duplicate the treeSet and the hashMap
                     rdn.atavTypes = new MultiValueMap();
-                    rdn.atavs = new TreeSet<AttributeTypeAndValue>();
+                    rdn.atavs = new TreeSet<AVA>();
 
-                    for ( AttributeTypeAndValue currentAtav : this.atavs )
+                    for ( AVA currentAtav : this.atavs )
                     {
-                        rdn.atavs.add( ( AttributeTypeAndValue ) currentAtav.clone() );
+                        rdn.atavs.add( ( AVA ) currentAtav.clone() );
                         rdn.atavTypes.put( currentAtav.getNormType(), currentAtav );
                     }
 
@@ -792,8 +792,8 @@
 
                     // the types are already normalized and sorted in the atavs TreeSet
                     // so we could compare the 1st with the 1st, then the 2nd with the 2nd, etc.
-                    Iterator<AttributeTypeAndValue> localIterator = atavs.iterator();
-                    Iterator<AttributeTypeAndValue> paramIterator = rdn.atavs.iterator();
+                    Iterator<AVA> localIterator = atavs.iterator();
+                    Iterator<AVA> paramIterator = rdn.atavs.iterator();
 
                     while ( localIterator.hasNext() || paramIterator.hasNext() )
                     {
@@ -806,8 +806,8 @@
                             return INFERIOR;
                         }
 
-                        AttributeTypeAndValue localAtav = localIterator.next();
-                        AttributeTypeAndValue paramAtav = paramIterator.next();
+                        AVA localAtav = localIterator.next();
+                        AVA paramAtav = paramIterator.next();
                         int result = localAtav.compareTo( paramAtav );
                         if ( result != EQUAL )
                         {
@@ -877,7 +877,7 @@
      *
      * @return The first AttributeTypeAndValue of this RDN
      */
-    public AttributeTypeAndValue getAtav()
+    public AVA getAtav()
     {
         switch ( nbAtavs )
         {
@@ -888,7 +888,7 @@
                 return atav;
 
             default:
-                return ( ( TreeSet<AttributeTypeAndValue> ) atavs ).first();
+                return ( ( TreeSet<AVA> ) atavs ).first();
         }
     }
 
@@ -909,7 +909,7 @@
                 return atav.getUpType();
 
             default:
-                return ( ( TreeSet<AttributeTypeAndValue> ) atavs ).first().getUpType();
+                return ( ( TreeSet<AVA> ) atavs ).first().getUpType();
         }
     }
 
@@ -930,7 +930,7 @@
                 return atav.getNormType();
 
             default:
-                return ( ( TreeSet<AttributeTypeAndValue> ) atavs ).first().getNormType();
+                return ( ( TreeSet<AVA> ) atavs ).first().getNormType();
         }
     }
 
@@ -951,7 +951,7 @@
                 return atav.getUpValue().getString();
 
             default:
-                return ( ( TreeSet<AttributeTypeAndValue> ) atavs ).first().getUpValue().getString();
+                return ( ( TreeSet<AVA> ) atavs ).first().getUpValue().getString();
         }
     }
 
@@ -972,7 +972,7 @@
                 return atav.getNormValue().getString();
 
             default:
-                return ( ( TreeSet<AttributeTypeAndValue> ) atavs ).first().getNormValue().getString();
+                return ( ( TreeSet<AVA> ) atavs ).first().getNormValue().getString();
         }
     }
 
@@ -1344,7 +1344,7 @@
             default:
                 // We have more than one AttributeTypeAndValue
 
-                for ( AttributeTypeAndValue ata : atavs )
+                for ( AVA ata : atavs )
                 {
                     result = result * 17 + ata.hashCode();
                 }
@@ -1404,7 +1404,7 @@
                 break;
 
             default:
-                for ( AttributeTypeAndValue value : atavs )
+                for ( AVA value : atavs )
                 {
                     out.writeObject( value );
                 }
@@ -1451,19 +1451,19 @@
                 break;
 
             case 1:
-                atav = ( AttributeTypeAndValue ) in.readObject();
+                atav = ( AVA ) in.readObject();
                 atavType = atav.getNormType();
 
                 break;
 
             default:
-                atavs = new TreeSet<AttributeTypeAndValue>();
+                atavs = new TreeSet<AVA>();
 
                 atavTypes = new MultiValueMap();
 
                 for ( int i = 0; i < nbAtavs; i++ )
                 {
-                    AttributeTypeAndValue value = ( AttributeTypeAndValue ) in.readObject();
+                    AVA value = ( AVA ) in.readObject();
                     atavs.add( value );
                     atavTypes.put( value.getNormType(), value );
                 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnSerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnSerializer.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnSerializer.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnSerializer.java Mon Jan  4 13:58:21 2010
@@ -74,13 +74,13 @@
                 break;
 
             case 1 :
-                AtavSerializer.serialize( rdn.getAtav(), out );
+                AVASerializer.serialize( rdn.getAtav(), out );
                 break;
                 
             default :
-                for ( AttributeTypeAndValue atav:rdn )
+                for ( AVA atav:rdn )
                 {
-                    AtavSerializer.serialize( atav, out );
+                    AVASerializer.serialize( atav, out );
                 }
             
                 break;
@@ -129,7 +129,7 @@
                 return rdn;
                 
             case 1 :
-                AttributeTypeAndValue atav = AtavSerializer.deserialize( in );
+                AVA atav = AVASerializer.deserialize( in );
                 
                 rdn.addAttributeTypeAndValue( atav );
 
@@ -138,7 +138,7 @@
             default :
                 for ( int i = 0; i < nbAtavs; i++  )
                 {
-                    atav = AtavSerializer.deserialize( in );
+                    atav = AVASerializer.deserialize( in );
                     rdn.addAttributeTypeAndValue( atav );
                 }
             

Copied: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java (from r895576, directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValueTest.java)
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java?p2=directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java&p1=directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValueTest.java&r1=895576&r2=895627&rev=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValueTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java Mon Jan  4 13:58:21 2010
@@ -43,7 +43,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$, 
  */
-public class AttributeTypeAndValueTest
+public class AVATest
 {
     // ~ Methods
     // ------------------------------------------------------------------------------------
@@ -53,7 +53,7 @@
     @Test
     public void testAttributeTypeAndValueNull()
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue();
+        AVA atav = new AVA();
         assertEquals( "", atav.toString() );
         assertEquals( "", atav.getUpName() );
         assertEquals( -1, atav.getStart() );
@@ -69,7 +69,7 @@
     {
         try
         {
-            new AttributeTypeAndValue( null, null, (String)null, (String)null );
+            new AVA( null, null, (String)null, (String)null );
             fail();
         }
         catch ( InvalidNameException ine )
@@ -87,7 +87,7 @@
     {
         try
         {
-            new AttributeTypeAndValue( "  ", " ", (String)null, (String)null );
+            new AVA( "  ", " ", (String)null, (String)null );
             fail();
         }
         catch ( InvalidNameException ine )
@@ -103,19 +103,19 @@
     @Test
     public void testAttributeTypeAndValueValidType() throws InvalidNameException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "A", "a", (String)null, (String)null );
+        AVA atav = new AVA( "A", "a", (String)null, (String)null );
         assertEquals( "a=", atav.toString() );
         assertEquals( "A=", atav.getUpName() );
         
-        atav = new AttributeTypeAndValue( "  A  ", "a", (String)null, (String)null );
+        atav = new AVA( "  A  ", "a", (String)null, (String)null );
         assertEquals( "a=", atav.toString() );
         assertEquals( "  A  =", atav.getUpName() );
         
-        atav = new AttributeTypeAndValue( "  A  ", null, (String)null, (String)null );
+        atav = new AVA( "  A  ", null, (String)null, (String)null );
         assertEquals( "a=", atav.toString() );
         assertEquals( "  A  =", atav.getUpName() );
         
-        atav = new AttributeTypeAndValue( null, "a", (String)null, (String)null );
+        atav = new AVA( null, "a", (String)null, (String)null );
         assertEquals( "a=", atav.toString() );
         assertEquals( "a=", atav.getUpName() );
         
@@ -129,7 +129,7 @@
     {
         try
         {
-            new AttributeTypeAndValue( "", "", "", "" );
+            new AVA( "", "", "", "" );
             fail( "Should not occurs ... " );
         }
         catch ( InvalidNameException ine )
@@ -145,7 +145,7 @@
     @Test
     public void testLdapRDNSimple() throws InvalidNameException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "a", "a", "b", "b" );
+        AVA atav = new AVA( "a", "a", "b", "b" );
         assertEquals( "a=b", atav.toString() );
         assertEquals( "a=b", atav.getUpName() );
         assertEquals( 0, atav.getStart() );
@@ -159,8 +159,8 @@
     @Test
     public void testCompareToEquals() throws InvalidNameException
     {
-        AttributeTypeAndValue atav1 = new AttributeTypeAndValue( "a", "a","b", "b" );
-        AttributeTypeAndValue atav2 = new AttributeTypeAndValue( "a", "a","b", "b" );
+        AVA atav1 = new AVA( "a", "a","b", "b" );
+        AVA atav2 = new AVA( "a", "a","b", "b" );
 
         assertEquals( 0, atav1.compareTo( atav2 ) );
     }
@@ -172,8 +172,8 @@
     @Test
     public void testCompareToEqualsCase() throws InvalidNameException
     {
-        AttributeTypeAndValue atav1 = new AttributeTypeAndValue( "a", "a", "b", "b" );
-        AttributeTypeAndValue atav2 = new AttributeTypeAndValue( "A", "A", "b", "b" );
+        AVA atav1 = new AVA( "a", "a", "b", "b" );
+        AVA atav2 = new AVA( "A", "A", "b", "b" );
 
         assertEquals( 0, atav1.compareTo( atav2 ) );
     }
@@ -186,9 +186,9 @@
     @Test
     public void testCompareAtav1TypeSuperior() throws InvalidNameException
     {
-        AttributeTypeAndValue atav1 = new AttributeTypeAndValue( "b", "b", "b", "b" );
+        AVA atav1 = new AVA( "b", "b", "b", "b" );
             
-        AttributeTypeAndValue atav2 = new AttributeTypeAndValue( "a", "a", "b", "b" );
+        AVA atav2 = new AVA( "a", "a", "b", "b" );
 
         assertEquals( 1, atav1.compareTo( atav2 ) );
     }
@@ -201,8 +201,8 @@
     @Test
     public void testCompareAtav2TypeSuperior() throws InvalidNameException
     {
-        AttributeTypeAndValue atav1 = new AttributeTypeAndValue( "a", "a", "b", "b" );
-        AttributeTypeAndValue atav2 = new AttributeTypeAndValue( "b", "b", "b", "b" );
+        AVA atav1 = new AVA( "a", "a", "b", "b" );
+        AVA atav2 = new AVA( "b", "b", "b", "b" );
 
         assertEquals( -1, atav1.compareTo( atav2 ) );
     }
@@ -215,8 +215,8 @@
     @Test
     public void testCompareAtav1ValueSuperior() throws InvalidNameException
     {
-        AttributeTypeAndValue atav1 = new AttributeTypeAndValue( "a", "a", "b", "b" );
-        AttributeTypeAndValue atav2 = new AttributeTypeAndValue( "a", "a", "a", "a" );
+        AVA atav1 = new AVA( "a", "a", "b", "b" );
+        AVA atav2 = new AVA( "a", "a", "a", "a" );
 
         assertEquals( 1, atav1.compareTo( atav2 ) );
     }
@@ -229,8 +229,8 @@
     @Test
     public void testCompareAtav2ValueSuperior() throws InvalidNameException
     {
-        AttributeTypeAndValue atav1 = new AttributeTypeAndValue( "a", "a", "a", "a" );
-        AttributeTypeAndValue atav2 = new AttributeTypeAndValue( "a", "a", "b", "b" );
+        AVA atav1 = new AVA( "a", "a", "a", "a" );
+        AVA atav2 = new AVA( "a", "a", "b", "b" );
 
         assertEquals( -1, atav1.compareTo( atav2 ) );
     }
@@ -239,7 +239,7 @@
     @Test
     public void testNormalize() throws InvalidNameException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( " A ", " A ", "a", "a" );
+        AVA atav = new AVA( " A ", " A ", "a", "a" );
 
         assertEquals( "a=a", atav.normalize() );
 
@@ -254,7 +254,7 @@
     @Test
     public void testStringAtavSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "cn", "CN", "test", "Test" );
+        AVA atav = new AVA( "cn", "CN", "test", "Test" );
 
         atav.normalize();
 
@@ -268,7 +268,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = (AttributeTypeAndValue)in.readObject();
+        AVA atav2 = (AVA)in.readObject();
 
         assertEquals( atav, atav2 );
     }
@@ -280,7 +280,7 @@
         byte[] upValue = StringTools.getBytesUtf8( "  Test  " );
         byte[] normValue = StringTools.getBytesUtf8( "Test" );
 
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "cn", "CN", upValue, normValue );
+        AVA atav = new AVA( "cn", "CN", upValue, normValue );
 
         atav.normalize();
 
@@ -294,7 +294,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = (AttributeTypeAndValue)in.readObject();
+        AVA atav2 = (AVA)in.readObject();
 
         assertEquals( atav, atav2 );
     }
@@ -306,7 +306,7 @@
     @Test
     public void testNullAtavSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue();
+        AVA atav = new AVA();
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -326,7 +326,7 @@
     @Test
     public void testNullNormValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", "test", (String)null );
+        AVA atav = new AVA( "CN", "cn", "test", (String)null );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -347,7 +347,7 @@
     @Test
     public void testNullUpValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", null, "test" );
+        AVA atav = new AVA( "CN", "cn", null, "test" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -368,7 +368,7 @@
     @Test
     public void testEmptyNormValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", "test", "" );
+        AVA atav = new AVA( "CN", "cn", "test", "" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -380,7 +380,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = (AttributeTypeAndValue)in.readObject();
+        AVA atav2 = (AVA)in.readObject();
 
         assertEquals( atav, atav2 );
     }
@@ -389,7 +389,7 @@
     @Test
     public void testEmptyUpValueSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", "", "test" );
+        AVA atav = new AVA( "CN", "cn", "", "test" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
@@ -401,7 +401,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = (AttributeTypeAndValue)in.readObject();
+        AVA atav2 = (AVA)in.readObject();
 
         assertEquals( atav, atav2 );
     }
@@ -413,14 +413,14 @@
     @Test
     public void testStringAtavStaticSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "cn", "CN", "test", "Test" );
+        AVA atav = new AVA( "cn", "CN", "test", "Test" );
 
         atav.normalize();
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
-        AtavSerializer.serialize( atav, out );
+        AVASerializer.serialize( atav, out );
         out.flush();
 
         ObjectInputStream in = null;
@@ -428,7 +428,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = AtavSerializer.deserialize( in );
+        AVA atav2 = AVASerializer.deserialize( in );
 
         assertEquals( atav, atav2 );
     }
@@ -440,14 +440,14 @@
         byte[] upValue = StringTools.getBytesUtf8( "  Test  " );
         byte[] normValue = StringTools.getBytesUtf8( "Test" );
 
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "cn", "CN", upValue, normValue );
+        AVA atav = new AVA( "cn", "CN", upValue, normValue );
 
         atav.normalize();
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
-        AtavSerializer.serialize( atav, out );
+        AVASerializer.serialize( atav, out );
         out.flush();
 
         ObjectInputStream in = null;
@@ -455,7 +455,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = AtavSerializer.deserialize( in );
+        AVA atav2 = AVASerializer.deserialize( in );
 
         assertEquals( atav, atav2 );
     }
@@ -467,14 +467,14 @@
     @Test
     public void testNullAtavStaticSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue();
+        AVA atav = new AVA();
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         try
         {
-            AtavSerializer.serialize( atav, out );
+            AVASerializer.serialize( atav, out );
             fail();
         }
         catch ( IOException ioe )
@@ -487,14 +487,14 @@
     @Test
     public void testNullNormValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", "test", (String)null );
+        AVA atav = new AVA( "CN", "cn", "test", (String)null );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         try
         {
-            AtavSerializer.serialize( atav, out );
+            AVASerializer.serialize( atav, out );
             fail();
         }
         catch ( IOException ioe )
@@ -508,14 +508,14 @@
     @Test
     public void testNullUpValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", null, "test" );
+        AVA atav = new AVA( "CN", "cn", null, "test" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
         try
         {
-            AtavSerializer.serialize( atav, out );
+            AVASerializer.serialize( atav, out );
             fail();
         }
         catch ( IOException ioe )
@@ -529,12 +529,12 @@
     @Test
     public void testEmptyNormValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", "test", "" );
+        AVA atav = new AVA( "CN", "cn", "test", "" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
-        AtavSerializer.serialize( atav, out );
+        AVASerializer.serialize( atav, out );
         out.flush();
 
         ObjectInputStream in = null;
@@ -542,7 +542,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = AtavSerializer.deserialize( in );
+        AVA atav2 = AVASerializer.deserialize( in );
 
         assertEquals( atav, atav2 );
     }
@@ -551,12 +551,12 @@
     @Test
     public void testEmptyUpValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
     {
-        AttributeTypeAndValue atav = new AttributeTypeAndValue( "CN", "cn", "", "test" );
+        AVA atav = new AVA( "CN", "cn", "", "test" );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream out = new ObjectOutputStream( baos );
 
-        AtavSerializer.serialize( atav, out );
+        AVASerializer.serialize( atav, out );
         out.flush();
 
         ObjectInputStream in = null;
@@ -564,7 +564,7 @@
         byte[] data = baos.toByteArray();
         in = new ObjectInputStream( new ByteArrayInputStream( data ) );
 
-        AttributeTypeAndValue atav2 = AtavSerializer.deserialize( in );
+        AVA atav2 = AVASerializer.deserialize( in );
 
         assertEquals( atav, atav2 );
     }

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java Mon Jan  4 13:58:21 2010
@@ -3398,14 +3398,14 @@
         // antlr parser: string value with trailing spaces
         LdapDN dn1 = new LdapDN( " cn = Amos\\,Tori , ou=system " );
         assertEquals( " cn = Amos\\,Tori ", dn1.getRdn().getUpName() );
-        AttributeTypeAndValue atav1 = dn1.getRdn().getAtav();
+        AVA atav1 = dn1.getRdn().getAtav();
         assertEquals( "cn", atav1.getUpType() );
         assertEquals( "Amos,Tori", atav1.getUpValue().getString() );
 
         // antlr parser: hexstring with trailing spaces
         LdapDN dn3 = new LdapDN( " cn = #414243 , ou=system " );
         assertEquals( " cn = #414243 ", dn3.getRdn().getUpName() );
-        AttributeTypeAndValue atav3 = dn3.getRdn().getAtav();
+        AVA atav3 = dn3.getRdn().getAtav();
         assertEquals( "cn", atav3.getUpType() );
         assertEquals( "ABC", atav3.getUpValue().getString() );
         assertTrue( Arrays.equals( StringTools.getBytesUtf8( "ABC" ),atav3.getNormValue().getBytes() ) );
@@ -3413,7 +3413,7 @@
         // antlr parser: 
         LdapDN dn4 = new LdapDN( " cn = \\41\\42\\43 , ou=system " );
         assertEquals( " cn = \\41\\42\\43 ", dn4.getRdn().getUpName() );
-        AttributeTypeAndValue atav4 = dn4.getRdn().getAtav();
+        AVA atav4 = dn4.getRdn().getAtav();
         assertEquals( "cn", atav4.getUpType() );
         assertEquals( "ABC", atav4.getUpValue().getString() );
         assertEquals( "ABC", atav4.getNormValue().getString() );
@@ -3421,7 +3421,7 @@
         // antlr parser: quotestring with trailing spaces
         LdapDN dn5 = new LdapDN( " cn = \"ABC\" , ou=system " );
         assertEquals( " cn = \"ABC\" ", dn5.getRdn().getUpName() );
-        AttributeTypeAndValue atav5 = dn5.getRdn().getAtav();
+        AVA atav5 = dn5.getRdn().getAtav();
         assertEquals( "cn", atav5.getUpType() );
         assertEquals( "ABC", atav5.getUpValue().getString() );
         assertEquals( "ABC", atav5.getNormValue().getString() );
@@ -3429,7 +3429,7 @@
         // fast parser: string value with trailing spaces 
         LdapDN dn2 = new LdapDN( " cn = Amos Tori , ou=system " );
         assertEquals( " cn = Amos Tori ", dn2.getRdn().getUpName() );
-        AttributeTypeAndValue atav2 = dn2.getRdn().getAtav();
+        AVA atav2 = dn2.getRdn().getAtav();
         assertEquals( "cn", atav2.getUpType() );
         assertEquals( "Amos Tori", atav2.getUpValue().getString() );
     }
@@ -3523,7 +3523,7 @@
         assertEquals( "Example",rdn.getUpValue() );
         assertEquals( "  ou  =  Example ", rdn.getUpName() );
         
-        AttributeTypeAndValue atav = rdn.getAtav();
+        AVA atav = rdn.getAtav();
         
         assertEquals( "2.5.4.11=example", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
@@ -3554,7 +3554,7 @@
         assertEquals( "  ou  =  Example + ou = TEST ", rdn.getUpName() );
         
         // The first ATAV
-        AttributeTypeAndValue atav = rdn.getAtav();
+        AVA atav = rdn.getAtav();
         
         assertEquals( "2.5.4.11=example", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
@@ -3568,7 +3568,7 @@
         assertEquals( 2, rdn.getNbAtavs() );
         
         // The second ATAV
-        for ( AttributeTypeAndValue ava : rdn )
+        for ( AVA ava : rdn )
         {
             if ( "example".equals( atav.getNormValue().get() ) )
             {
@@ -3604,7 +3604,7 @@
         assertEquals( "Ex+mple",rdn.getUpValue() );
         assertEquals( "  ou  =  Ex\\+mple ", rdn.getUpName() );
         
-        AttributeTypeAndValue atav = rdn.getAtav();
+        AVA atav = rdn.getAtav();
         
         assertEquals( "2.5.4.11=ex\\+mple", atav.getNormName() );
         assertEquals( "2.5.4.11", atav.getNormType() );
@@ -3639,7 +3639,7 @@
         assertEquals( "Ex+mple",rdn.getNormValue() );
         
         // The first ATAV
-        AttributeTypeAndValue atav = rdn.getAtav();
+        AVA atav = rdn.getAtav();
         
         assertEquals( "  OU  =  Ex\\+mple ", atav.getUpName() );
         assertEquals( "ou=Ex\\+mple", atav.getNormName() );
@@ -3653,7 +3653,7 @@
         assertEquals( 2, rdn.getNbAtavs() );
         
         // The second ATAV
-        for ( AttributeTypeAndValue ava : rdn )
+        for ( AVA ava : rdn )
         {
             if ( "Ex+mple".equals( ava.getNormValue().get() ) )
             {
@@ -3704,7 +3704,7 @@
         assertEquals( 2, rdn.getNbAtavs() );
         
         // The second ATAV
-        for ( AttributeTypeAndValue ava : rdn )
+        for ( AVA ava : rdn )
         {
             if ( "ex+mple".equals( ava.getNormValue().get() ) )
             {

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java?rev=895627&r1=895626&r2=895627&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java Mon Jan  4 13:58:21 2010
@@ -844,7 +844,7 @@
     public void testMultiValuedIterator() throws InvalidNameException
     {
         Rdn rdn = new Rdn( "cn=Kate Bush+sn=Bush" );
-        Iterator<AttributeTypeAndValue> iterator = rdn.iterator();
+        Iterator<AVA> iterator = rdn.iterator();
         assertNotNull( iterator );
         assertTrue( iterator.hasNext() );
         assertNotNull( iterator.next() );
@@ -858,7 +858,7 @@
     public void testSingleValuedIterator() throws InvalidNameException
     {
         Rdn rdn = new Rdn( "cn=Kate Bush" );
-        Iterator<AttributeTypeAndValue> iterator = rdn.iterator();
+        Iterator<AVA> iterator = rdn.iterator();
         assertNotNull( iterator );
         assertTrue( iterator.hasNext() );
         assertNotNull( iterator.next() );
@@ -870,7 +870,7 @@
     public void testEmptyIterator()
     {
         Rdn rdn = new Rdn();
-        Iterator<AttributeTypeAndValue> iterator = rdn.iterator();
+        Iterator<AVA> iterator = rdn.iterator();
         assertNotNull( iterator );
         assertFalse( iterator.hasNext() );
     }



Mime
View raw message