|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.resource.metadata.impl.MetaDataObject_impl
org.apache.uima.resource.metadata.impl.SimplePrecondition_impl
public class SimplePrecondition_impl
Reference implementation of SimplePrecondition
.
Field Summary |
---|
Fields inherited from interface org.apache.uima.resource.metadata.SimplePrecondition |
---|
ELEMENT_OF, EQUAL, LANGUAGE_SUBSUMED, PRECONDITION_TYPE |
Constructor Summary | |
---|---|
SimplePrecondition_impl()
|
Method Summary | |
---|---|
boolean |
evaluate(CAS aCAS)
Determines if this precondition is satisfied by a CAS. |
java.lang.Object |
getComparisonValue()
Retrieves the literal value to which features' values will be compared. |
boolean |
getDefault()
Retrieves the deafult value for this precondition. |
java.lang.String |
getFeatureName()
Gets the name of the feature to be tested. |
java.lang.String |
getFsIndexName()
Retrieves the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition. |
FSMatchConstraint |
getFsMatchConstraint()
Retrieves the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition. |
java.lang.String |
getPreconditionType()
Gets the type of this precondition. |
java.lang.String |
getPredicate()
Retrieves the predicate used to compare the test value to the comparison value. |
protected XmlizationInfo |
getXmlizationInfo()
To be implemented by subclasses to return information describing how to represent this object in XML. |
protected static boolean |
isValidPredicateName(java.lang.Object aName)
Determines whether the given String is a valid name a predicate defined by this class. |
void |
setComparisonValue(java.lang.Object aValue)
Sets the literal value to which features' values will be compared. |
void |
setDefault(boolean aDefault)
Sets the deafult value for this precondition. |
void |
setFeatureName(java.lang.String aFeatureName)
Sets the name of the feature to be tested. |
void |
setFsIndexName(java.lang.String aIndexName)
Sets the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition. |
void |
setFsMatchConstraint(FSMatchConstraint aConstraint)
Sets the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition. |
void |
setPredicate(java.lang.String aPredicate)
Sets the predicate used to compare the test value to the comparison value. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject |
---|
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl |
Methods inherited from interface org.apache.uima.util.XMLizable |
---|
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML |
Constructor Detail |
---|
public SimplePrecondition_impl()
Method Detail |
---|
public java.lang.String getPreconditionType()
SimplePrecondition
Precondition
has its
own standard type identifier String. These identifier Strings are used instead of Java class
names in order to ease portability of metadata to other languages.
getPreconditionType
in interface Precondition
getPreconditionType
in interface SimplePrecondition
SimplePrecondition.PRECONDITION_TYPE
org.apache.uima.analysis_engine.metadata.Precondition#getPreconditionType()
public boolean getDefault()
SimplePrecondition
getDefault
in interface SimplePrecondition
SimplePrecondition.getDefault()
public java.lang.String getFeatureName()
SimplePrecondition
getFeatureName
in interface SimplePrecondition
null
if noneSimplePrecondition.getFeatureName()
public java.lang.String getFsIndexName()
SimplePrecondition
getFsIndexName
in interface SimplePrecondition
null
if the default annotation index should be
usedSimplePrecondition.getFsIndexName()
public FSMatchConstraint getFsMatchConstraint()
SimplePrecondition
getFsMatchConstraint
in interface SimplePrecondition
null
if noneSimplePrecondition.getFsMatchConstraint()
public void setDefault(boolean aDefault)
SimplePrecondition
setDefault
in interface SimplePrecondition
aDefault
- the default valueSimplePrecondition.setDefault(boolean)
public void setFeatureName(java.lang.String aFeatureName)
SimplePrecondition
setFeatureName
in interface SimplePrecondition
aFeatureName
- the feature name, null
if noneSimplePrecondition.setFeatureName(java.lang.String)
public void setFsIndexName(java.lang.String aIndexName)
SimplePrecondition
setFsIndexName
in interface SimplePrecondition
aIndexName
- the name of the FS index, null
if the default annotation index should
be usedSimplePrecondition.setFsIndexName(java.lang.String)
public void setFsMatchConstraint(FSMatchConstraint aConstraint)
SimplePrecondition
setFsMatchConstraint
in interface SimplePrecondition
aConstraint
- the FS match constraint, null
if noneSimplePrecondition.setFsMatchConstraint(org.apache.uima.cas.FSMatchConstraint)
public boolean evaluate(CAS aCAS)
Precondition
evaluate
in interface Precondition
aCAS
- the CAS against which to evaluate this precondition
Precondition.evaluate(org.apache.uima.cas.CAS)
public java.lang.Object getComparisonValue()
SimplePrecondition
getComparisonValue
in interface SimplePrecondition
org.apache.uima.analysis_engine.metadata.SimplePrecondition#getComparisonValue()
public void setComparisonValue(java.lang.Object aValue)
SimplePrecondition
setComparisonValue
in interface SimplePrecondition
aValue
- the comparison value, which must be a String, Integer, Float, Boolean, or an array of
one of those four types.org.apache.uima.analysis_engine.metadata.SimplePrecondition#setComparisonValue(Object)
public java.lang.String getPredicate()
SimplePrecondition
getPredicate
in interface SimplePrecondition
org.apache.uima.analysis_engine.metadata.SimplePrecondition#getPredicate()
public void setPredicate(java.lang.String aPredicate)
SimplePrecondition
setPredicate
in interface SimplePrecondition
aPredicate
- a String that identifies the predicate used. This must match one of the constants
defined on this interface.org.apache.uima.analysis_engine.metadata.SimplePrecondition#setPredicate(String)
protected static boolean isValidPredicateName(java.lang.Object aName)
setPredicate(String)
method, and are defined
by constants on the SimplePrecondition
interface.
aName
- an Object to test
aName
is a String
that is a valid
predicate name.protected XmlizationInfo getXmlizationInfo()
MetaDataObject_impl
getXmlizationInfo
in class MetaDataObject_impl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |