directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r809424 - in /directory/shared/branches/shared-schema: ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/loader/ldif/ ldap/src/main/antlr/ ldap/src/main/java/org/apache/directory/shared/ldap/schema/ ldap/src/main/java/org/...
Date Sun, 30 Aug 2009 22:13:57 GMT
Author: elecharny
Date: Sun Aug 30 22:13:56 2009
New Revision: 809424

URL: http://svn.apache.org/viewvc?rev=809424&view=rev
Log:
o Renamed some methods for clarity
o Adding some getXXXName() methods
o Updated the Description classes
O Added toString() methods to SO classes

Modified:
    directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/loader/ldif/SchemaEntityFactory.java
    directory/shared/branches/shared-schema/ldap/src/main/antlr/schema.g
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ParserDescriptionUtils.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/SchemaUtilsTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/parser/OpenLdapSchemaParserTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java

Modified: directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/loader/ldif/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/loader/ldif/SchemaEntityFactory.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/loader/ldif/SchemaEntityFactory.java (original)
+++ directory/shared/branches/shared-schema/ldap-schema-loader/src/main/java/org/apache/directory/shared/schema/loader/ldif/SchemaEntityFactory.java Sun Aug 30 22:13:56 2009
@@ -521,13 +521,13 @@
         if ( entry.get( MetaSchemaConstants.M_SINGLE_VALUE_AT ) != null )
         {
             String val = entry.get( MetaSchemaConstants.M_SINGLE_VALUE_AT ).getString();
-            at.setSingleValue( val.equalsIgnoreCase( "TRUE" ) );
+            at.setSingleValued( val.equalsIgnoreCase( "TRUE" ) );
         }
         
         if ( entry.get( MetaSchemaConstants.M_NO_USER_MODIFICATION_AT ) != null )
         {
             String val = entry.get( MetaSchemaConstants.M_NO_USER_MODIFICATION_AT ).getString();
-            at.setCanUserModify( ! val.equalsIgnoreCase( "TRUE" ) );
+            at.setUserModifiable( ! val.equalsIgnoreCase( "TRUE" ) );
         }
         
         if ( entry.get( MetaSchemaConstants.M_USAGE_AT ) != null )

