directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r523771 - in /directory/shared/trunk/convert/src: main/java/org/apache/directory/shared/converter/schema/ test/java/org/apache/directory/shared/converter/schema/
Date Thu, 29 Mar 2007 17:19:28 GMT
Author: pamarcelot
Date: Thu Mar 29 10:19:27 2007
New Revision: 523771

URL: http://svn.apache.org/viewvc?view=rev&rev=523771
Log:
Updated Schema Converter. Fixed LDIF generation to match the hierarchy of the 'cn=schema'
children and DNs.

Modified:
    directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
    directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
    directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
    directory/shared/trunk/convert/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java

Modified: directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java?view=diff&rev=523771&r1=523770&r2=523771
==============================================================================
--- directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
(original)
+++ directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/AttributeTypeHolder.java
Thu Mar 29 10:19:27 2007
@@ -21,14 +21,20 @@
 
 
 import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
 
+import org.apache.directory.shared.ldap.ldif.LdifUtils;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
 
 
 /**
  * A bean used to hold the literal values of an AttributeType parsed out of an
  * OpenLDAP schema configuration file.
- *
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 476875 $
  */
@@ -36,16 +42,16 @@
 {
     /** A flag for single valued attributes. Default to false */
     private boolean singleValue = false;
-    
+
     /** A flag for collective attribute. Default to false */
     private boolean collective = false;
-    
+
     /** A flaf for immutable attribue. Default to false */
     private boolean noUserModification = false;
 
     /** The optional superior */
     private String superior;
-    
+
     /** The equality matching rule */
     private String equality;
 
@@ -72,7 +78,8 @@
     /**
      * Create an instance of an attributeType
      * 
-     * @param oid The attributeType's OID
+     * @param oid
+     *            The attributeType's OID
      */
     public AttributeTypeHolder( String oid )
     {
@@ -86,6 +93,7 @@
 
     /**
      * Tells if the attribute is single-valued
+     * 
      * @return true if the attribute is single-valued, false otherwise
      */
     public boolean isSingleValue()
@@ -93,17 +101,22 @@
         return singleValue;
     }
 
+
     /**
      * Set the attributeType singleValue flag
-     * @param singleValue The value for this flag
+     * 
+     * @param singleValue
+     *            The value for this flag
      */
     public void setSingleValue( boolean singleValue )
     {
         this.singleValue = singleValue;
     }
 
+
     /**
      * Tells if the attributeType is collectove or not
+     * 
      * @return True if the attributeType is collective, false otherwise
      */
     public boolean isCollective()
@@ -111,17 +124,22 @@
         return collective;
     }
 
+
     /**
      * Set the attributeType collective flag
-     * @param collective The value for this flag
+     * 
+     * @param collective
+     *            The value for this flag
      */
     public void setCollective( boolean collective )
     {
         this.collective = collective;
     }
 
+
     /**
      * Tellse if the attributeType is mutable or not
+     * 
      * @return True if the attributeType is immutable, false otherwise
      */
     public boolean isNoUserModification()
@@ -129,17 +147,22 @@
         return noUserModification;
     }
 
+
     /**
      * Set the attributeType noUserModification flag
-     * @param noUserModification The value for this flag
+     * 
+     * @param noUserModification
+     *            The value for this flag
      */
     public void setNoUserModification( boolean noUserModification )
     {
         this.noUserModification = noUserModification;
     }
 
+
     /**
      * Get the optional attributeType's superior
+     * 
      * @return The attributeType's superior, if any
      */
     public String getSuperior()
@@ -147,71 +170,91 @@
         return superior;
     }
 
+
     /**
      * Set the attributeType's superior
-     * @param superior The attributeType's superior
+     * 
+     * @param superior
+     *            The attributeType's superior
      */
     public void setSuperior( String superior )
     {
         this.superior = superior;
     }
 
+
     /**
      * Get the equality Matching Rule
+     * 
      * @return The equality matchingRule
-     */    
+     */
     public String getEquality()
     {
         return equality;
     }
 
+
     /**
      * Set the equality Matching Rule
-     * @param equality The equality Matching Rule
+     * 
+     * @param equality
+     *            The equality Matching Rule
      */
     public void setEquality( String equality )
     {
         this.equality = equality;
     }
 
+
     /**
      * Get the ordering Matching Rule
+     * 
      * @return The ordering matchingRule
-     */    
+     */
     public String getOrdering()
     {
         return ordering;
     }
 
+
     /**
      * Set the ordering Matching Rule
-     * @param ordering The ordering Matching Rule
+     * 
+     * @param ordering
+     *            The ordering Matching Rule
      */
     public void setOrdering( String ordering )
     {
         this.ordering = ordering;
     }
 
+
     /**
      * Get the substring Matching Rule
+     * 
      * @return The substring matchingRule
-     */    
+     */
     public String getSubstr()
     {
         return substr;
     }
 
+
     /**
      * Set the substring Matching Rule
-     * @param substr The substring Matching Rule
+     * 
+     * @param substr
+     *            The substring Matching Rule
      */
     public void setSubstr( String substr )
     {
         this.substr = substr;
     }
 
+
     /**
      * Get the attributeType's syntax
+     * 
      * @return The attributeType's syntax
      */
     public String getSyntax()
@@ -219,17 +262,22 @@
         return syntax;
     }
 
+
     /**
      * Set the attributeType's syntax
-     * @param syntax The attributeType's syntax
+     * 
+     * @param syntax
+     *            The attributeType's syntax
      */
     public void setSyntax( String syntax )
     {
         this.syntax = syntax;
     }
 
+
     /**
      * Get the attributeType's usage
+     * 
      * @return The attributeType's usage
      */
     public UsageEnum getUsage()
@@ -237,17 +285,22 @@
         return usage;
     }
 
+
     /**
-     * Set the attributeType's usage 
-     * @param usage The attributeType's usage
+     * Set the attributeType's usage
+     * 
+     * @param usage
+     *            The attributeType's usage
      */
     public void setUsage( UsageEnum usage )
     {
         this.usage = usage;
     }
 
+
     /**
      * Get the attributeType's syntax length
+     * 
      * @return The attributeType's syntax length
      */
     public int getOidLen()
@@ -255,25 +308,30 @@
         return oidLen;
     }
 
+
     /**
      * Set the attributeType's syntax length
-     * @param oidLen The attributeType's syntax length
+     * 
+     * @param oidLen
+     *            The attributeType's syntax length
      */
     public void setOidLen( int oidLen )
     {
         this.oidLen = oidLen;
     }
 
+
     /**
      * Convert this attributeType to a Ldif string
      * 
-     * @param schemaName The name of the schema file containing this attributeType
+     * @param schemaName
+     *            The name of the schema file containing this attributeType
      * @return A ldif formatted string
      */
     public String toLdif( String schemaName ) throws NamingException
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( schemaToLdif( schemaName, "metaAttributeType" ) );
 
         // The superior
@@ -281,62 +339,62 @@
         {
             sb.append( "m-supAttributeType: " ).append( superior ).append( '\n' );
         }
-        
+
         // The equality matching rule
         if ( equality != null )
         {
             sb.append( "m-equality: " ).append( equality ).append( '\n' );
         }
-        
+
         // The ordering matching rule
         if ( ordering != null )
         {
             sb.append( "m-ordering: " ).append( ordering ).append( '\n' );
         }
-        
-        //  The substrings matching rule
+
+        // The substrings matching rule
         if ( substr != null )
         {
             sb.append( "m-substr: " ).append( substr ).append( '\n' );
         }
-        
+
         // The value syntax
         if ( syntax != null )
         {
             sb.append( "m-syntax: " ).append( syntax );
-            
+
             if ( oidLen != -1 )
             {
                 sb.append( '{' ).append( oidLen ).append( '}' );
             }
-            
+
             sb.append( '\n' );
         }
-        
+
         // The single value flag
         if ( singleValue )
         {
             sb.append( "m-singleValue: true\n" );
         }
-        
+
         // The collective flag
         if ( collective )
         {
             sb.append( "m-collective: true\n" );
         }
-        
+
         // The not user modifiable flag
         if ( noUserModification )
         {
             sb.append( "m-noUserModification: true\n" );
         }
-        
+
         // The usage value
         if ( usage != UsageEnum.USER_APPLICATIONS )
         {
             sb.append( "m-usage: " ).append( usage.render() ).append( '\n' );
         }
-        
+
         // The extensions
         if ( extensions.size() != 0 )
         {
@@ -344,14 +402,35 @@
         }
 
         return sb.toString();
-        
+
     }
 
+
     /**
      * Return a String representing this AttributeType.
      */
     public String toString()
     {
         return getOid();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.shared.converter.schema.SchemaElementImpl#dnToLdif(java.lang.String)
+     */
+    public String dnToLdif( String schemaName ) throws NamingException
+    {
+        StringBuilder sb = new StringBuilder();
+
+        String dn = "m-oid=" + oid + ", ou=attributeTypes" + ", cn=" + Rdn.escapeValue( schemaName
) + ", ou=schema";
+
+        // First dump the DN only
+        Attributes attributes = new AttributesImpl();
+        Attribute attribute = new AttributeImpl( "dn", dn );
+
+        attributes.put( attribute );
+        sb.append( LdifUtils.convertToLdif( attributes ) );
+
+        return sb.toString();
     }
 }

Modified: directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java?view=diff&rev=523771&r1=523770&r2=523771
==============================================================================
--- directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
(original)
+++ directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/ObjectClassHolder.java
Thu Mar 29 10:19:27 2007
@@ -24,7 +24,13 @@
 import java.util.List;
 
 import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
 
+import org.apache.directory.shared.ldap.ldif.LdifUtils;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
 
 
@@ -39,16 +45,17 @@
 {
     /** The list of superiors */
     private List<String> superiors = new ArrayList<String>();
-    
+
     /** The list of mandatory attributes */
     private List<String> must = new ArrayList<String>();
-    
+
     /** The list of optional attributes */
     private List<String> may = new ArrayList<String>();
 
     /** The ObjectClass type */
     private ObjectClassTypeEnum classType = ObjectClassTypeEnum.STRUCTURAL;
 
+
     /**
      * Create an instance of ObjectClass element
      */
@@ -57,6 +64,7 @@
         this.oid = oid;
     }
 
+
     /**
      * Get the list of superior for this objectClass
      * @return A list of all inherited objectClasses 
@@ -66,6 +74,7 @@
         return superiors;
     }
 
+
     /**
      * Set the list of inherited objectClasses
      * @param superiors The list of inherited objectClasses
@@ -75,6 +84,7 @@
         this.superiors = superiors;
     }
 
+
     /**
      * @return The list of mandatory attributes
      */
@@ -83,6 +93,7 @@
         return must;
     }
 
+
     /**
      * Set the list of mandatory attributes
      * @param must The list of mandatory attributes
@@ -92,6 +103,7 @@
         this.must = must;
     }
 
+
     /**
      * @return The list of optional attributes
      */
@@ -100,6 +112,7 @@
         return may;
     }
 
+
     /**
      * Set the list of optional attributes
      * @param may The list of optional attributes
@@ -109,6 +122,7 @@
         this.may = may;
     }
 
+
     /**
      * @return The objectClass type
      */
@@ -117,6 +131,7 @@
         return classType;
     }
 
+
     /**
      * Set the objectClass type. 
      * @param classType The objectClass type. 
@@ -126,6 +141,7 @@
         this.classType = classType;
     }
 
+
     /**
      * Convert this objectClass to a Ldif string
      * 
@@ -135,28 +151,28 @@
     public String toLdif( String schemaName ) throws NamingException
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( schemaToLdif( schemaName, "metaObjectclass" ) );
-        
+
         // The superiors
         if ( superiors.size() != 0 )
         {
-            for ( String superior:superiors )
+            for ( String superior : superiors )
             {
                 sb.append( "m-supObjectClass: " ).append( superior ).append( '\n' );
             }
         }
-        
+
         // The kind of class
         if ( classType != ObjectClassTypeEnum.STRUCTURAL )
         {
             sb.append( "m-typeObjectClass: " ).append( classType ).append( '\n' );
         }
-        
+
         // The 'must'
         if ( must.size() != 0 )
         {
-            for ( String attr:must )
+            for ( String attr : must )
             {
                 sb.append( "m-must: " ).append( attr ).append( '\n' );
             }
@@ -165,12 +181,12 @@
         // The 'may'
         if ( may.size() != 0 )
         {
-            for ( String attr:may )
+            for ( String attr : may )
             {
                 sb.append( "m-may: " ).append( attr ).append( '\n' );
             }
         }
-        
+
         // The extensions
         if ( extensions.size() != 0 )
         {
@@ -180,11 +196,32 @@
         return sb.toString();
     }
 
+
     /**
      * Return a String representing this ObjectClass.
      */
     public String toString()
     {
         return getOid();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.apache.directory.shared.converter.schema.SchemaElementImpl#dnToLdif(java.lang.String)
+     */
+    public String dnToLdif( String schemaName ) throws NamingException
+    {
+        StringBuilder sb = new StringBuilder();
+
+        String dn = "m-oid=" + oid + ", ou=objectClasses" + ", cn=" + Rdn.escapeValue( schemaName
) + ", ou=schema";
+
+        // First dump the DN only
+        Attributes attributes = new AttributesImpl();
+        Attribute attribute = new AttributeImpl( "dn", dn );
+
+        attributes.put( attribute );
+        sb.append( LdifUtils.convertToLdif( attributes ) );
+
+        return sb.toString();
     }
 }

Modified: directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java?view=diff&rev=523771&r1=523770&r2=523771
==============================================================================
--- directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
(original)
+++ directory/shared/trunk/convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaElementImpl.java
Thu Mar 29 10:19:27 2007
@@ -29,7 +29,6 @@
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
-import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 /**
@@ -183,35 +182,7 @@
     /**
      * @return The dn as a ldif line
      */
-    private String dnToLdif( String schemaName ) throws NamingException
-    {
-        StringBuilder sb = new StringBuilder();
-        
-        String name = null;
-
-        // We may have no names. In this case, we use the OID
-        if ( names.size() == 0 )
-        {
-            name = oid;
-        }
-        else
-        {
-            name = names.get( 0 );
-        }
-
-        String dn = "m-name=" + Rdn.escapeValue( name ) + 
-                    ", ou=" + Rdn.escapeValue( schemaName ) + 
-                    ", ou=schema";
-
-        // First dump the DN only
-        Attributes attributes = new AttributesImpl();
-        Attribute attribute = new AttributeImpl( "dn", dn );
-
-        attributes.put( attribute );
-        sb.append( LdifUtils.convertToLdif( attributes ) );
-        
-        return sb.toString();
-    }
+    public abstract String dnToLdif( String schemaName ) throws NamingException;
     
     /**
      * Return the extensions formated as Ldif lines

Modified: directory/shared/trunk/convert/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/convert/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java?view=diff&rev=523771&r1=523770&r2=523771
==============================================================================
--- directory/shared/trunk/convert/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java
(original)
+++ directory/shared/trunk/convert/src/test/java/org/apache/directory/shared/converter/schema/TestSchemaToLdif.java
Thu Mar 29 10:19:27 2007
@@ -78,7 +78,7 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=objectClass, ou=testOC, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOC, ou=schema\n"
+
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -100,7 +100,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMinimal, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMinimal,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -113,7 +114,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCNoName, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCNoName, ou=sc\n"
+
+            " hema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -134,7 +136,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCAbstract, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCAbstract,
ou=\n" +
+            " schema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -148,7 +151,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCAuxiliary, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCAuxiliary,
ou\n" +
+            " =schema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -162,7 +166,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCDesc, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCDesc, ou=sche\n"
+
+            " ma\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -176,7 +181,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMayOne, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMayOne, ou=sc\n"
+
+            " hema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -190,7 +196,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMay2, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMay2, ou=sche\n"
+
+            " ma\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -205,7 +212,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMayMany, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMayMany,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -221,7 +229,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMustOne, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMustOne,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -235,7 +244,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMust2, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMust2, ou=sch\n"
+
+            " ema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -250,7 +260,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCMustMany, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCMustMany,
ou=\n" +
+            " schema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -266,7 +277,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=objectClass, ou=testOCNameOne, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCNameOne,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -280,7 +292,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=oc, ou=testOCName2, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCName2, ou=sch\n"
+
+            " ema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -295,7 +308,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=oc, ou=testOCNameMany, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCNameMany,
ou=\n" +
+            " schema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -311,7 +325,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCObsolete, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCObsolete,
ou=\n" +
+            " schema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -325,7 +340,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCSupOne, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCSupOne, ou=sc\n"
+
+            " hema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -339,7 +355,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCSup2, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCSup2, ou=sche\n"
+
+            " ma\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -354,7 +371,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testOCSupMany, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=objectClasses, cn=testOCSupMany,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaObjectclass\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -373,7 +391,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATMinimal, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATMinimal,
ou=\n" +
+            " schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -386,7 +405,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATNoName, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATNoName,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -399,7 +419,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=attribute, ou=testATNameOne, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATNameOne,
ou=\n" +
+            " schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -413,7 +434,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=at, ou=testATName2, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATName2, ou=sc\n"
+
+            " hema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -428,7 +450,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=at, ou=testATNameMany, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATNameMany,
ou\n" +
+            " =schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -444,7 +467,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATDesc, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATDesc, ou=sch\n"
+
+            " ema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -458,7 +482,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATObsolete, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATObsolete,
ou\n" +
+            " =schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -472,7 +497,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSup, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSup, ou=sche\n"
+
+            " ma\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -486,7 +512,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSupOID, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSupOID,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -500,7 +527,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATEquality, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATEquality,
ou\n" +
+            " =schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -514,7 +542,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATEqualityOID, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATEqualityOID,\n"
+
+            "  ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -528,7 +557,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATOrdering, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATOrdering,
ou\n" +
+            " =schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -542,7 +572,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATOrderingOID, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATOrderingOID,\n"
+
+            "  ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -556,7 +587,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSubstr, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSubstr,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -570,7 +602,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSubstrOID, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSubstrOID,
o\n" +
+            " u=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -584,7 +617,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSyntax, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSyntax,
ou=s\n" +
+            " chema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -598,7 +632,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSyntaxOidLen, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSyntaxOidLen\n"
+
+            " , ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -612,7 +647,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATSingleValue, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATSingleValue,\n"
+
+            "  ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -626,7 +662,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATCollective, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATCollective,
\n" +
+            " ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -640,7 +677,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATNoUserModification, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATNoUserModifi\n"
+
+            " cation, ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -654,7 +692,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATUsageUserApp, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATUsageUserApp\n"
+
+            " , ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -667,7 +706,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATUsageDirOp, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATUsageDirOp,
\n" +
+            " ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -681,7 +721,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATUsageDistrOp, ou=schema\n"
+
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATUsageDistrOp\n"
+
+            " , ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +
@@ -695,7 +736,8 @@
     {
         String expected =
             HEADER + 
-            "dn: m-name=1.3.6.1.4.1.18060.0.4.2.3.14, ou=testATUsageDsaOp, ou=schema\n" +
+            "dn: m-oid=1.3.6.1.4.1.18060.0.4.2.3.14, ou=attributeTypes, cn=testATUsageDsaOp,
\n" +
+            " ou=schema\n" +
             "objectclass: metaAttributeType\n" +
             "objectclass: metaTop\n" +
             "objectclass: top\n" +



Mime
View raw message