org.apache.uima.resource.metadata
Interface LanguagePrecondition
- All Superinterfaces:
- java.lang.Cloneable, MetaDataObject, Precondition, java.io.Serializable, SimplePrecondition, XMLizable
- All Known Implementing Classes:
- LanguagePrecondition_impl
public interface LanguagePrecondition
- extends SimplePrecondition
A precondition on the language of the document. This interface is a kind of
SimplePrecondition
to be used as a convenience.
Method Summary |
java.lang.String[] |
getLanguages()
Gets the languages that satisfy this precondition. |
void |
setLanguages(java.lang.String[] aLanguages)
Sets the languages that satisfy this precondition. |
Methods inherited from interface org.apache.uima.resource.metadata.SimplePrecondition |
getComparisonValue, getDefault, getFeatureName, getFsIndexName, getFsMatchConstraint, getPreconditionType, getPredicate, setComparisonValue, setDefault, setFeatureName, setFsIndexName, setFsMatchConstraint, setPredicate |
getLanguages
java.lang.String[] getLanguages()
- 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.
- Returns:
- the languages that satisfy this precondition
setLanguages
void setLanguages(java.lang.String[] aLanguages)
- 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.
- Parameters:
aLanguages
- the languages that satisfy this precondition
- Throws:
UIMA_UnsupportedOperationException
- if this MetaDataObject
is not modifiable.
Copyright © 2013. All Rights Reserved.