Modified: directory/shared/branches/shared-schema/ldap/src/main/antlr/schema.g
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/antlr/schema.g?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/antlr/schema.g (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/antlr/schema.g Sun Aug 30 22:13:56 2009
@@ -119,7 +119,7 @@
 OC : ( "oc" (options {greedy=true;} : WHSP)? oc:VALUES ) { setText(oc.getText()); } ;
 EQUALITY : ( "equality" (options {greedy=true;} : WHSP)? equality:VALUES ) { setText(equality.getText().trim()); } ;
 ORDERING : ( "ordering" (options {greedy=true;} : WHSP)? ordering:VALUES ) { setText(ordering.getText().trim()); } ;
-SUBSTR : ( "substr" (options {greedy=true;} : WHSP)? substr:VALUES ) { setText(substr.getText().trim()); } ;
+SUBSTR : ( "substr" (options {greedy=true;} : WHSP)? substring:VALUES ) { setText(substring.getText().trim()); } ;
 SYNTAX : ( "syntax" (options {greedy=true;} : WHSP)? syntax:VALUES (len:LEN)? ) { setText(syntax.getText().trim() + (len!=null?len.getText().trim():"")); } ;
 APPLIES : ( "applies" (options {greedy=true;} : WHSP)? applies:VALUES ) { setText(applies.getText().trim()); } ;
 EXTENSION : x:( "x-" ( options {greedy=true;} : 'a'..'z' | '-' | '_' )+ (options {greedy=true;} : WHSP)? VALUES ) ; 
@@ -403,26 +403,26 @@
         |
         ( obsolete:OBSOLETE { et.track("OBSOLETE", obsolete); attributeType.setObsolete( true ); } )
         |
-        ( sup:SUP { et.track("SUP", sup); attributeType.setSuperiorOid(oid(sup.getText())); } )
+        ( superior:SUP { et.track("SUP", superior); attributeType.setSuperiorOid(oid(superior.getText())); } )
         |
         ( equality:EQUALITY { et.track("EQUALITY", equality); attributeType.setEqualityOid(oid(equality.getText())); } )
         |
         ( ordering:ORDERING { et.track("ORDERING", ordering); attributeType.setOrderingOid(oid(ordering.getText())); } )
         |
-        ( substr:SUBSTR { et.track("SUBSTR", substr); attributeType.setSubstrOid(oid(substr.getText())); } )
+        ( substring:SUBSTR { et.track("SUBSTR", substring); attributeType.setSubstringOid(oid(substring.getText())); } )
         |
         ( syntax:SYNTAX { 
            et.track("SYNTAX", syntax); 
             NoidLen noidlen = noidlen(syntax.getText());
             attributeType.setSyntaxOid(noidlen.noid); 
-            attributeType.setLength(noidlen.len);
+            attributeType.setSyntaxLength(noidlen.len);
           } )
         |
-        ( singleValue:SINGLE_VALUE { et.track("SINGLE_VALUE", singleValue); attributeType.setSingleValue( true ); } )
+        ( singleValued:SINGLE_VALUE { et.track("SINGLE_VALUE", singleValued); attributeType.setSingleValued( true ); } )
         |
         ( collective:COLLECTIVE { et.track("COLLECTIVE", collective); attributeType.setCollective( true ); } )
         |
-        ( noUserModification:NO_USER_MODIFICATION { et.track("NO_USER_MODIFICATION", noUserModification); attributeType.setCanUserModify( false ); } )
+        ( noUserModification:NO_USER_MODIFICATION { et.track("NO_USER_MODIFICATION", noUserModification); attributeType.setUserModifiable( false ); } )
         |
         ( usage1:USAGE (WHSP)* USER_APPLICATIONS { et.track("USAGE", usage1); attributeType.setUsage( UsageEnum.USER_APPLICATIONS ); }
           |
@@ -456,7 +456,7 @@
             }
         
             // NO-USER-MODIFICATION requires an operational USAGE.
-            if ( !attributeType.isCanUserModify() && ( attributeType.getUsage() == UsageEnum.USER_APPLICATIONS ) )
+            if ( !attributeType.isUserModifiable() && ( attributeType.getUsage() == UsageEnum.USER_APPLICATIONS ) )
             {
                 throw new SemanticException( "NO-USER-MODIFICATION requires an operational USAGE", null, 0, 0 );
             }
@@ -1081,4 +1081,4 @@
     ;
 
 
-    
\ No newline at end of file
+    

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java Sun Aug 30 22:13:56 2009
@@ -152,10 +152,10 @@
     private MatchingRule equality;
     
     /** The substring OID associated with this AttributeType */
-    private String substrOid;
+    private String substringOid;
 
     /** The substring MatchingRule associated with the substringID */
-    private MatchingRule substr;
+    private MatchingRule substring;
     
     /** The ordering OID associated with this AttributeType */
     private String orderingOid;
@@ -164,13 +164,13 @@
     private MatchingRule ordering;
     
     /** The superior AttributeType OID */
-    private String supOid;
+    private String superiorOid;
     
     /** The superior AttributeType */
-    private AttributeType sup;
+    private AttributeType superior;
     
     /** whether or not this type is single valued */
-    private boolean isSingleValue = false;
+    private boolean isSingleValued = false;
 
     /** whether or not this type is a collective attribute */
     private boolean isCollective = false;
@@ -182,7 +182,7 @@
     private UsageEnum usage = UsageEnum.USER_APPLICATIONS;
 
     /** the length of this attribute in bytes */
-    private int length = 0;
+    private int syntaxLength = 0;
     
     /**
      * Creates a AttributeType object using a unique OID.
@@ -207,9 +207,9 @@
         {
             AttributeTypeRegistry atRegistry = registries.getAttributeTypeRegistry();
             
-            if ( supOid != null )
+            if ( superiorOid != null )
             {
-                sup = atRegistry.lookup( supOid );
+                superior = atRegistry.lookup( superiorOid );
             }
             
             MatchingRuleRegistry mrRegistry = registries.getMatchingRuleRegistry();
@@ -224,15 +224,14 @@
                 ordering = mrRegistry.lookup( orderingOid );
             }
             
-            if ( substrOid != null )
+            if ( substringOid != null )
             {
-                substr = mrRegistry.lookup( substrOid );
+                substring = mrRegistry.lookup( substringOid );
             }
             
             LdapSyntaxRegistry lsRegistry = registries.getLdapSyntaxRegistry();
             
             syntax = lsRegistry.lookup( syntaxOid );
-            
         }
     }
     
@@ -243,22 +242,22 @@
      * @return true if only one value can exist for this AttributeType, false
      *         otherwise
      */
-    public boolean isSingleValue()
+    public boolean isSingleValued()
     {
-        return isSingleValue;
+        return isSingleValued;
     }
 
 
     /**
-     * Tells if this AttributeType is SIngle Valued or not
+     * Tells if this AttributeType is Single Valued or not
      *
-     * @param singleValue True if the AttributeType is single-vlaued
+     * @param singleValue True if the AttributeType is single-valued
      */
-    public void setSingleValue( boolean singleValue )
+    public void setSingleValued( boolean singleValued )
     {
         if ( !isReadOnly )
         {
-            this.isSingleValue = singleValue;
+            this.isSingleValued = singleValued;
         }
     }
 
@@ -268,7 +267,7 @@
      * 
      * @return true if users can modify it, false if only the directory can.
      */
-    public boolean isCanUserModify()
+    public boolean isUserModifiable()
     {
         return canUserModify;
     }
@@ -279,7 +278,7 @@
      *
      * @param canUserModify The flag to set
      */
-    public void setCanUserModify( boolean canUserModify )
+    public void setUserModifiable( boolean canUserModify )
     {
         if ( !isReadOnly )
         {
@@ -349,9 +348,9 @@
      * 
      * @return the length of the attribute
      */
-    public int getLength()
+    public int getSyntaxLength()
     {
-        return length;
+        return syntaxLength;
     }
     
     
@@ -361,11 +360,11 @@
      * 
      * @param length the new length to set
      */
-    public void setLength( int length )
+    public void setSyntaxLength( int length )
     {
         if ( !isReadOnly )
         {
-            this.length = length;
+            this.syntaxLength = length;
         }
     }
     
@@ -375,9 +374,9 @@
      * 
      * @return the superior AttributeType for this AttributeType
      */
-    public AttributeType getSup()
+    public AttributeType getSuperior()
     {
-        return sup;
+        return superior;
     }
 
     
@@ -386,9 +385,27 @@
      * 
      * @return The OID of the superior AttributeType for this AttributeType.
      */
-    public String getSupOid()
+    public String getSuperiorOid()
+    {
+        return superiorOid;
+    }
+
+    
+    /**
+     * Gets the Name of the superior AttributeType for this AttributeType.
+     * 
+     * @return The Name of the superior AttributeType for this AttributeType.
+     */
+    public String getSuperiorName()
     {
-        return supOid;
+        if ( superior != null )
+        {
+            return superior.getName();
+        }
+        else
+        {
+            return superiorOid;
+        }
     }
 
     
@@ -401,7 +418,7 @@
     {
         if ( !isReadOnly )
         {
-            this.supOid = superiorOid;
+            this.superiorOid = superiorOid;
         }
     }
     
@@ -415,8 +432,8 @@
     {
         if ( !isReadOnly )
         {
-            this.sup = superior;
-            this.supOid = superior.getOid();
+            this.superior = superior;
+            this.superiorOid = superior.getOid();
         }
     }
 
@@ -433,6 +450,24 @@
 
 
     /**
+     * Gets the Syntax name for this AttributeType's values.
+     * 
+     * @return the value syntax name
+     */
+    public String getSyntaxName()
+    {
+        if ( syntax != null )
+        {
+            return syntax.getName();
+        }
+        else
+        {
+            return null;
+        }
+    }
+
+
+    /**
      * Gets the Syntax OID for this AttributeType's values.
      * 
      * @return the value syntax's OID
@@ -495,6 +530,24 @@
 
 
     /**
+     * Gets the Equality Name for this AttributeType's values.
+     * 
+     * @return the value Equality's Name
+     */
+    public String getEqualityName()
+    {
+        if ( equality != null )
+        {
+            return equality.getName();
+        }
+        else
+        {
+            return equalityOid;
+        }
+    }
+
+
+    /**
      * Sets the Equality OID for this AttributeType
      *
      * @param equalityOid The Equality OID for this AttributeType
@@ -535,6 +588,24 @@
 
 
     /**
+     * Gets the MatchingRule name for this AttributeType used for Ordering matching.
+     * 
+     * @return the Ordering matching rule name
+     */
+    public String getOrderingName()
+    {
+        if ( ordering != null )
+        {
+            return ordering.getName();
+        }
+        else
+        {
+            return orderingOid;
+        }
+    }
+
+
+    /**
      * Gets the Ordering OID for this AttributeType's values.
      * 
      * @return the value Equality's OID
@@ -579,9 +650,27 @@
      * 
      * @return the Substr matching rule
      */
-    public MatchingRule getSubstr()
+    public MatchingRule getSubstring()
+    {
+        return substring;
+    }
+
+
+    /**
+     * Gets the MatchingRule name for this AttributeType used for Substring matching.
+     * 
+     * @return the Substring matching rule name
+     */
+    public String getSubstringName()
     {
-        return substr;
+        if ( substring != null )
+        {
+            return substring.getName();
+        }
+        else
+        {
+            return substringOid;
+        }
     }
 
 
@@ -590,9 +679,9 @@
      * 
      * @return the value Substr's OID
      */
-    public String getSubstrOid()
+    public String getSubstringOid()
     {
-        return substrOid;
+        return substringOid;
     }
 
 
@@ -601,11 +690,11 @@
      *
      * @param substrOid The Substr OID for this AttributeType
      */
-    public void setSubstrOid( String substrOid )
+    public void setSubstringOid( String substrOid )
     {
         if ( !isReadOnly )
         {
-            this.substrOid = substrOid;
+            this.substringOid = substrOid;
         }
     }
     
@@ -613,14 +702,14 @@
     /**
      * Sets the Substr MR for this AttributeType
      *
-     * @param substr The Substr MR for this AttributeType
+     * @param substring The Substr MR for this AttributeType
      */
-    public void setSubstr( MatchingRule substr )
+    public void setSubstring( MatchingRule substring )
     {
         if ( !isReadOnly )
         {
-            this.substr = substr;
-            this.substrOid = substr.getOid();
+            this.substring = substring;
+            this.substringOid = substring.getOid();
         }
     }
 
@@ -661,8 +750,6 @@
     }
 
 
-    
-    
     /**
      * Recursive method which checks to see if a descendant is really an ancestor or if the two
      * are equal.
@@ -684,6 +771,15 @@
             return true;
         }
 
-        return isAncestorOrEqual( ancestor, descendant.getSup() );
+        return isAncestorOrEqual( ancestor, descendant.getSuperior() );
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java Sun Aug 30 22:13:56 2009
@@ -554,4 +554,13 @@
             }
         }
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java Sun Aug 30 22:13:56 2009
@@ -193,4 +193,13 @@
     {
         throw new NotImplementedException(); 
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DescriptionUtils.java Sun Aug 30 22:13:56 2009
@@ -21,25 +21,26 @@
 
 
 import java.util.List;
-
-import javax.naming.NamingException;
+import java.util.Map;
 
 
 /**
  * Utility class used to generate schema object specifications. Some of the
  * latest work coming out of the LDAPBIS working body adds optional extensions
- * to these syntaxes. We have not yet added extension support to these functions
- * or the schema interfaces in this package. Descriptions can be generated for
+ * to these syntaxes. Descriptions can be generated for
  * the following objects:
  * <ul>
  * <li><a href="./AttributeType.html">AttributeType</a></li>
  * <li><a href="./DITContentRule.html">DITContentRule</a></li>
+ * <li><a href="./DITContentRule.html">DITStructureRule</a></li>
+ * <li><a href="./LdapComparator.html">Syntax</a></li>
  * <li><a href="./MatchingRule.html">MatchingRule</a></li>
  * <li><a href="./MatchingRuleUse.html">MatchingRuleUse</a></li>
  * <li><a href="./NameForm.html">NameForm</a></li>
+ * <li><a href="./Normalizer.html">Syntax</a></li>
  * <li><a href="./ObjectClass.html">ObjectClass</a></li>
- * <li><a href="./DITStructureRule.html">DITStructureRule</a></li>
- * <li><a href="./Syntax.html">Syntax</a></li>
+ * <li><a href="./LdapSyntax.html">Syntax</a></li>
+ * <li><a href="./SyntaxChecker.html">Syntax</a></li>
  * </ul>
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -75,18 +76,19 @@
      *            the attributeType to generate a description for
      * @return the AttributeTypeDescription Syntax for the attributeType in a
      *         pretty formated string
-     * @throws NamingException If an error is raised while accessing some of the attributeType
-     * data 
      */
-    public static String getDescription( AttributeType attributeType ) throws NamingException
+    public static String getDescription( AttributeType attributeType )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( attributeType.getOid() );
         buf.append( '\n' );
 
-        buf.append( "NAME " );
-        buf.append( attributeType.getName() );
-        buf.append( '\n' );
+        if ( attributeType.getName() != null )
+        {
+            buf.append( "NAME " );
+            buf.append( attributeType.getName() );
+            buf.append( '\n' );
+        }
 
         if ( attributeType.getDescription() != null )
         {
@@ -101,34 +103,49 @@
             buf.append( '\n' );
         }
 
-        buf.append( attributeType.getSup().getOid() );
+        if ( attributeType.getSuperior() != null )
+        {
+            buf.append(  "SUP " );
+            buf.append( attributeType.getSuperiorName() );
+            buf.append( '\n' );
+        }
 
         if ( attributeType.getEquality() != null )
         {
             buf.append( "EQUALITY " );
-            buf.append( attributeType.getEquality().getOid() );
+            buf.append( attributeType.getEqualityName() );
             buf.append( '\n' );
         }
 
         if ( attributeType.getOrdering() != null )
         {
             buf.append( "ORDERING " );
-            buf.append( attributeType.getOrdering().getOid() );
+            buf.append( attributeType.getOrderingName() );
             buf.append( '\n' );
         }
 
-        if ( attributeType.getSubstr() != null )
+        if ( attributeType.getSubstring() != null )
         {
             buf.append( "SUBSTR " );
-            buf.append( attributeType.getSubstr().getOid() );
+            buf.append( attributeType.getSubstringName() );
             buf.append( '\n' );
         }
 
-        buf.append( "SYNTAX " );
-        buf.append( attributeType.getSyntax().getOid() );
-        buf.append( '\n' );
+        if ( attributeType.getSyntax() != null )
+        {
+            buf.append( "SYNTAX " );
+            
+            buf.append( attributeType.getSyntaxName() );
+
+            if ( attributeType.getSyntaxLength() > 0 )
+            {
+                buf.append( '{' ).append( attributeType.getSyntaxLength() ).append( '}' );
+            }
+            
+            buf.append( '\n' );
+        }
 
-        if ( attributeType.isSingleValue() )
+        if ( attributeType.isSingleValued() )
         {
             buf.append( "SINGLE-VALUE" );
             buf.append( '\n' );
@@ -140,7 +157,7 @@
             buf.append( '\n' );
         }
 
-        if ( attributeType.isCanUserModify() )
+        if ( attributeType.isUserModifiable() )
         {
             buf.append( "NO-USER-MODIFICATION" );
             buf.append( '\n' );
@@ -148,7 +165,14 @@
 
         buf.append( "USAGE " );
         buf.append( UsageEnum.render( attributeType.getUsage() ) );
-        buf.append( " ) " );
+        buf.append( '\n' );
+        
+        if ( attributeType.getExtensions() != null )
+        {
+            getExtensions( buf, attributeType.getExtensions() );
+        }
+
+        buf.append( " )\n" );
 
         return buf.toString();
     }
@@ -177,18 +201,19 @@
      *            the DIT content rule specification
      * @return the specification according to the DITContentRuleDescription
      *         syntax
-     * @throws NamingException If an error is raised while accessing some of the dITConentRule
-     * data 
      */
-    public static String getDescription( DITContentRule dITContentRule ) throws NamingException
+    public static String getDescription( DITContentRule dITContentRule )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( dITContentRule.getOid() );
         buf.append( '\n' );
 
-        buf.append( "NAME " );
-        buf.append( dITContentRule.getName() );
-        buf.append( '\n' );
+        if ( dITContentRule.getName() != null )
+        {
+            buf.append( "NAME " );
+            buf.append( dITContentRule.getName() );
+            buf.append( '\n' );
+        }
 
         if ( dITContentRule.getDescription() != null )
         {
@@ -208,63 +233,46 @@
         
         if ( ( aux != null ) && ( aux.size() > 0 ) )
         {
-            buf.append( "AUX\n" );
-            
-            for ( ObjectClass objectClass: aux )
-            {
-                buf.append( '\t' );
-                buf.append( objectClass.getOid() );
-                buf.append( '\n' );
-            }
+            buf.append( "AUX " );
+            getQDStrings( buf, aux );
         }
 
         List<AttributeType> must = dITContentRule.getMustAttributeTypes();
         
         if ( ( must != null ) && ( must.size() > 0 ) )
         {
-            buf.append( "MUST\n" );
-            
-            for ( AttributeType attributeType:must )
-            {
-                buf.append( '\t' );
-                buf.append( attributeType.getOid() );
-                buf.append( '\n' );
-            }
+            buf.append( "MUST " );
+            getQDStrings( buf, must );
         }
 
         List<AttributeType> may = dITContentRule.getMayAttributeTypes();
         
         if ( ( may != null ) && ( may.size() > 0 ) )
         {
-            buf.append( "MAY\n" );
-            
-            for ( AttributeType attributeType:may )
-            {
-                buf.append( '\t' );
-                buf.append( attributeType.getOid() );
-                buf.append( '\n' );
-            }
+            buf.append( "MAY " );
+            getQDStrings( buf, may );
         }
 
         List<AttributeType> not = dITContentRule.getNotAttributeTypes();
         
         if ( ( not != null ) && ( not.size() > 0 ) )
         {
-            buf.append( "NOT\n" );
-            
-            for ( AttributeType attributeType:not )
-            {
-                buf.append( '\t' );
-                buf.append( attributeType.getOid() );
-                buf.append( '\n' );
-            }
+            buf.append( "NOT " );
+            getQDStrings( buf, not );
         }
 
-        buf.append( " )" );
+        if ( dITContentRule.getExtensions() != null )
+        {
+            getExtensions( buf, dITContentRule.getExtensions() );
+        }
+
+        buf.append( " )\n" );
         return buf.toString();
     }
 
 
+
+
     /**
      * Generates the MatchingRuleDescription for a MatchingRule as defined by
      * the syntax: 1.3.6.1.4.1.1466.115.121.1.30. Only the right hand side of
@@ -284,18 +292,19 @@
      * @param matchingRule
      *            the MatchingRule to generate the description for
      * @return the MatchingRuleDescription string
-     * @throws NamingException If an error is raised while accessing some of the matchingRule
-     * data 
      */
-    public static String getDescription( MatchingRule matchingRule ) throws NamingException
+    public static String getDescription( MatchingRule matchingRule )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( matchingRule.getOid() );
         buf.append( '\n' );
 
-        buf.append( "NAME " );
-        buf.append( matchingRule.getName() );
-        buf.append( '\n' );
+        if ( matchingRule.getName() != null )
+        {
+            buf.append( "NAME " );
+            buf.append( matchingRule.getName() );
+            buf.append( '\n' );
+        }
 
         if ( matchingRule.getDescription() != null )
         {
@@ -311,7 +320,14 @@
         }
 
         buf.append( "SYNTAX " );
-        buf.append( matchingRule.getSyntax().getOid() );
+        buf.append( matchingRule.getSyntaxOid() );
+        buf.append( '\n' ); 
+        
+        if ( matchingRule.getExtensions() != null )
+        {
+            getExtensions( buf, matchingRule.getExtensions() );
+        }
+
         buf.append( " ) " );
         return buf.toString();
     }
@@ -347,12 +363,10 @@
      * @param matchingRuleUse The matching rule from which we want to generate
      *  a MatchingRuleUseDescription.
      * @return The generated MatchingRuleUseDescription
-     * @throws NamingException If an error is raised while accessing some of the matchingRuleUse
-     * data 
      */
-    public static String getDescription( MatchingRuleUse matchingRuleUse ) throws NamingException
+    public static String getDescription( MatchingRuleUse matchingRuleUse )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( matchingRuleUse.getOid() );
         buf.append( '\n' );
 
@@ -404,7 +418,13 @@
             buf.append( " ) " );
         }
 
