Class Capability_impl
java.lang.Object
org.apache.uima.resource.metadata.impl.MetaDataObject_impl
org.apache.uima.resource.metadata.impl.Capability_impl
- All Implemented Interfaces:
Serializable
,Cloneable
,Capability
,MetaDataObject
,XMLizable
Reference implementation of
Capability
- See Also:
-
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.Capability
EMPTY_CAPABILITIES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addInputFeature
(String aFeatureName) A convenience method that adds an input Feature to this Capability.void
addInputSofa
(String aSofaName) A convenience method that adds an input Sofa name to this Capability.void
addInputType
(String aTypeName, boolean aAllAnnotatorFeatures) A convenience method that adds an input Type to this Capability.void
addOutputFeature
(String aFeatureName) A convenience method that adds an output Feature to this Capability.void
addOutputSofa
(String aSofaName) A convenience method that adds an output Sofa name to this Capability.void
addOutputType
(String aTypeName, boolean aAllAnnotatorFeatures) A convenience method that adds an output Type to this Capability.void
addSupportedLanguage
(String aLanguage) A convenience method that adds a supported language to this Capability.Gets the description of this Capability.Gets the inputs of this Capability.String[]
Gets the inputs Sofa names of this Capability.String[]
A convenience method that analyzes the preconditions of thisCapability
and returns the ISO language identifiers that the Resource supports.String[]
A convenience method that analyzes the preconditions of thisCapability
and returns the MIME types that the Resource can take as input.Gets the outputs of this Capability.String[]
Gets the output Sofa names of this Capability.Retrieves the preconditions that must be satisfied in order for the Resource to begin processing.protected XmlizationInfo
To be implemented by subclasses to return information describing how to represent this object in XML.void
removeSupportedLanguage
(String aLanguage) A convenience method that removes a supported language from this Capability.void
setDescription
(String aDescription) Sets the description of this Capability.void
setInputs
(TypeOrFeature[] aInputs) Sets the inputs of this Capability.void
setInputSofas
(String[] aInputSofaNames) Sets the input Sofa names.void
setLanguagesSupported
(String[] aLanguageIDs) A convenience method that sets the languages that this Resource supports.void
setMimeTypesSupported
(String[] aMimeTypes) A convenience method that sets the MIME types that this Resource can take as input.void
setOutputs
(TypeOrFeature[] aOutputs) Sets the outputs of this Capability.void
setOutputSofas
(String[] aOutputSofaNames) Sets the output Sofa names of this capabilityvoid
setPreconditions
(Precondition[] aPreconditions) Sets thePrecondition
s of thisCapability
.Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, 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, 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, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
-
Constructor Details
-
Capability_impl
public Capability_impl()
-
-
Method Details
-
getDescription
Description copied from interface:Capability
Gets the description of this Capability.- Specified by:
getDescription
in interfaceCapability
- Returns:
- the description of this Capability.
-
setDescription
Description copied from interface:Capability
Sets the description of this Capability.- Specified by:
setDescription
in interfaceCapability
- Parameters:
aDescription
- aDescription the description of this Capability.
-
getInputs
Description copied from interface:Capability
Gets the inputs of this Capability.- Specified by:
getInputs
in interfaceCapability
- Returns:
- an array of references to Types or Features in this Resource's Type System.
- See Also:
-
getOutputs
Description copied from interface:Capability
Gets the outputs of this Capability.- Specified by:
getOutputs
in interfaceCapability
- Returns:
- an array of references to Types or Features in this Resource's TypeSystem.
- See Also:
-
getPreconditions
Description copied from interface:Capability
Retrieves the preconditions that must be satisfied in order for the Resource to begin processing.- Specified by:
getPreconditions
in interfaceCapability
- Returns:
- an unmodifiable list of
Precondition
s. - See Also:
-
getLanguagesSupported
Description copied from interface:Capability
A convenience method that analyzes the preconditions of thisCapability
and returns the ISO language identifiers that the Resource supports. This is only meaningful when analyzing text documents.- Specified by:
getLanguagesSupported
in interfaceCapability
- Returns:
- an array of ISO language identifiers. An empty array means that the Resource claims to be language-independent.
- See Also:
-
getMimeTypesSupported
Description copied from interface:Capability
A convenience method that analyzes the preconditions of thisCapability
and returns the MIME types that the Resource can take as input.- Specified by:
getMimeTypesSupported
in interfaceCapability
- Returns:
- an array of MIME types. This may be empty if the Resource does not declare MIME type preconditions.
- See Also:
-
setInputs
Description copied from interface:Capability
Sets the inputs of this Capability.- Specified by:
setInputs
in interfaceCapability
- Parameters:
aInputs
- an array of references to Types or Features in this Resource's TypeSystem.- See Also:
-
setOutputs
Description copied from interface:Capability
Sets the outputs of this Capability.- Specified by:
setOutputs
in interfaceCapability
- Parameters:
aOutputs
- an array of references to Types or Features in this Resource's TypeSystem.- See Also:
-
setPreconditions
Description copied from interface:Capability
Sets thePrecondition
s of thisCapability
.- Specified by:
setPreconditions
in interfaceCapability
- Parameters:
aPreconditions
- an array ofPrecondition
objects- See Also:
-
setLanguagesSupported
Description copied from interface:Capability
A convenience method that sets the languages that this Resource supports. This is only meaningful when text documents are analyzed.Calling this method affects the preconditions of this
Capability
. All other language support preconditions will be removed, but non-language related preconditions will be unaffected.- Specified by:
setLanguagesSupported
in interfaceCapability
- Parameters:
aLanguageIDs
- an array of ISO language identifiers. An empty array means that the Resource claims to be language-independent.- See Also:
-
setMimeTypesSupported
Description copied from interface:Capability
A convenience method that sets the MIME types that this Resource can take as input.Calling this method affects the preconditions of this
Capability
. All other MIME type preconditions will be removed, but other preconditions will be unaffected.- Specified by:
setMimeTypesSupported
in interfaceCapability
- Parameters:
aMimeTypes
- an array of MIME types. This may be empty if the Resource does not declare MIME type preconditions.- See Also:
-
addInputType
Description copied from interface:Capability
A convenience method that adds an input Type to this Capability.- Specified by:
addInputType
in interfaceCapability
- Parameters:
aTypeName
- the fully qualified type nameaAllAnnotatorFeatures
- if true, indicates that this Capability requires as input all features of this type that are specified in the same AnalysisEngine descriptor. If false, features must be explicitly declared by callingCapability.addInputFeature(String)
.- See Also:
-
addInputFeature
Description copied from interface:Capability
A convenience method that adds an input Feature to this Capability.- Specified by:
addInputFeature
in interfaceCapability
- Parameters:
aFeatureName
- the fully qualified feature name- See Also:
-
addOutputType
Description copied from interface:Capability
A convenience method that adds an output Type to this Capability.- Specified by:
addOutputType
in interfaceCapability
- Parameters:
aTypeName
- the fully qualified type nameaAllAnnotatorFeatures
- if true, indicates that this Capability declares as output all features of this type that are specified in the same AnalysisEngine descriptor. If false, features must be explicitly declared by callingCapability.addOutputFeature(String)
.- See Also:
-
addOutputFeature
Description copied from interface:Capability
A convenience method that adds an output Feature to this Capability.- Specified by:
addOutputFeature
in interfaceCapability
- Parameters:
aFeatureName
- the fully qualified feature name- See Also:
-
addSupportedLanguage
Description copied from interface:Capability
A convenience method that adds a supported language to this Capability.- Specified by:
addSupportedLanguage
in interfaceCapability
- Parameters:
aLanguage
- the ISO language identifier- See Also:
-
removeSupportedLanguage
Description copied from interface:Capability
A convenience method that removes a supported language from this Capability.- Specified by:
removeSupportedLanguage
in interfaceCapability
- Parameters:
aLanguage
- the ISO language identifier
-
getInputSofas
Description copied from interface:Capability
Gets the inputs Sofa names of this Capability.- Specified by:
getInputSofas
in interfaceCapability
- Returns:
- an array of strings representing the SofAName
-
getOutputSofas
Description copied from interface:Capability
Gets the output Sofa names of this Capability.- Specified by:
getOutputSofas
in interfaceCapability
- Returns:
- an array of strings representing output SofA names
-
setInputSofas
Description copied from interface:Capability
Sets the input Sofa names.- Specified by:
setInputSofas
in interfaceCapability
- Parameters:
aInputSofaNames
- an array of strings containing SofA names
-
setOutputSofas
Description copied from interface:Capability
Sets the output Sofa names of this capability- Specified by:
setOutputSofas
in interfaceCapability
- Parameters:
aOutputSofaNames
- an array of strings containing SoFA name
-
addInputSofa
Description copied from interface:Capability
A convenience method that adds an input Sofa name to this Capability.- Specified by:
addInputSofa
in interfaceCapability
- Parameters:
aSofaName
- the sofa to add to the inputs
-
addOutputSofa
Description copied from interface:Capability
A convenience method that adds an output Sofa name to this Capability.- Specified by:
addOutputSofa
in interfaceCapability
- Parameters:
aSofaName
- the sofa to add as an output
-
getXmlizationInfo
Description copied from class:MetaDataObject_impl
To be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
getXmlizationInfo
in classMetaDataObject_impl
- Returns:
- information defining this object's XML representation
-