final InternalReadAccessor extractor) {
Restriction[] restrictions = new Restriction[top.getRestrictions().size()];
int index = 0;
for ( Iterator it = top.getRestrictions().iterator(); it.hasNext(); ) {
RestrictionDescr restrictionDescr = (RestrictionDescr) it.next();
if ( restrictionDescr instanceof RestrictionConnectiveDescr ) {
restrictions[index++] = this.createRestriction( context,
pattern,
fieldConstraintDescr,
(RestrictionConnectiveDescr) restrictionDescr,
extractor );
} else {
restrictions[index] = buildRestriction( context,
pattern,
extractor,
fieldConstraintDescr,
restrictionDescr );
if ( restrictions[index] == null ) {
context.getErrors().add( new DescrBuildError( context.getParentDescr(),
fieldConstraintDescr,
null,
"Unable to create restriction '" + restrictionDescr.toString() + "' for field '" + fieldConstraintDescr.getFieldName() + "' in the rule '" + context.getRule().getName() + "'" ) );
}
index++;
}
}