-        buf.append( '\n' );
+        if ( matchingRuleUse.getExtensions() != null )
+        {
+            getExtensions( buf, matchingRuleUse.getExtensions() );
+        }
+
+        buf.append( " )\n" );
+        
         return buf.toString();
     }
 
@@ -430,18 +450,19 @@
      * @param nameForm
      *            the NameForm to generate the description for
      * @return the NameFormDescription string
-     * @throws NamingException If an error is raised while accessing some of the nameForm
-     * data 
      */
-    public static String getDescription( NameForm nameForm ) throws NamingException
+    public static String getDescription( NameForm nameForm )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( nameForm.getOid() );
         buf.append( '\n' );
 
-        buf.append( "NAME " );
-        buf.append( nameForm.getName() );
-        buf.append( '\n' );
+        if ( nameForm.getName() != null )
+        {
+            buf.append( "NAME " );
+            buf.append( nameForm.getName() );
+            buf.append( '\n' );
+        }
 
         if ( nameForm.getDescription() != null )
         {
@@ -462,29 +483,23 @@
 
         buf.append( "MUST\n" );
         List<AttributeType> must = nameForm.getMustAttributeTypes();
-        
-        for ( AttributeType attributeType:must )
-        {
-            buf.append( '\t' );
-            buf.append( attributeType.getOid() );
-            buf.append( '\n' );
-        }
+
+        getQDStrings( buf, must );
 
         List<AttributeType> may = nameForm.getMayAttributeTypes();
 
         if ( ( may != null ) && ( may.size() > 0 ) )
         {
             buf.append( "MAY\n" );
-        
-            for ( AttributeType attributeType:may )
-            {
-                buf.append( '\t' );
-                buf.append( attributeType.getOid() );
-                buf.append( '\n' );
-            }
+            getQDStrings( buf, may );
         }
 
-        buf.append( " )" );
+        if ( nameForm.getExtensions() != null )
+        {
+            getExtensions( buf, nameForm.getExtensions() );
+        }
+
+        buf.append( " )\n" );
         return buf.toString();
     }
 
