private boolean matchRuleExceptions ( RuleException [ ] exceptions , CAS aCAS , AnnotationFS annot ) { // if we have already checked the exceptions for the current match type // annotation, return the // last result - this can happen in case of MATCH_ALL match strategy if ( this . lastRuleExceptionAnnotation == annot ) { return this . lastRuleExceptionMatch ; } // loop over all rule exceptions for ( int i = 0 ; i < exceptions . length ; i ++ ) { // store current match type annotation for performance reason. In case // of MATCH_ALL match // strategy maybe the matchRuleException() method is called multiple // times for the same // match type annotations and in that case the result of the rule // exception match is exactly // the same. this . lastRuleExceptionAnnotation = annot ; // find covering annotation AnnotationFS coverFs = findCoverFS ( aCAS , annot , exceptions [ i ] . getType ( ) ) ; // check if covering annotation was found if ( coverFs != null ) { // check if the found coverFs annotation match the exception pattern if ( exceptions [ i ] . matchPattern ( coverFs ) ) { this . lastRuleExceptionMatch = true ; return this . lastRuleExceptionMatch ; } } } this . lastRuleExceptionMatch = false ; return false ; }
Check if the rule exception match for the current match type annotation .