gate.jape.constraint
Class RegExpMatchPredicate

java.lang.Object
  extended by gate.jape.constraint.AbstractConstraintPredicate
      extended by gate.jape.constraint.AbstractRegExpPredicate
          extended by gate.jape.constraint.RegExpMatchPredicate
All Implemented Interfaces:
ConstraintPredicate, Serializable

public class RegExpMatchPredicate
extends AbstractRegExpPredicate

Implementation of the ==~ predicate, which succeeds if the entire annotation value matches the given regular expression, and fails otherwise.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gate.jape.constraint.AbstractConstraintPredicate
accessor, value
 
Fields inherited from interface gate.jape.constraint.ConstraintPredicate
EQUAL, GREATER, GREATER_OR_EQUAL, LESSER, LESSER_OR_EQUAL, NOT_EQUAL, NOT_REGEXP_FIND, NOT_REGEXP_MATCH, REGEXP_FIND, REGEXP_MATCH
 
Constructor Summary
RegExpMatchPredicate()
           
 
Method Summary
 String getOperator()
          String representation of the logic operator that the predicate implements.
protected  boolean matcherResult(Matcher m)
          Must be implemented by subclasses to define the matching logic, typically one of Matcher.find() and Matcher.matches(), possibly negated.
 
Methods inherited from class gate.jape.constraint.AbstractRegExpPredicate
doMatch, setValue, toString
 
Methods inherited from class gate.jape.constraint.AbstractConstraintPredicate
equals, getAccessor, getValue, hashCode, matches, setAccessor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegExpMatchPredicate

public RegExpMatchPredicate()
Method Detail

matcherResult

protected boolean matcherResult(Matcher m)
Description copied from class: AbstractRegExpPredicate
Must be implemented by subclasses to define the matching logic, typically one of Matcher.find() and Matcher.matches(), possibly negated.

Specified by:
matcherResult in class AbstractRegExpPredicate
Parameters:
m - a Matcher for the annotation value string, obtained from the constraint pattern.
Returns:
true if this constraint should be considered to match, false otherwise.

getOperator

public String getOperator()
Description copied from interface: ConstraintPredicate
String representation of the logic operator that the predicate implements.