@@ -512,18 +527,19 @@
      * @param objectClass
      *            the ObjectClass to generate a description for
      * @return the description in the ObjectClassDescription syntax
-     * @throws NamingException If an error is raised while accessing some of the objectClass
-     * data 
      */
-    public static String getDescription( ObjectClass objectClass ) throws NamingException
+    public static String getDescription( ObjectClass objectClass )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( objectClass.getOid() );
         buf.append( '\n' );
 
-        buf.append( "NAME " );
-        buf.append( objectClass.getName() );
-        buf.append( '\n' );
+        if ( objectClass.getName() != null )
+        {
+            buf.append( "NAME " );
+            buf.append( objectClass.getName() );
+            buf.append( '\n' );
+        }
 
         if ( objectClass.getDescription() != null )
         {
@@ -543,13 +559,7 @@
         if ( ( sups != null ) && ( sups.size() > 0 ) )
         {
             buf.append( "SUP\n" );
-            
-            for ( ObjectClass sup:sups )
-            {
-                buf.append( '\t' );
-                buf.append( sup.getOid() );
-                buf.append( '\n' );
-            }
+            getQDStrings( buf, sups );
         }
 
         if ( objectClass.getType() != null )
@@ -563,13 +573,7 @@
         if ( ( must != null ) && ( must.size() > 0 ) )
         {
             buf.append( "MUST\n" );
-            
-            for ( AttributeType attributeType:must )
-            {
-                buf.append( '\t' );
-                buf.append( attributeType.getOid() );
-                buf.append( '\n' );
-            }
+            getQDStrings( buf, must );
         }
 
         List<AttributeType> may = objectClass.getMayAttributeTypes();
@@ -577,16 +581,15 @@
         if ( ( may != null ) && ( may.size() > 0 ) )
         {
             buf.append( "MAY\n" );
+            getQDStrings( buf, may );
+        }
 
-            for ( AttributeType attributeType:may )
-            {
-                buf.append( '\t' );
-                buf.append( attributeType.getOid() );
-                buf.append( '\n' );
-            }
+        if ( objectClass.getExtensions() != null )
+        {
+            getExtensions( buf, objectClass.getExtensions() );
         }
 
-        buf.append( " )" );
+        buf.append( " )\n" );
         return buf.toString();
     }
 
@@ -598,31 +601,33 @@
      * generated: that is 'DITStructureRuleDescription = ' is not generated.
      * 
      * <pre>
