gate.jape.constraint
Class EmbeddedConstraintPredicate
java.lang.Object
gate.jape.constraint.AbstractConstraintPredicate
gate.jape.constraint.EmbeddedConstraintPredicate
- All Implemented Interfaces:
- ConstraintPredicate, Serializable
- Direct Known Subclasses:
- ContainsPredicate, WithinPredicate
public abstract class EmbeddedConstraintPredicate
- extends AbstractConstraintPredicate
Predicate whose AbstractConstraintPredicate.getValue() property may be set to a
Constraint itself, allowing for recursive evaluations.
- Version:
- $Revision$
- Author:
- esword
- See Also:
- Serialized Form
valueConstraint
protected Constraint valueConstraint
annotType
protected String annotType
EmbeddedConstraintPredicate
public EmbeddedConstraintPredicate()
EmbeddedConstraintPredicate
public EmbeddedConstraintPredicate(AnnotationAccessor accessor,
Object value)
doMatch
public boolean doMatch(Object annotValue,
AnnotationSet context)
throws JapeException
- Sets up environment for concreate class to do the specific matching check
- Specified by:
doMatch in class AbstractConstraintPredicate
- Throws:
JapeException
doMatch
protected abstract AnnotationSet doMatch(Annotation annot,
AnnotationSet as)
filterMatches
protected Collection<Annotation> filterMatches(AnnotationSet containedSet)
- If there are attribute constraints, filter the set.
- Parameters:
containedSet -
- Returns:
setValue
public void setValue(Object v)
- If the given value is a
Constraint, then check if there
are any additional attribute/feature-checks on the constraint. If
so, then store the constraint for use during matching calls. If
not, then only the annotation type for the constraint is stored
since the full constraint is not needed.
- Specified by:
setValue in interface ConstraintPredicate- Overrides:
setValue in class AbstractConstraintPredicate