You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/10/11 13:34:52 UTC
svn commit: r1531259 -
/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
Author: pkluegl
Date: Fri Oct 11 11:34:52 2013
New Revision: 1531259
URL: http://svn.apache.org/r1531259
Log:
UIMA-3338
- fixed missing recovery after middle rule element
Modified:
uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
Modified: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java?rev=1531259&r1=1531258&r2=1531259&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java Fri Oct 11 11:34:52 2013
@@ -226,23 +226,9 @@ public class RutaRuleElement extends Abs
result.addAll(continueMatchSomewhereElse);
}
} else {
- // was:
- // List<RuleMatch> stepbackMatch = stepbackMatch(after, annotation, extendedMatch,
- // ruleApply,
- // extendedContainerMatch, sideStepOrigin, stream, crowd, entryPoint);
- if (getContainer() instanceof ComposedRuleElement) {
- ComposedRuleElement composed = (ComposedRuleElement) getContainer();
- List<RuleMatch> fallbackContinue = composed.fallbackContinue(after, true, eachAnchor,
- extendedMatch, ruleApply, extendedContainerMatch, sideStepOrigin, entryPoint,
- stream, crowd);
- result.addAll(fallbackContinue);
- } else {
- // should never happen...
- List<RuleMatch> stepbackMatch = stepbackMatch(after, annotation, ruleMatch, ruleApply,
- containerMatch, sideStepOrigin, stream, crowd, entryPoint);
- result.addAll(stepbackMatch);
- }
-
+ List<RuleMatch> stepbackMatch = stepbackMatch(after, annotation, ruleMatch, ruleApply,
+ containerMatch, sideStepOrigin, stream, crowd, entryPoint);
+ result.addAll(stepbackMatch);
}
}
} else {
@@ -288,7 +274,16 @@ public class RutaRuleElement extends Abs
result = continueMatchSomewhereElse(after, false, annotation, ruleMatch, ruleApply,
containerMatch, sideStepOrigin, null, stream, crowd);
} else {
- doneMatching(ruleMatch, ruleApply, stream, crowd);
+ if (getContainer() instanceof ComposedRuleElement) {
+ ComposedRuleElement composed = (ComposedRuleElement) getContainer();
+ List<RuleMatch> fallbackContinue = composed.fallbackContinue(after, true, annotation,
+ ruleMatch, ruleApply, containerMatch, sideStepOrigin, entryPoint,
+ stream, crowd);
+ result.addAll(fallbackContinue);
+ } else {
+ // should never happen!
+ doneMatching(ruleMatch, ruleApply, stream, crowd);
+ }
}
}
return result;