-     *  DITStructureRuleDescription = &quot;(&quot; whsp
-     *      ruleidentifier whsp           ; DITStructureRule identifier
-     *      [ &quot;NAME&quot; qdescrs ]
-     *      [ &quot;DESC&quot; qdstring ]
-     *      [ &quot;OBSOLETE&quot; whsp ]
-     *      &quot;FORM&quot; woid whsp              ; NameForm
-     *      [ &quot;SUP&quot; ruleidentifiers whsp ]; superior DITStructureRules
-     *  &quot;)&quot;
+     *   DITStructureRuleDescription = &quot;(&quot; whsp
+     *       ruleid                     ; rule identifier
+     *       [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
+     *       [ SP "DESC" SP qdstring ]  ; description
+     *       [ SP "OBSOLETE" ]          ; not active
+     *       SP "FORM" SP oid           ; NameForm
+     *       [ SP "SUP" ruleids ]       ; superior rules
+     *       extensions WSP             ; extensions
+     *       &quot;)&quot;
      * </pre>
      * 
      * @param dITStructureRule
      *            the DITStructureRule to generate the description for
      * @return the description in the DITStructureRuleDescription syntax
-     * @throws NamingException If an error is raised while accessing some of the dITStructureRule
-     * data 
      */
-    public static String getDescription( DITStructureRule dITStructureRule ) throws NamingException
+    public static String getDescription( DITStructureRule dITStructureRule )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( dITStructureRule.getOid() );
         buf.append( '\n' );
 
-        buf.append( "NAME " );
-        buf.append( dITStructureRule.getName() );
-        buf.append( '\n' );
+        if ( dITStructureRule.getName() != null )
+        {
+            buf.append( "NAME " );
+            buf.append( dITStructureRule.getName() );
+            buf.append( '\n' );
+        }
 
         if ( dITStructureRule.getDescription() != null )
         {
@@ -648,15 +653,37 @@
         {
             buf.append( "SUP\n" );
             
-            for ( Integer sup:sups )
+            if ( sups.size() == 1 )
+            {
+                buf.append( sups.get( 0 ) );
+            }
+            else
             {
-                buf.append( '\t' );
-                buf.append( sup );
-                buf.append( '\n' );
+                boolean isFirst = true;
+                buf.append( "( " );
+                
+                for ( int sup : sups )
+                {
+                    if ( isFirst )
+                    {
+                        isFirst = false;
+                    }
+                    else
+                    {
+                        buf.append( " " );
+                    }
+                    
+                    buf.append( sup );
+                }
+                
+                buf.append( " )" );
             }
+
+            buf.append( '\n' );
         }
 
-        buf.append( " )" );
+        buf.append( " )\n" );
+
         return buf.toString();
     }
 
@@ -671,7 +698,8 @@
      *  SyntaxDescription = &quot;(&quot; whsp
      *      numericoid whsp
      *      [ &quot;DESC&quot; qdstring ]
-     *  whsp &quot;)&quot;
+     *      [ extensions ]
+     *      whsp &quot;)&quot;
      * </pre>
      * 
      * @param syntax
@@ -680,7 +708,7 @@
      */
     public static String getDescription( LdapSyntax syntax )
     {
-        StringBuffer buf = new StringBuffer( "( " );
+        StringBuilder buf = new StringBuilder( "( " );
         buf.append( syntax.getOid() );
         buf.append( '\n' );
 
@@ -691,7 +719,89 @@
             buf.append( '\n' );
         }
 
+        if ( syntax.getExtensions() != null )
+        {
+            getExtensions( buf, syntax.getExtensions() );
+        }
+        
         buf.append( " )" );
         return buf.toString();
     }
+
+    
+    private static void getExtensions( StringBuilder sb, Map<String, List<String>> extensions )
+    {
+        for ( String key:extensions.keySet() )
+        {
+            sb.append( key ).append( " " );
+            
+            List<String> values = extensions.get( key );
+            
+            if ( ( values != null ) && ( values.size() != 0 ) ) 
+            {
+                if ( values.size() == 1 )
+                {
+                    sb.append( values.get( 0 ) );
+                }
+                else
+                {
+                    boolean isFirst = true;
+                    sb.append( "( " );
+                    
+                    for ( String value : values )
+                    {
+                        if ( isFirst )
+                        {
+                            isFirst = false;
+                        }
+                        else
+                        {
+                            sb.append( " " );
+                        }
+                        
+                        sb.append( value );
+                    }
+                    
+                    sb.append( " )" );
+                }
+            }
+            
+            sb.append( '\n' );
+        }
+    }
+
+    
+    private static void getQDStrings( StringBuilder sb, List<? extends SchemaObject> schemaObjects )
+    {
+        if ( ( schemaObjects != null ) && ( schemaObjects.size() != 0 ) ) 
+        {
+            if ( schemaObjects.size() == 1 )
+            {
+                sb.append( schemaObjects.get( 0 ).getName() );
+            }
+            else
+            {
+                boolean isFirst = true;
+                sb.append( "( " );
+                
+                for ( SchemaObject schemaObject : schemaObjects )
+                {
+                    if ( isFirst )
+                    {
+                        isFirst = false;
+                    }
+                    else
+                    {
+                        sb.append( " " );
+                    }
+                    
+                    sb.append( schemaObject.getName() );
+                }
+                
+                sb.append( " )" );
+            }
+        }
+        
+        sb.append(  '\n' );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java Sun Aug 30 22:13:56 2009
@@ -162,4 +162,13 @@
             this.syntaxChecker = syntaxChecker;
         }
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRule.java Sun Aug 30 22:13:56 2009
@@ -232,4 +232,11 @@
             this.normalizer = normalizer;
         }
     }
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java Sun Aug 30 22:13:56 2009
@@ -220,5 +220,13 @@
             }
         }
     }
-    
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java Sun Aug 30 22:13:56 2009
@@ -179,9 +179,8 @@
      * attributes for.
      * 
      * @return the ObjectClass's oid this NameForm is for
-     * @throws NamingException If the structuralObjectClass is invalid
      */
-    public String getStructuralObjectClassOid() throws NamingException
+    public String getStructuralObjectClassOid()
     {
         return structuralObjectClassOid;
     }
@@ -249,9 +248,8 @@
      * Rdn.
      * 
      * @return the AttributeTypes of the must use attributes
-     * @throws NamingException if there is a failure resolving one AttributeTyoe
      */
-    public List<AttributeType> getMustAttributeTypes() throws NamingException
+    public List<AttributeType> getMustAttributeTypes()
     {
         return Collections.unmodifiableList( mustAttributeTypes );
     }
@@ -345,9 +343,8 @@
      * part of the Rdn.
      * 
      * @return the AttributeTypes of the may use attributes
-     * @throws NamingException if there is a failure resolving one AttributeTyoe
      */
-    public List<AttributeType> getMayAttributeTypes() throws NamingException
+    public List<AttributeType> getMayAttributeTypes()
     {
         return Collections.unmodifiableList( mayAttributeTypes );
     }
@@ -419,4 +416,13 @@
             }
         }
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java Sun Aug 30 22:13:56 2009
@@ -495,4 +495,13 @@
     {
         return objectClassType == ObjectClassTypeEnum.AUXILIARY;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return DescriptionUtils.getDescription( this );
+    }
 }
\ No newline at end of file

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java Sun Aug 30 22:13:56 2009
@@ -483,9 +483,9 @@
             buf.append( " OBSOLETE" );
         }
 
-        if ( at.getSup() != null )
+        if ( at.getSuperior() != null )
         {
-            buf.append( " SUP " ).append( at.getSup().getName() );
+            buf.append( " SUP " ).append( at.getSuperior().getName() );
         }
 
         if ( at.getEquality() != null )
@@ -498,22 +498,22 @@
             buf.append( " ORDERING " ).append( at.getOrdering().getName() );
         }
 
-        if ( at.getSubstr() != null )
+        if ( at.getSubstring() != null )
         {
-            buf.append( " SUBSTR " ).append( at.getSubstr().getName() );
+            buf.append( " SUBSTR " ).append( at.getSubstring().getName() );
         }
 
         if ( at.getSyntax() != null )
         {
             buf.append( " SYNTAX " ).append( at.getSyntax().getOid() );
 
-            if ( at.getLength() > 0 )
+            if ( at.getSyntaxLength() > 0 )
             {
-                buf.append( "{" ).append( at.getLength() ).append( "}" );
+                buf.append( "{" ).append( at.getSyntaxLength() ).append( "}" );
             }
         }
 
-        if ( at.isSingleValue() )
+        if ( at.isSingleValued() )
         {
             buf.append( " SINGLE-VALUE" );
         }
