Class LanguagePrecondition_impl
- java.lang.Object
-
- org.apache.uima.resource.metadata.impl.MetaDataObject_impl
-
- org.apache.uima.resource.metadata.impl.SimplePrecondition_impl
-
- org.apache.uima.resource.metadata.impl.LanguagePrecondition_impl
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,LanguagePrecondition
,MetaDataObject
,Precondition
,SimplePrecondition
,XMLizable
public class LanguagePrecondition_impl extends SimplePrecondition_impl implements LanguagePrecondition
Precondition that tests language of the document.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
MetaDataObject_impl.MetaDataAttr, MetaDataObject_impl.SerialContext, MetaDataObject_impl.Serializer
-
-
Field Summary
-
Fields inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
serialContext
-
Fields inherited from interface org.apache.uima.resource.metadata.SimplePrecondition
ELEMENT_OF, EQUAL, LANGUAGE_SUBSUMED, PRECONDITION_TYPE
-
-
Constructor Summary
Constructors Constructor Description LanguagePrecondition_impl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object aObject)
Determines if this object is equal to another.java.lang.String[]
getLanguages()
Gets the languages that satisfy this precondition.int
hashCode()
Gets the hash code for this object.void
setComparisonValue(java.lang.Object aValue)
Sets the literal value to which features' values will be compared.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
setLanguages(java.lang.String[] aLanguages)
Sets the languages that satisfy 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 org.apache.uima.resource.metadata.impl.SimplePrecondition_impl
evaluate, getComparisonValue, getDefault, getFeatureName, getFsIndexName, getFsMatchConstraint, getPreconditionType, getPredicate, getXmlizationInfo, isValidPredicateName, setDefault
-
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, buildFromXMLElement, clone, getAdditionalAttributes, getAttributeClass, getAttributeValue, getInfoset, getMatchingNode, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSerialContext, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, resolveSettings, setAttributeValue, setInfoset, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, valueIsNullOrEmptyArray, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
-
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, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
-
Methods inherited from interface org.apache.uima.resource.metadata.Precondition
evaluate
-
Methods inherited from interface org.apache.uima.resource.metadata.SimplePrecondition
getComparisonValue, getDefault, getFeatureName, getFsIndexName, getFsMatchConstraint, getPreconditionType, getPredicate, setDefault
-
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
-
-
-
-
Method Detail
-
getLanguages
public java.lang.String[] getLanguages()
Description copied from interface:LanguagePrecondition
Gets the languages that satisfy this precondition. This will be an array of ISO language identifiers. For this precondition to be satisfied, the document's language must be subsumed by one of these identifiers (for example, en-GB is subsumed by en).Note that if the document's language is unknown, the value of the
default
property determines whether this precondition is satisfied.- Specified by:
getLanguages
in interfaceLanguagePrecondition
- Returns:
- the languages that satisfy this precondition
- See Also:
LanguagePrecondition.getLanguages()
-
setLanguages
public void setLanguages(java.lang.String[] aLanguages)
Description copied from interface:LanguagePrecondition
Sets the languages that satisfy this precondition. This will be an array of ISO language identifiers. For this precondition to be satisfied, the document's language must be subsumed by one of these identifiers (for example, en-GB is subsumed by en).Note that if the document's language is unknown, the value of the
default
property determines whether this precondition is satisfied. The ISO language identifiers are cannonicalized by lower-casing them and replacing underscores with hyphens. Also, if any of the identifiers are x-unspecified, the array is replaced with an array of just one element: x-unspecified, since all languages are defined to match that one.- Specified by:
setLanguages
in interfaceLanguagePrecondition
- Parameters:
aLanguages
- the languages that satisfy this precondition- See Also:
LanguagePrecondition.setLanguages(java.lang.String[])
-
setComparisonValue
public void setComparisonValue(java.lang.Object aValue)
Description copied from interface:SimplePrecondition
Sets the literal value to which features' values will be compared.- Specified by:
setComparisonValue
in interfaceSimplePrecondition
- Overrides:
setComparisonValue
in classSimplePrecondition_impl
- Parameters:
aValue
- the comparison value, which must be a String, Integer, Float, Boolean, or an array of one of those four types.- See Also:
SimplePrecondition.setComparisonValue(java.lang.Object)
-
setFeatureName
public void setFeatureName(java.lang.String aFeatureName)
Description copied from interface:SimplePrecondition
Sets the name of the feature to be tested.- Specified by:
setFeatureName
in interfaceSimplePrecondition
- Overrides:
setFeatureName
in classSimplePrecondition_impl
- Parameters:
aFeatureName
- the feature name,null
if none- See Also:
SimplePrecondition.setFeatureName(java.lang.String)
-
setFsIndexName
public void setFsIndexName(java.lang.String aIndexName)
Description copied from interface:SimplePrecondition
Sets the name of the FeatureStructure index containing FeatureStructures to be tested by this precondition.- Specified by:
setFsIndexName
in interfaceSimplePrecondition
- Overrides:
setFsIndexName
in classSimplePrecondition_impl
- Parameters:
aIndexName
- the name of the FS index,null
if the default annotation index should be used- See Also:
SimplePrecondition.setFsIndexName(java.lang.String)
-
setFsMatchConstraint
public void setFsMatchConstraint(FSMatchConstraint aConstraint)
Description copied from interface:SimplePrecondition
Sets the FSMatchConstraint that determines which CAS feature structures will be tested by this precondition.- Specified by:
setFsMatchConstraint
in interfaceSimplePrecondition
- Overrides:
setFsMatchConstraint
in classSimplePrecondition_impl
- Parameters:
aConstraint
- the FS match constraint,null
if none- See Also:
SimplePrecondition.setFsMatchConstraint(org.apache.uima.cas.FSMatchConstraint)
-
setPredicate
public void setPredicate(java.lang.String aPredicate)
Description copied from interface:SimplePrecondition
Sets the predicate used to compare the test value to the comparison value.- Specified by:
setPredicate
in interfaceSimplePrecondition
- Overrides:
setPredicate
in classSimplePrecondition_impl
- Parameters:
aPredicate
- a String that identifies the predicate used. This must match one of the constants defined on this interface.- See Also:
SimplePrecondition.setPredicate(java.lang.String)
-
equals
public boolean equals(java.lang.Object aObject)
Description copied from class:MetaDataObject_impl
Determines if this object is equal to another. Two MetaDataObjects are equivalent if they share the same attributes and the same values for those attributes.- Specified by:
equals
in interfaceMetaDataObject
- Overrides:
equals
in classMetaDataObject_impl
- Parameters:
aObject
- object with which to compare this object- Returns:
- true if and only if this object is equal to
aObj
-
hashCode
public int hashCode()
Description copied from class:MetaDataObject_impl
Gets the hash code for this object. The hash codes of two NameClassPairsx
andy
must be equal ifx.equals(y)
returns true;- Overrides:
hashCode
in classMetaDataObject_impl
- Returns:
- the hash code for this object
-
-