LOG.info( msg );
schema = schemaManager.getLoadedSchema( schemaName );
}
// Create the new AttributeType
MutableAttributeType attributeType = new MutableAttributeType( oid );
// Syntax
Attribute mSyntax = entry.get( MetaSchemaConstants.M_SYNTAX_AT );
if ( ( mSyntax != null ) && ( mSyntax.get() != null ) )
{
attributeType.setSyntaxOid( mSyntax.getString() );
}
// Syntax Length
Attribute mSyntaxLength = entry.get( MetaSchemaConstants.M_LENGTH_AT );
if ( mSyntaxLength != null )
{
attributeType.setSyntaxLength( Integer.parseInt( mSyntaxLength.getString() ) );
}
// Equality
Attribute mEquality = entry.get( MetaSchemaConstants.M_EQUALITY_AT );
if ( mEquality != null )
{
attributeType.setEqualityOid( mEquality.getString() );
}
// Ordering
Attribute mOrdering = entry.get( MetaSchemaConstants.M_ORDERING_AT );
if ( mOrdering != null )
{
attributeType.setOrderingOid( mOrdering.getString() );
}
// Substr
Attribute mSubstr = entry.get( MetaSchemaConstants.M_SUBSTR_AT );
if ( mSubstr != null )
{
attributeType.setSubstringOid( mSubstr.getString() );
}
Attribute mSupAttributeType = entry.get( MetaSchemaConstants.M_SUP_ATTRIBUTE_TYPE_AT );
// Sup
if ( mSupAttributeType != null )
{
attributeType.setSuperiorOid( mSupAttributeType.getString() );
}
// isCollective
Attribute mCollective = entry.get( MetaSchemaConstants.M_COLLECTIVE_AT );
if ( mCollective != null )
{
String val = mCollective.getString();
attributeType.setCollective( val.equalsIgnoreCase( "TRUE" ) );
}
// isSingleValued
Attribute mSingleValued = entry.get( MetaSchemaConstants.M_SINGLE_VALUE_AT );
if ( mSingleValued != null )
{
String val = mSingleValued.getString();
attributeType.setSingleValued( val.equalsIgnoreCase( "TRUE" ) );
}
// isReadOnly
Attribute mNoUserModification = entry.get( MetaSchemaConstants.M_NO_USER_MODIFICATION_AT );
if ( mNoUserModification != null )
{
String val = mNoUserModification.getString();
attributeType.setUserModifiable( !val.equalsIgnoreCase( "TRUE" ) );
}
// Usage
Attribute mUsage = entry.get( MetaSchemaConstants.M_USAGE_AT );
if ( mUsage != null )
{
attributeType.setUsage( UsageEnum.getUsage( mUsage.getString() ) );
}
// Common properties
setSchemaObjectProperties( attributeType, entry, schema );