LdifAttrValLine line = lines[i];
String attributeName = line.getUnfoldedAttributeDescription();
String value = line.getValueAsString();
SchemaLexer lexer = new SchemaLexer( new StringReader( value ) );
SchemaParser parser = new SchemaParser( lexer );
try
{
if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_OBJECTCLASSES ) )
{
ObjectClassDescription ocd = parser.objectClassDescription();
ocd.setSchema( this );
ocd.setLine( line );
this.addObjectClassDescription( ocd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_ATTRIBUTETYPES ) )
{
AttributeTypeDescription atd = parser.attributeTypeDescription();
atd.setSchema( this );
atd.setLine( line );
this.addAttributeTypeDescription( atd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_LDAPSYNTAXES ) )
{
LdapSyntaxDescription lsd = parser.syntaxDescription();
lsd.setSchema( this );
lsd.setLine( line );
this.addLdapSyntaxDescription( lsd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULES ) )
{
MatchingRuleDescription mrd = parser.matchingRuleDescription();
mrd.setSchema( this );
mrd.setLine( line );
this.addMatchingRuleDescription( mrd );
}
else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULEUSE ) )
{
MatchingRuleUseDescription mrud = parser.matchingRuleUseDescription();
mrud.setSchema( this );
mrud.setLine( line );
this.addMatchingRuleUseDescription( mrud );
}
else if ( attributeName.equalsIgnoreCase( IAttribute.OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP ) )