Interface Precondition
-
- All Superinterfaces:
Cloneable
,MetaDataObject
,Serializable
,XMLizable
- All Known Subinterfaces:
LanguagePrecondition
,MimeTypePrecondition
,SimplePrecondition
- All Known Implementing Classes:
LanguagePrecondition_impl
,MimeTypePrecondition_impl
,SimplePrecondition_impl
public interface Precondition extends MetaDataObject
APrecondition
of a Resource is a condition that an Entity and/or its analysis in theCAS
must satisfy before that Entity can be processed by the Resource.Currently the framework does not fully support Preconditions. Only the
LanguagePrecondition
subinterface is used.As with all
MetaDataObject
s, aPrecondition
may or may not be modifiable. An application can find out by calling theMetaDataObject.isModifiable()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
evaluate(CAS aCAS)
Determines if this precondition is satisfied by a CAS.String
getPreconditionType()
Gets the type of this precondition.-
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
-
-
-
-
Method Detail
-
getPreconditionType
String getPreconditionType()
Gets the type of this precondition. Each sub-interface ofPrecondition
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.- Returns:
- the type identifier String for this precondition
-
evaluate
boolean evaluate(CAS aCAS)
Determines if this precondition is satisfied by a CAS.- Parameters:
aCAS
- the CAS against which to evaluate this precondition- Returns:
- true if and only if the CAS satisfies this precondition.
-
-