ruleMatches, true, stream);
Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = mergedMatches.entrySet();
for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {
RuleMatch eachRuleMatch = entry.getKey();
ComposedRuleElementMatch eachComposedMatch = entry.getValue();
AnnotationFS lastAnnotation = eachRuleMatch.getLastMatchedAnnotation(this, true, null,
parent, stream);
boolean failed = !eachComposedMatch.matched();
List<RuleMatch> fallbackContinue = fallbackContinue(true, failed, lastAnnotation,
eachRuleMatch, ruleApply, eachComposedMatch, null, entryPoint, stream, crowd);
result.addAll(fallbackContinue);
}
} else if (conjunct) {
// conjunctive
Map<RuleMatch, ComposedRuleElementMatch> ruleMatches = new HashMap<RuleMatch, ComposedRuleElementMatch>();
RuleElement anchoringRuleElement = getAnchoringRuleElement(stream);
ComposedRuleElementMatch composedMatch = createComposedMatch(ruleMatch, containerMatch,
stream);
List<RuleMatch> startRuleMatches = anchoringRuleElement.startMatch(ruleMatch, null,
composedMatch, this, stream, crowd);
for (RuleMatch eachStartRuleMatch : startRuleMatches) {
AnnotationFS prefixAnnotation = getPrefixAnnotation(eachStartRuleMatch, stream);
for (RuleElement each : elements) {
if (each.equals(anchoringRuleElement)) {
continue;
}
ComposedRuleElementMatch startElementMatch = (ComposedRuleElementMatch) eachStartRuleMatch
.getLastMatch(this, true);
List<RuleMatch> continueMatch = each.continueMatch(true, prefixAnnotation,
eachStartRuleMatch, null, startElementMatch, null, this, stream, crowd);
for (RuleMatch startRuleMatch : continueMatch) {
ComposedRuleElementMatch elementMatch = (ComposedRuleElementMatch) startRuleMatch
.getLastMatch(this, true);
ruleMatches.put(startRuleMatch, elementMatch);
}
}
}
Map<RuleMatch, ComposedRuleElementMatch> mergedMatches = mergeConjunctiveRuleMatches(
ruleMatches, true);
Set<Entry<RuleMatch, ComposedRuleElementMatch>> entrySet = mergedMatches.entrySet();
for (Entry<RuleMatch, ComposedRuleElementMatch> entry : entrySet) {
RuleMatch eachRuleMatch = entry.getKey();
ComposedRuleElementMatch eachComposedMatch = entry.getValue();
AnnotationFS lastAnnotation = eachRuleMatch.getLastMatchedAnnotation(this, true, null,
parent, stream);
boolean failed = !eachComposedMatch.matched();
List<RuleMatch> fallbackContinue = fallbackContinue(true, failed, lastAnnotation,
eachRuleMatch, ruleApply, eachComposedMatch, null, entryPoint, stream, crowd);
result.addAll(fallbackContinue);