int pos = 0;
for ( Value<?> value:attr )
{
DITStructureRuleDescription desc = null;
try
{
desc = ditStructureRuleParser.parseDITStructureRuleDescription( value.getString() );
}
catch ( ParseException e )
{
LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
"The following does not conform to the ditStructureRuleDescription syntax: " + value.getString(),
ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
iave.setRootCause( e );
throw iave;
}
DitStructureRuleImpl dsr = new DitStructureRuleImpl( desc.getNumericOid(),
desc.getRuleId(), globalRegistries );
dsr.setSuperClassRuleIds( desc.getSuperRules().toArray( EMPTY_INT_ARRAY ) );
setSchemaObjectProperties( desc, dsr );
ditStructureRules[pos++] = dsr;
}