|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.uima.cas.ConstraintFactory
public abstract class ConstraintFactory
Methods to create FSMatchConstraint
s for filtered iterators or other
use. A constraint is an object which represents a test or a series of tests joined with "and" or
"or". Each test consists of a test predicate plus an optional "path" which specifies how to walk
through a chain of references, starting from a feature structure being tested, to reach the value
to be tested.
Tests include
FSIntConstraint
, for
instance, the value would be an integer.
Constructor Summary | |
---|---|
ConstraintFactory()
|
Method Summary | |
---|---|
abstract FSMatchConstraint |
and(FSMatchConstraint c1,
FSMatchConstraint c2)
Conjoin two constraints. |
abstract FSBooleanConstraint |
createBooleanConstraint()
Create a new boolean constraint. |
abstract FSFloatConstraint |
createFloatConstraint()
Create a new float constraint. |
abstract FSIntConstraint |
createIntConstraint()
Create a new int constraint. |
abstract FSStringConstraint |
createStringConstraint()
Create a new String constraint. |
abstract FSTypeConstraint |
createTypeConstraint()
Create a new type constraint. |
abstract FSMatchConstraint |
embedConstraint(ArrayList<String> path,
FSConstraint constraint)
Embed a constraint under a path. |
abstract FSMatchConstraint |
embedConstraint(FeaturePath path,
FSConstraint constraint)
Combine a constraint test with a path from a feature structure instance to the value to be tested. |
static ConstraintFactory |
instance()
Create a new constraint factory. |
abstract FSMatchConstraint |
or(FSMatchConstraint c1,
FSMatchConstraint c2)
Disjoin two constraints. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConstraintFactory()
Method Detail |
---|
public abstract FSTypeConstraint createTypeConstraint()
public abstract FSIntConstraint createIntConstraint()
public abstract FSFloatConstraint createFloatConstraint()
public abstract FSStringConstraint createStringConstraint()
public abstract FSBooleanConstraint createBooleanConstraint()
public abstract FSMatchConstraint embedConstraint(FeaturePath path, FSConstraint constraint)
path
- The path to embed the constraint under. Create a new path with
CAS.createFeaturePath()
.constraint
- The constraint to be embedded.
public abstract FSMatchConstraint embedConstraint(ArrayList<String> path, FSConstraint constraint)
path
- The path to embed the constraint under. This is a list of Feature
names.constraint
- The constraint to be embedded.
public abstract FSMatchConstraint and(FSMatchConstraint c1, FSMatchConstraint c2)
c1
- The first conjunct.c2
- The second conjunct.
c1
and
c2
.public abstract FSMatchConstraint or(FSMatchConstraint c1, FSMatchConstraint c2)
c1
- The first disjunct.c2
- The second disjunct.
c1
and
c2
.public static ConstraintFactory instance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |