if ( schemaManager == null )
{
loadSchema();
}
OpenLdapSchemaParser olsp = new OpenLdapSchemaParser();
olsp.setQuirksMode( true );
olsp.parse( schemaFile );
List<MutableAttributeType> atList = olsp.getAttributeTypes();
AttributeTypeRegistry atRegistry = schemaManager.getRegistries().getAttributeTypeRegistry();
for ( AttributeType atType : atList )
{
atRegistry.addMappingFor( atType );
}
List<ObjectClass> ocList = olsp.getObjectClassTypes();
ObjectClassRegistry ocRegistry = schemaManager.getRegistries().getObjectClassRegistry();
for ( ObjectClass oc : ocList )
{
ocRegistry.register( oc );