@@ -523,7 +523,7 @@
             buf.append( " COLLECTIVE" );
         }
 
-        if ( !at.isCanUserModify() )
+        if ( !at.isUserModifiable() )
         {
             buf.append( " NO-USER-MODIFICATION" );
         }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ParserDescriptionUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ParserDescriptionUtils.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ParserDescriptionUtils.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ParserDescriptionUtils.java Sun Aug 30 22:13:56 2009
@@ -114,7 +114,7 @@
         }
 
         // check that the same super type is being used for both attributes
-        if ( ! at0.getSupOid().equals( at1.getSupOid() ) )
+        if ( ! at0.getSuperiorOid().equals( at1.getSuperiorOid() ) )
         {
             return false;
         }
@@ -126,7 +126,7 @@
         }
         
         // check that the same matchingRule is used by both ATs for SUBSTRING
-        if ( ! at0.getSubstrOid().equals( at1.getSubstrOid() ) )
+        if ( ! at0.getSubstringOid().equals( at1.getSubstringOid() ) )
         {
             return false;
         }
@@ -144,13 +144,13 @@
         }
         
         // check that the syntax length constraint is the same for both
-        if ( at0.getLength() != at1.getLength() )
+        if ( at0.getSyntaxLength() != at1.getSyntaxLength() )
         {
             return false;
         }
         
         // check that the ATs have the same single valued flag value
-        if ( at0.isSingleValue() != at1.isSingleValue() )
+        if ( at0.isSingleValued() != at1.isSingleValued() )
         {
             return false;
         }
@@ -162,7 +162,7 @@
         }
         
         // check that the ATs have the same user modifiable flag value
-        if ( at0.isCanUserModify() != at1.isCanUserModify() )
+        if ( at0.isUserModifiable() != at1.isUserModifiable() )
         {
             return false;
         }

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistry.java Sun Aug 30 22:13:56 2009
@@ -141,7 +141,7 @@
         addMappingFor( attributeType );
 
         // Register this AttributeType into the Descendant map
-        registerDescendants( attributeType, attributeType.getSup() );
+        registerDescendants( attributeType, attributeType.getSuperior() );
         
         // Internally associate the OID to the registered AttributeType
         if ( IS_DEBUG )
@@ -180,7 +180,7 @@
         descendants.add( attributeType );
         
         // And recurse until we reach the top of the hierarchy
-        registerDescendants( attributeType, ancestor.getSup() );
+        registerDescendants( attributeType, ancestor.getSuperior() );
     }
     
     

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java Sun Aug 30 22:13:56 2009
@@ -501,7 +501,7 @@
 
         try
         {
-            isSuccess &= resolve( at.getSup(), errors );
+            isSuccess &= resolve( at.getSuperior(), errors );
         }
         catch ( Exception e )
         {
@@ -541,9 +541,9 @@
 
         try
         {
-            isSuccess &= resolve( at.getSubstr(), errors );
+            isSuccess &= resolve( at.getSubstring(), errors );
 
-            if ( at.getSubstr() != null )
+            if ( at.getSubstring() != null )
             {
                 hasMatchingRule |= true;
             }

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/SchemaUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/SchemaUtilsTest.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/SchemaUtilsTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/SchemaUtilsTest.java Sun Aug 30 22:13:56 2009
@@ -76,9 +76,9 @@
         ats[0] = new AttributeType( "2.5.4.41" );
         ats[0].addName( "name" );
         ats[0].setSyntax(  getSyntaxes()[1] );
-        ats[0].setLength( 32768 );
+        ats[0].setSyntaxLength( 32768 );
         ats[0].setEquality( getMatchingRules()[0] );
-        ats[0].setSubstr( getMatchingRules()[1] );
+        ats[0].setSubstring( getMatchingRules()[1] );
 
         // ( 2.5.4.3 NAME 'cn' SUP name )
         ats[1] = new AttributeType( "2.5.4.3" );
@@ -87,23 +87,23 @@
         ats[2] = new AttributeType( "2.5.4.41" );
         ats[2].addName( "name" );
         ats[2].setSyntax( getSyntaxes()[1] );
-        ats[2].setLength( 32768 );
+        ats[2].setSyntaxLength( 32768 );
         ats[2].setEquality( getMatchingRules()[0] );
-        ats[2].setSubstr( getMatchingRules()[1] );
+        ats[2].setSubstring( getMatchingRules()[1] );
 
         ats[3] = new AttributeType( "2.5.4.41" );
         ats[3].addName( "name" );
         ats[3].setSyntax( getSyntaxes()[1] );
-        ats[3].setLength( 32768 );
+        ats[3].setSyntaxLength( 32768 );
         ats[3].setEquality( getMatchingRules()[0] );
-        ats[3].setSubstr( getMatchingRules()[1] );
+        ats[3].setSubstring( getMatchingRules()[1] );
 
         ats[4] = new AttributeType( "2.5.4.41" );
         ats[4].addName( "name" );
         ats[4].setSyntax( getSyntaxes()[1] );
-        ats[4].setLength( 32768 );
+        ats[4].setSyntaxLength( 32768 );
         ats[4].setEquality( getMatchingRules()[0] );
-        ats[4].setSubstr( getMatchingRules()[1] );
+        ats[4].setSubstring( getMatchingRules()[1] );
 
         return ats;
     }

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/parser/OpenLdapSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/parser/OpenLdapSchemaParserTest.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/parser/OpenLdapSchemaParserTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/parser/OpenLdapSchemaParserTest.java Sun Aug 30 22:13:56 2009
@@ -114,7 +114,7 @@
         assertEquals( "knowledgeInformation", type.getName() );
         assertEquals( "RFC2256: knowledge information", type.getDescription() );
         assertEquals( "1.3.6.1.4.1.1466.115.121.1.15", type.getSyntaxOid() );
-        assertEquals( 32768, type.getLength() );
+        assertEquals( 32768, type.getSyntaxLength() );
     }
 
 
@@ -134,7 +134,7 @@
         assertEquals( "knowledgeInformation", type.getName() );
         assertEquals( "RFC2256: \"knowledge\" information", type.getDescription() );
         assertEquals( "1.3.6.1.4.1.1466.115.121.1.15", type.getSyntaxOid() );
-        assertEquals( 32768, type.getLength() );
+        assertEquals( 32768, type.getSyntaxLength() );
     }
 
 
@@ -155,7 +155,7 @@
         assertEquals( "knowledgeInformation", type.getName() );
         assertEquals( "RFC2256: knowledge information", type.getDescription() );
         assertEquals( "1.3.6.1.4.1.1466.115.121.1.15", type.getSyntaxOid() );
-        assertEquals( 32768, type.getLength() );
+        assertEquals( 32768, type.getSyntaxLength() );
     }
 
 

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java?rev=809424&r1=809423&r2=809424&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/AttributeTypeDescriptionSchemaParserTest.java Sun Aug 30 22:13:56 2009
@@ -125,37 +125,37 @@
         // no SUP
         value = "( 1.1 SYNTAX 1.1 )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertNull( attributeType.getSupOid() );
+        assertNull( attributeType.getSuperiorOid() );
 
         // SUP numericoid
         value = "( 1.1 SYNTAX 1.1 SUP 1.2.3.4.5.6.7.8.9.0 )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "1.2.3.4.5.6.7.8.9.0", attributeType.getSupOid() );
+        assertEquals( "1.2.3.4.5.6.7.8.9.0", attributeType.getSuperiorOid() );
 
         // SUP descr, no space
         value = "(1.1 SYNTAX1.1 SUPabcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789)";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType.getSupOid() );
