gate.jape.constraint
Class ConstraintFactory
java.lang.Object
gate.jape.constraint.ConstraintFactory
public class ConstraintFactory
- extends Object
Creates Jape Constraints and associated
ConstraintPredicates.
- Version:
- $Revision$
- Author:
- esword
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
operatorImplMap
protected Map<String,Class<? extends ConstraintPredicate>> operatorImplMap
metaPropertyMap
protected Map<String,Class<? extends AnnotationAccessor>> metaPropertyMap
ConstraintFactory
public ConstraintFactory()
initOperatorMap
protected void initOperatorMap()
initMetaPropertyMap
protected void initMetaPropertyMap()
addOperator
public void addOperator(String operator,
Class<? extends ConstraintPredicate> clazz)
addMetaProperty
public void addMetaProperty(String metaProperty,
Class<? extends AnnotationAccessor> clazz)
createConstraint
public Constraint createConstraint(String annotType)
- Create a new constraint for the given annotation type
- Parameters:
annotType -
- Returns:
createDefaultAccessor
public AnnotationAccessor createDefaultAccessor(Object key)
createMetaPropertyAccessor
public AnnotationAccessor createMetaPropertyAccessor(String propName)
createPredicate
public ConstraintPredicate createPredicate(String name,
Object value)
- Create a constraint predicate using the default equals predicate.
- Parameters:
name - feature name associated with the predicatevalue - value associated with the predicate
- Returns:
createPredicate
public ConstraintPredicate createPredicate(AnnotationAccessor accessor,
Object value)
createPredicate
public ConstraintPredicate createPredicate(String operator,
AnnotationAccessor accessor,
Object value)