@Test public void testOpenLdapSchemaRendererAttributeTypeComplex() { String actual = OpenLdapSchemaFileExporter.toSourceCode( attributeTypeComplex ); String expected = "attributetype ( 1.2.3.4 NAME ( 'name1' 'name2' )\n\tDESC 'description with \\27quotes\\27'\n\tOBSOLETE\n\tSUP superAttr\n\tEQUALITY matchingRule1\n\tORDERING matchingRule2\n\tSUBSTR matchingRule3\n\tSINGLE-VALUE\n\tNO-USER-MODIFICATION\n\tUSAGE directoryOperation )"; assertEquals( expected, actual ); }
public static String toSourceCode( Schema schema ) { StringBuffer sb = new StringBuffer(); for ( AttributeType at : SchemaObjectSorter.hierarchicalOrdered( schema.getAttributeTypes() ) ) { sb.append( toSourceCode( at ) ); sb.append( "\n" ); } for ( ObjectClass oc : SchemaObjectSorter.sortObjectClasses( schema.getObjectClasses() ) ) { sb.append( toSourceCode( oc ) ); sb.append( "\n" ); } return sb.toString(); }
OpenLdapSchemaFileExporter { public static String toSourceCode( Schema schema ) { StringBuffer sb = new StringBuffer(); for ( AttributeType at : SchemaObjectSorter.hierarchicalOrdered( schema.getAttributeTypes() ) ) { sb.append( toSourceCode( at ) ); sb.append( "\n" ); } for ( ObjectClass oc : SchemaObjectSorter.sortObjectClasses( schema.getObjectClasses() ) ) { sb.append( toSourceCode( oc ) ); sb.append( "\n" ); } return sb.toString(); } }
OpenLdapSchemaFileExporter { public static String toSourceCode( Schema schema ) { StringBuffer sb = new StringBuffer(); for ( AttributeType at : SchemaObjectSorter.hierarchicalOrdered( schema.getAttributeTypes() ) ) { sb.append( toSourceCode( at ) ); sb.append( "\n" ); } for ( ObjectClass oc : SchemaObjectSorter.sortObjectClasses( schema.getObjectClasses() ) ) { sb.append( toSourceCode( oc ) ); sb.append( "\n" ); } return sb.toString(); }  }
OpenLdapSchemaFileExporter { public static String toSourceCode( Schema schema ) { StringBuffer sb = new StringBuffer(); for ( AttributeType at : SchemaObjectSorter.hierarchicalOrdered( schema.getAttributeTypes() ) ) { sb.append( toSourceCode( at ) ); sb.append( "\n" ); } for ( ObjectClass oc : SchemaObjectSorter.sortObjectClasses( schema.getObjectClasses() ) ) { sb.append( toSourceCode( oc ) ); sb.append( "\n" ); } return sb.toString(); }  static String toSourceCode( Schema schema ); static String toSourceCode( AttributeType at ); static String toSourceCode( ObjectClass oc ); }
OpenLdapSchemaFileExporter { public static String toSourceCode( Schema schema ) { StringBuffer sb = new StringBuffer(); for ( AttributeType at : SchemaObjectSorter.hierarchicalOrdered( schema.getAttributeTypes() ) ) { sb.append( toSourceCode( at ) ); sb.append( "\n" ); } for ( ObjectClass oc : SchemaObjectSorter.sortObjectClasses( schema.getObjectClasses() ) ) { sb.append( toSourceCode( oc ) ); sb.append( "\n" ); } return sb.toString(); }  static String toSourceCode( Schema schema ); static String toSourceCode( AttributeType at ); static String toSourceCode( ObjectClass oc );  }