assert definition != null;
assert context != null;
assert sheet != null;
assert extractor != null;
VerifyRuleBuilder builder = new VerifyRuleBuilder(definition);
Set<DataModelCondition> modelPredicates = extractor.extractDataModelCondition(sheet);
if (modelPredicates.contains(DataModelCondition.IGNORE_ABSENT)) {
builder.acceptIfAbsent();
}
if (modelPredicates.contains(DataModelCondition.IGNORE_UNEXPECTED)) {
builder.acceptIfUnexpected();
}
if (modelPredicates.contains(DataModelCondition.IGNORE_MATCHED) == false) {
int start = extractor.extractPropertyRowStartIndex(sheet);
int end = sheet.getLastRowNum() + 1;
for (int i = start; i < end; i++) {
Row row = sheet.getRow(i);
if (row == null) {
continue;
}
resolveRow(builder, definition, context, row, extractor);
}
}
return builder.toVerifyRule();
}