atdParser.setQuirksMode( true );
LdapSyntaxDescriptionSchemaParser lsdParser = new LdapSyntaxDescriptionSchemaParser();
lsdParser.setQuirksMode( true );
MatchingRuleDescriptionSchemaParser mrdParser = new MatchingRuleDescriptionSchemaParser();
mrdParser.setQuirksMode( true );
MatchingRuleUseDescriptionSchemaParser mrudParser = new MatchingRuleUseDescriptionSchemaParser();
mrudParser.setQuirksMode( true );
LdifAttrValLine[] lines = schemaRecord.getAttrVals();
for ( int i = 0; i < lines.length; i++ )
{
LdifAttrValLine line = lines[i];
String attributeName = line.getUnfoldedAttributeDescription();
String value = line.getValueAsString();
List<String> ldifValues = new ArrayList<String>( 1 );
ldifValues.add( value );
try
{
if ( attributeName.equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT ) )
{
MutableObjectClass ocd = ocdPparser.parseObjectClassDescription( value );
ocd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addObjectClass( ocd );
}
else if ( attributeName.equalsIgnoreCase( SchemaConstants.ATTRIBUTE_TYPES_AT ) )
{
AttributeType atd = atdParser.parseAttributeTypeDescription( value );
atd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addAttributeType( atd );
}
else if ( attributeName.equalsIgnoreCase( SchemaConstants.LDAP_SYNTAXES_AT ) )
{
LdapSyntax lsd = lsdParser.parseLdapSyntaxDescription( value );
if ( StringUtils.isEmpty( lsd.getDescription() )
&& Utils.getOidDescription( lsd.getOid() ) != null )
{
lsd.setDescription( Utils.getOidDescription( lsd.getOid() ) );
}
lsd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addLdapSyntax( lsd );
}
else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT ) )
{
MatchingRule mrd = mrdParser.parseMatchingRuleDescription( value );
mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addMatchingRule( mrd );
}
else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULE_USE_AT ) )
{
MatchingRuleUse mrud = mrudParser.parseMatchingRuleUseDescription( value );
mrud.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addMatchingRuleUse( mrud );
}
else if ( attributeName.equalsIgnoreCase( SchemaConstants.CREATE_TIMESTAMP_AT ) )
{