+        assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType.getSuperiorOid() );
 
         // SUP descr, newline
         value = "\t(\t1.1\tSYNTAX\t1.1\tSUP\tabcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789\t)\t";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType.getSupOid() );
+        assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType.getSuperiorOid() );
 
         // quoted SUP value
         value = "( 1.1 SYNTAX 1.1 SUP 'name' )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "name", attributeType.getSupOid() );
+        assertEquals( "name", attributeType.getSuperiorOid() );
 
         // quoted SUP value
         value = "( 1.1 SYNTAX 1.1 SUP '1.2.3.4' )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "1.2.3.4", attributeType.getSupOid() );
+        assertEquals( "1.2.3.4", attributeType.getSuperiorOid() );
 
         // quoted SUP value
         value = "( 1.1 SYNTAX 1.1 SUP ('1.2.3.4') )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "1.2.3.4", attributeType.getSupOid() );
+        assertEquals( "1.2.3.4", attributeType.getSuperiorOid() );
 
         // invalid character
         value = "( 1.1 SYNTAX 1.1 SUP 1.2.3.4.A )";
@@ -298,34 +298,34 @@
         // no SUBSTR
         value = "( 1.1 SYNTAX 1.1 )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertNull( attributeType.getSubstrOid() );
+        assertNull( attributeType.getSubstringOid() );
 
         // SUBSTR numericoid
         value = "( 1.1 SYNTAX 1.1 SUBSTR 1.2.3.4567.8.9.0 )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "1.2.3.4567.8.9.0", attributeType.getSubstrOid() );
+        assertEquals( "1.2.3.4567.8.9.0", attributeType.getSubstringOid() );
 
         // SUBSTR descr, no space
         value = "(1.1 SYNTAX1.1 SUBSTRabcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789)";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType
-            .getSubstrOid() );
+            .getSubstringOid() );
 
         // SUBSTR descr, newline
         value = "\r\n(\r\n1.1\r\nSYNTAX\r\n1.1\r\nSUBSTR\r\nabcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789\r\n)\r\n";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType
-            .getSubstrOid() );
+            .getSubstringOid() );
 
         // quoted value
         value = "( 1.1 SYNTAX 1.1 SUBSTR 'caseIgnoreSubstringsMatch' )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstrOid() );
+        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstringOid() );
 
         // quote value in parentheses
         value = "( 1.1 SYNTAX 1.1 SUBSTR ('caseIgnoreSubstringsMatch') )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstrOid() );
+        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstringOid() );
     }
 
 
@@ -344,61 +344,61 @@
         value = "( 1.1 SUP 1.1 )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertNull( attributeType.getSyntaxOid() );
-        assertEquals( 0, attributeType.getLength() );
+        assertEquals( 0, attributeType.getSyntaxLength() );
 
         // SYNTAX string
         value = "( 1.1 SYNTAX IA5String )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "IA5String", attributeType.getSyntaxOid() );
-        assertEquals( 0, attributeType.getLength() );
+        assertEquals( 0, attributeType.getSyntaxLength() );
 
         // SYNTAX numericoid
         value = "( 1.1 SYNTAX 1.2.3.4567.8.9.0 )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3.4567.8.9.0", attributeType.getSyntaxOid() );
-        assertEquals( 0, attributeType.getLength() );
+        assertEquals( 0, attributeType.getSyntaxLength() );
         
         // quoted numericoid
         value = "( 1.1 SYNTAX '1.2.3.4567.8.9.0' )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3.4567.8.9.0", attributeType.getSyntaxOid() );
-        assertEquals( 0, attributeType.getLength() );
+        assertEquals( 0, attributeType.getSyntaxLength() );
 
         // quoted numericoid
         value = "( 1.1 SYNTAX ('1.2.3.4567.8.9.0') )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3.4567.8.9.0", attributeType.getSyntaxOid() );
-        assertEquals( 0, attributeType.getLength() );
+        assertEquals( 0, attributeType.getSyntaxLength() );
 
         // SYNTAX numericoid and length, no spaces
         value = "(1.1 SYNTAX1.2.3.4567.8.9.0{1234567890})";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3.4567.8.9.0", attributeType.getSyntaxOid() );
-        assertEquals( 1234567890, attributeType.getLength() );
+        assertEquals( 1234567890, attributeType.getSyntaxLength() );
 
         // SYNTAX, with tabs
         value = "\t(\t1.1\tSYNTAX\t1.2.3.4567.8.9.0\t{1234567890}\t)\t";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3.4567.8.9.0", attributeType.getSyntaxOid() );
-        assertEquals( 1234567890, attributeType.getLength() );
+        assertEquals( 1234567890, attributeType.getSyntaxLength() );
 
         // SYNTAX numericoid and zero length
         value = "( 1.1 SYNTAX 1.2.3 {0} )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3", attributeType.getSyntaxOid() );
-        assertEquals( 0, attributeType.getLength() );
+        assertEquals( 0, attributeType.getSyntaxLength() );
 
         // quoted value
         value = "( 1.1 SYNTAX '1.2.3{32}' )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3", attributeType.getSyntaxOid() );
-        assertEquals( 32, attributeType.getLength() );
+        assertEquals( 32, attributeType.getSyntaxLength() );
 
         // quote value in parentheses
         value = "( 1.1 SYNTAX ( '1.2.3{32}' ) )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3", attributeType.getSyntaxOid() );
-        assertEquals( 32, attributeType.getLength() );
+        assertEquals( 32, attributeType.getSyntaxLength() );
 
         // empty length
         value = "( 1.1 SYNTAX 1.2.3.4{} )";
@@ -416,7 +416,7 @@
         value = "( 1.1 SYNTAX 1.2.3.4{01} )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertEquals( "1.2.3.4", attributeType.getSyntaxOid() );
-        assertEquals( 1, attributeType.getLength() );
+        assertEquals( 1, attributeType.getSyntaxLength() );
 
         // invalid syntax length
         value = "( 1.1 SYNTAX 1.2.3.4{X} )";
@@ -471,17 +471,17 @@
         // not single-value
         value = "( 1.1 SYNTAX 1.1 NAME 'test' DESC 'Descripton' )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertFalse( attributeType.isSingleValue() );
+        assertFalse( attributeType.isSingleValued() );
 
         // single-value
         value = "(1.1 SYNTAX 1.1 NAME 'test' DESC 'Descripton' SINGLE-VALUE)";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertTrue( attributeType.isSingleValue() );
+        assertTrue( attributeType.isSingleValued() );
 
         // single-value 
         value = "(1.1 SYNTAX 1.1 SINGLE-VALUE)";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertTrue( attributeType.isSingleValue() );
+        assertTrue( attributeType.isSingleValued() );
 
         // invalid
         value = "(1.1 SYNTAX 1.1 NAME 'test' DESC 'Descripton' SINGLE-VALU )";
@@ -551,17 +551,17 @@
         // not NO-USER-MODIFICATION
         value = "( 1.1 SYNTAX 1.1 NAME 'test' DESC 'Descripton' )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertTrue( attributeType.isCanUserModify() );
+        assertTrue( attributeType.isUserModifiable() );
 
         // NO-USER-MODIFICATION
         value = "(1.1 SYNTAX 1.1 NAME 'test' DESC 'Descripton' NO-USER-MODIFICATION USAGE directoryOperation )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertFalse( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isUserModifiable() );
 
         // NO-USER-MODIFICATION 
         value = "(1.1 SYNTAX 1.1 NO-USER-MODIFICATION USAGE directoryOperation )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertFalse( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isUserModifiable() );
 
         // ivalid
         value = "(1.1 SYNTAX 1.1 NAME 'test' DESC 'Descripton' NO-USER-MODIFICATIO USAGE directoryOperation )";
