{
if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_OBJECTCLASSES ) )
{
ObjectClassDescriptionSchemaParser parser = new ObjectClassDescriptionSchemaParser();
parser.setQuirksMode( true );
ObjectClassDescription ocd = parser.parseObjectClassDescription( value );
ocd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addObjectClassDescription( ocd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_ATTRIBUTETYPES ) )
{
AttributeTypeDescriptionSchemaParser parser = new AttributeTypeDescriptionSchemaParser();
parser.setQuirksMode( true );
AttributeTypeDescription atd = parser.parseAttributeTypeDescription( value );
atd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addAttributeTypeDescription( atd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_LDAPSYNTAXES ) )
{
LdapSyntaxDescriptionSchemaParser parser = new LdapSyntaxDescriptionSchemaParser();
parser.setQuirksMode( true );
LdapSyntaxDescription lsd = parser.parseLdapSyntaxDescription( value );
lsd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addLdapSyntaxDescription( lsd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULES ) )
{
MatchingRuleDescriptionSchemaParser parser = new MatchingRuleDescriptionSchemaParser();
parser.setQuirksMode( true );
MatchingRuleDescription mrd = parser.parseMatchingRuleDescription( value );
mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addMatchingRuleDescription( mrd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULEUSE ) )
{
MatchingRuleUseDescriptionSchemaParser parser = new MatchingRuleUseDescriptionSchemaParser();
parser.setQuirksMode( true );
MatchingRuleUseDescription mrud = parser.parseMatchingRuleUseDescription( value );
mrud.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
addMatchingRuleUseDescription( mrud );
}
else if ( attributeName.equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP ) )
{
setCreateTimestamp( value );
}
else if ( attributeName.equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP ) )
{
setModifyTimestamp( value );
}
}
catch ( Exception e )
{
System.out.println( e.getMessage() + ": " + attributeName + " - " + value );
e.printStackTrace();
}
}
// set extensibleObject may attributes
ObjectClassDescription extensibleObjectOcd = this
.getObjectClassDescription( SchemaConstants.EXTENSIBLE_OBJECT_OC );
Collection<AttributeTypeDescription> userAtds = SchemaUtils.getUserAttributeDescriptions( this );
Collection<String> atdNames = SchemaUtils.getNames( userAtds );
List<String> atdNames2 = new ArrayList<String>( atdNames );
extensibleObjectOcd.setMayAttributeTypes( atdNames2 );
}