int pos = 0;
for ( Value<?> value:attr )
{
MatchingRuleUseDescription desc = null;
try
{
desc = matchingRuleUseParser.parseMatchingRuleUseDescription( value.getString() );
}
catch ( ParseException e )
{
LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException(
"The following does not conform to the matchingRuleUseDescription syntax: " + value.getString(),
ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
iave.setRootCause( e );
throw iave;
}
MatchingRuleUseImpl mru = new MatchingRuleUseImpl( desc.getNumericOid(), globalRegistries );
mru.setApplicableAttributesOids( desc.getApplicableAttributes().toArray( EMPTY ) );
setSchemaObjectProperties( desc, mru );
matchingRuleUses[pos++] = mru;
}