@@ -664,16 +664,16 @@
         assertEquals( "test", attributeType.getNames().get( 1 ) );
         assertEquals( "Descripton \u00E4\u00F6\u00FC\u00DF \u90E8\u9577", attributeType.getDescription() );
         assertTrue( attributeType.isObsolete() );
-        assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType.getSupOid() );
+        assertEquals( "abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789", attributeType.getSuperiorOid() );
         assertEquals( "2.3.4.5.6.7.8.9.0.1", attributeType.getEqualityOid() );
         assertEquals( "3.4.5.6.7.8.9.0.1.2", attributeType.getOrderingOid() );
-        assertEquals( "4.5.6.7.8.9.0.1.2.3", attributeType.getSubstrOid() );
+        assertEquals( "4.5.6.7.8.9.0.1.2.3", attributeType.getSubstringOid() );
         assertEquals( "5.6.7.8.9.0.1.2.3.4", attributeType.getSyntaxOid() );
-        assertEquals( 1234567890, attributeType.getLength() );
+        assertEquals( 1234567890, attributeType.getSyntaxLength() );
 
-        assertTrue( attributeType.isSingleValue() );
+        assertTrue( attributeType.isSingleValued() );
         assertFalse( attributeType.isCollective() );
-        assertFalse( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isUserModifiable() );
         assertEquals( UsageEnum.DSA_OPERATION, attributeType.getUsage() );
 
         assertEquals( 2, attributeType.getExtensions().size() );
@@ -723,17 +723,17 @@
         value = "( 1.2.3.4.5.6.7.8.9.0 SYNTAX 1.1 SUP 1.1 )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertNotNull( attributeType.getSyntaxOid() );
-        assertNotNull( attributeType.getSupOid() );
+        assertNotNull( attributeType.getSuperiorOid() );
 
         value = "( 1.2.3.4.5.6.7.8.9.0 SYNTAX 1.1 )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertNotNull( attributeType.getSyntaxOid() );
-        assertNull( attributeType.getSupOid() );
+        assertNull( attributeType.getSuperiorOid() );
 
         value = "( 1.2.3.4.5.6.7.8.9.0 SUP 1.1 )";
         attributeType = parser.parseAttributeTypeDescription( value );
         assertNull( attributeType.getSyntaxOid() );
-        assertNotNull( attributeType.getSupOid() );
+        assertNotNull( attributeType.getSuperiorOid() );
 
         if ( !parser.isQuirksMode() )
         {
@@ -825,17 +825,17 @@
 
         value = "( 1.1 SYNTAX 1.1 NO-USER-MODIFICATION USAGE directoryOperation )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertFalse( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isUserModifiable() );
         assertEquals( UsageEnum.DIRECTORY_OPERATION, attributeType.getUsage() );
 
         value = "( 1.1 SYNTAX 1.1 NO-USER-MODIFICATION USAGE dSAOperation )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertFalse( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isUserModifiable() );
         assertEquals( UsageEnum.DSA_OPERATION, attributeType.getUsage() );
 
         value = "( 1.1 SYNTAX 1.1 NO-USER-MODIFICATION USAGE distributedOperation )";
         attributeType = parser.parseAttributeTypeDescription( value );
-        assertFalse( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isUserModifiable() );
         assertEquals( UsageEnum.DISTRIBUTED_OPERATION, attributeType.getUsage() );
 
         if ( !parser.isQuirksMode() )
@@ -881,9 +881,9 @@
         assertEquals( "cn", attributeType.getNames().get( 0 ) );
         assertEquals( "commonName", attributeType.getNames().get( 1 ) );
         assertEquals( "RFC2256: common name(s) for which the entity is known by", attributeType.getDescription() );
-        assertEquals( "name", attributeType.getSupOid() );
+        assertEquals( "name", attributeType.getSuperiorOid() );
         assertEquals( "caseIgnoreMatch", attributeType.getEqualityOid() );
-        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstrOid() );
+        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstringOid() );
         assertEquals( "1.3.6.1.4.1.1466.115.121.1.15", attributeType.getSyntaxOid() );
         assertEquals( UsageEnum.USER_APPLICATIONS, attributeType.getUsage() );
         assertEquals( 0, attributeType.getExtensions().size() );
@@ -905,19 +905,19 @@
         assertEquals( "uid", attributeType.getNames().get( 0 ) );
         assertEquals( "userid", attributeType.getNames().get( 1 ) );
         assertEquals( "RFC1274: user identifier", attributeType.getDescription() );
-        assertNull( attributeType.getSupOid() );
+        assertNull( attributeType.getSuperiorOid() );
 
         assertEquals( "caseIgnoreMatch", attributeType.getEqualityOid() );
-        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstrOid() );
+        assertEquals( "caseIgnoreSubstringsMatch", attributeType.getSubstringOid() );
         assertNull( attributeType.getOrderingOid() );
         assertEquals( "1.3.6.1.4.1.1466.115.121.1.15", attributeType.getSyntaxOid() );
-        assertEquals( 256, attributeType.getLength() );
+        assertEquals( 256, attributeType.getSyntaxLength() );
         assertEquals( UsageEnum.USER_APPLICATIONS, attributeType.getUsage() );
 
         assertFalse( attributeType.isObsolete() );
         assertFalse( attributeType.isCollective() );
-        assertFalse( attributeType.isSingleValue() );
-        assertTrue( attributeType.isCanUserModify() );
+        assertFalse( attributeType.isSingleValued() );
+        assertTrue( attributeType.isUserModifiable() );
 
         assertEquals( 0, attributeType.getExtensions().size() );
     }
@@ -936,8 +936,8 @@
         assertEquals( "bogus", desc.getNames().get( 0 ) );
         assertEquals( "bogusName", desc.getNames().get( 1 ) );
         assertEquals( "bogus description", desc.getDescription() );
-        assertEquals( "name", desc.getSupOid() );
-        assertEquals( true, desc.isSingleValue() );
+        assertEquals( "name", desc.getSuperiorOid() );
+        assertEquals( true, desc.isSingleValued() );
     }
 
 
@@ -954,8 +954,8 @@
         assertEquals( "bogus", desc.getNames().get( 0 ) );
         assertEquals( "bogusName", desc.getNames().get( 1 ) );
         assertEquals( "bogus description", desc.getDescription() );
-        assertEquals( "name", desc.getSupOid() );
-        assertEquals( true, desc.isSingleValue() );
+        assertEquals( "name", desc.getSuperiorOid() );
+        assertEquals( true, desc.isSingleValued() );
         assertEquals( "blah", desc.getExtensions().get( "X-SCHEMA" ).get( 0 ) );
     }
 
@@ -1030,7 +1030,7 @@
             // SUPERTYPE with underscore
             value = "( 1.1 SYNTAX 1.1 SUP te_st )";
             attributeType = parser.parseAttributeTypeDescription( value );
-            assertEquals( "te_st", attributeType.getSupOid() );
+            assertEquals( "te_st", attributeType.getSuperiorOid() );
 
             // EQUALITY with underscore
             value = "( 1.1 SYNTAX 1.1 EQUALITY te_st )";
@@ -1040,7 +1040,7 @@
             // SUBSTR with underscore
             value = "( 1.1 SYNTAX 1.1 SUBSTR te_st )";
             attributeType = parser.parseAttributeTypeDescription( value );
-            assertEquals( "te_st", attributeType.getSubstrOid() );
+            assertEquals( "te_st", attributeType.getSubstringOid() );
 
             // ORDERING with underscore
             value = "( 1.1 SYNTAX 1.1 ORDERING te_st )";



Mime
View raw message