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 ) )
{
setCreateTimestamp( value );
}
else if ( attributeName.equalsIgnoreCase( SchemaConstants.MODIFY_TIMESTAMP_AT ) )
{
setModifyTimestamp( value );
}
}
catch ( Exception e )
{
// TODO: exception handling
System.out.println( "Error reading schema: " + attributeName + " = " + value ); //$NON-NLS-1$ //$NON-NLS-2$
System.out.println( e.getMessage() );
}
}
for ( AttributeType atd : getAttributeTypeDescriptions() )
{
// assume all received syntaxes in attributes are valid -> create pseudo syntaxes if missing
String syntaxOid = atd.getSyntaxOid();
if ( syntaxOid != null && !hasLdapSyntaxDescription( syntaxOid ) )
{
LdapSyntax lsd = new LdapSyntax( syntaxOid );
lsd.setDescription( Utils.getOidDescription( syntaxOid ) );
addLdapSyntax( lsd );
}
// assume all received matching rules in attributes are valid -> create pseudo matching rules if missing
String emr = atd.getEqualityOid();