gate.jape.constraint
Interface ConstraintPredicate

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractConstraintPredicate, AbstractRegExpPredicate, ComparablePredicate, ComparablePredicateTest.ComparablePredicateImpl, ContainsPredicate, EmbeddedConstraintPredicate, EqualPredicate, GreaterEqualPredicate, GreaterPredicate, LesserEqualPredicate, LesserPredicate, NotContainsPredicate, NotEqualPredicate, NotRegExpFindPredicate, NotRegExpMatchPredicate, NotWithinPredicate, RegExpFindPredicate, RegExpMatchPredicate, TestPR.TestConstraintPredicate, WithinPredicate

public interface ConstraintPredicate
extends Serializable

A predicate defines a single boolean operation on an Annotation or some property of an annotation. These are also referred to as attributes of a constraint.

Implementors will determine if a provided annotation matches the predicate based on the intent of the operator (equals, not equals, greater than, etc).

Version:
$Revision$
Author:
esword

Field Summary
static String EQUAL
           
static String GREATER
           
static String GREATER_OR_EQUAL
           
static String LESSER
           
static String LESSER_OR_EQUAL
           
static String NOT_EQUAL
           
static String NOT_REGEXP_FIND
           
static String NOT_REGEXP_MATCH
           
static String REGEXP_FIND
           
static String REGEXP_MATCH
           
 
Method Summary
 AnnotationAccessor getAccessor()
          The accessor associated with this predicate.
 String getOperator()
          String representation of the logic operator that the predicate implements.
 Object getValue()
          The value used in comparisons against passed in data in matches(Annotation, AnnotationSet).
 boolean matches(Annotation annot, AnnotationSet context)
          Evaluates if the provided annotation meets the requirements of the predicate.
 void setAccessor(AnnotationAccessor accessor)
          Set the accessor associated with this predicate.
 void setValue(Object value)
          Set the value used in comparisons against passed in data in matches(Annotation, AnnotationSet).
 

Field Detail

EQUAL

static final String EQUAL
See Also:
Constant Field Values

NOT_EQUAL

static final String NOT_EQUAL
See Also:
Constant Field Values

GREATER

static final String GREATER
See Also:
Constant Field Values

LESSER

static final String LESSER
See Also:
Constant Field Values

GREATER_OR_EQUAL

static final String GREATER_OR_EQUAL
See Also:
Constant Field Values

LESSER_OR_EQUAL

static final String LESSER_OR_EQUAL
See Also:
Constant Field Values

REGEXP_FIND

static final String REGEXP_FIND
See Also:
Constant Field Values

NOT_REGEXP_FIND

static final String NOT_REGEXP_FIND
See Also:
Constant Field Values

REGEXP_MATCH

static final String REGEXP_MATCH
See Also:
Constant Field Values

NOT_REGEXP_MATCH

static final String NOT_REGEXP_MATCH
See Also:
Constant Field Values
Method Detail

getAccessor

AnnotationAccessor getAccessor()
The accessor associated with this predicate.


setAccessor

void setAccessor(AnnotationAccessor accessor)
Set the accessor associated with this predicate.


getValue

Object getValue()
The value used in comparisons against passed in data in matches(Annotation, AnnotationSet).


setValue

void setValue(Object value)
Set the value used in comparisons against passed in data in matches(Annotation, AnnotationSet).


getOperator

String getOperator()
String representation of the logic operator that the predicate implements.


matches

boolean matches(Annotation annot,
                AnnotationSet context)
                throws JapeException
Evaluates if the provided annotation meets the requirements of the predicate.

Throws:
JapeException