Class SimplePrecondition_impl
java.lang.Object
org.apache.uima.resource.metadata.impl.MetaDataObject_impl
org.apache.uima.resource.metadata.impl.SimplePrecondition_impl
- All Implemented Interfaces:
- Serializable,- Cloneable,- MetaDataObject,- Precondition,- SimplePrecondition,- XMLizable
- Direct Known Subclasses:
- LanguagePrecondition_impl,- MimeTypePrecondition_impl
Reference implementation of 
SimplePrecondition.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_implMetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
- 
Field SummaryFields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_implserialContextFields inherited from interface org.apache.uima.resource.metadata.SimplePreconditionELEMENT_OF, EQUAL, LANGUAGE_SUBSUMED, PRECONDITION_TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanDetermines if this precondition is satisfied by a CAS.Retrieves the literal value to which features' values will be compared.booleanRetrieves the default value for this precondition.Gets the name of the feature to be tested.Retrieves the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition.Retrieves the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition.Gets the type of this precondition.Retrieves the predicate used to compare the test value to the comparison value.protected XmlizationInfoTo be implemented by subclasses to return information describing how to represent this object in XML.protected static booleanisValidPredicateName(Object aName) Determines whether the given String is a valid name a predicate defined by this class.voidsetComparisonValue(Object aValue) Sets the literal value to which features' values will be compared.voidsetDefault(boolean aDefault) Sets the default value for this precondition.voidsetFeatureName(String aFeatureName) Sets the name of the feature to be tested.voidsetFsIndexName(String aIndexName) Sets the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition.voidsetFsMatchConstraint(FSMatchConstraint aConstraint) Sets the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition.voidsetPredicate(String aPredicate) Sets the predicate used to compare the test value to the comparison value.Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_implbuildFromXMLElement, buildFromXMLElement, clone, equals, getAdditionalAttributes, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElementMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.uima.resource.metadata.MetaDataObjectclone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrlMethods inherited from interface org.apache.uima.util.XMLizablebuildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
- 
Constructor Details- 
SimplePrecondition_implpublic SimplePrecondition_impl()
 
- 
- 
Method Details- 
getPreconditionTypeDescription copied from interface:SimplePreconditionGets the type of this precondition. Each sub-interface ofPreconditionhas 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.- Specified by:
- getPreconditionTypein interface- Precondition
- Specified by:
- getPreconditionTypein interface- SimplePrecondition
- Returns:
- SimplePrecondition.PRECONDITION_TYPE
 
- 
getDefaultpublic boolean getDefault()Description copied from interface:SimplePreconditionRetrieves the default value for this precondition. This is the value returned if there is no applicable test value in the CAS.- Specified by:
- getDefaultin interface- SimplePrecondition
- Returns:
- the default value
 
- 
getFeatureNameDescription copied from interface:SimplePreconditionGets the name of the feature to be tested.- Specified by:
- getFeatureNamein interface- SimplePrecondition
- Returns:
- the feature name, nullif none
 
- 
getFsIndexNameDescription copied from interface:SimplePreconditionRetrieves the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition.- Specified by:
- getFsIndexNamein interface- SimplePrecondition
- Returns:
- the name of the FS index, nullif the default annotation index should be used
 
- 
getFsMatchConstraintDescription copied from interface:SimplePreconditionRetrieves the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition.- Specified by:
- getFsMatchConstraintin interface- SimplePrecondition
- Returns:
- the FS match constraint, nullif none
 
- 
setDefaultpublic void setDefault(boolean aDefault) Description copied from interface:SimplePreconditionSets the default value for this precondition. This is the value returned if there is no applicable test value in the CAS.- Specified by:
- setDefaultin interface- SimplePrecondition
- Parameters:
- aDefault- the default value
 
- 
setFeatureNameDescription copied from interface:SimplePreconditionSets the name of the feature to be tested.- Specified by:
- setFeatureNamein interface- SimplePrecondition
- Parameters:
- aFeatureName- the feature name,- nullif none
 
- 
setFsIndexNameDescription copied from interface:SimplePreconditionSets the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition.- Specified by:
- setFsIndexNamein interface- SimplePrecondition
- Parameters:
- aIndexName- the name of the FS index,- nullif the default annotation index should be used
 
- 
setFsMatchConstraintDescription copied from interface:SimplePreconditionSets the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition.- Specified by:
- setFsMatchConstraintin interface- SimplePrecondition
- Parameters:
- aConstraint- the FS match constraint,- nullif none
 
- 
evaluateDescription copied from interface:PreconditionDetermines if this precondition is satisfied by a CAS.- Specified by:
- evaluatein interface- Precondition
- Parameters:
- aCAS- the CAS against which to evaluate this precondition
- Returns:
- true if and only if the CAS satisfies this precondition.
 
- 
getComparisonValueDescription copied from interface:SimplePreconditionRetrieves the literal value to which features' values will be compared.- Specified by:
- getComparisonValuein interface- SimplePrecondition
- Returns:
- the value, which must be a String, Integer, Float, Boolean or an array of one of those four types.
 
- 
setComparisonValueDescription copied from interface:SimplePreconditionSets the literal value to which features' values will be compared.- Specified by:
- setComparisonValuein interface- SimplePrecondition
- Parameters:
- aValue- the comparison value, which must be a String, Integer, Float, Boolean, or an array of one of those four types.
 
- 
getPredicateDescription copied from interface:SimplePreconditionRetrieves the predicate used to compare the test value to the comparison value.- Specified by:
- getPredicatein interface- SimplePrecondition
- Returns:
- a String that identifies the predicate used. This will always match one of the constants defined on this interface.
 
- 
setPredicateDescription copied from interface:SimplePreconditionSets the predicate used to compare the test value to the comparison value.- Specified by:
- setPredicatein interface- SimplePrecondition
- Parameters:
- aPredicate- a String that identifies the predicate used. This must match one of the constants defined on this interface.
 
- 
isValidPredicateNameDetermines whether the given String is a valid name a predicate defined by this class. Valid predicate names are legal arguments to thesetPredicate(String)method, and are defined by constants on theSimplePreconditioninterface.- Parameters:
- aName- an Object to test
- Returns:
- true if and only if aNameis aStringthat is a valid predicate name.
 
- 
getXmlizationInfoDescription copied from class:MetaDataObject_implTo be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
- getXmlizationInfoin class- MetaDataObject_impl
- Returns:
- information defining this object's XML representation
 
 
-