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:
java.io.Serializable,java.lang.Cloneable,Capability,MetaDataObject,XMLizable
public class Capability_impl extends MetaDataObject_impl implements Capability
Reference implementation ofCapability- 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.Capability
EMPTY_CAPABILITIES
-
-
Constructor Summary
Constructors Constructor Description Capability_impl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInputFeature(java.lang.String aFeatureName)A convenience method that adds an input Feature to this Capability.voidaddInputSofa(java.lang.String aSofaName)A convenience method that adds an input Sofa name to this Capability.voidaddInputType(java.lang.String aTypeName, boolean aAllAnnotatorFeatures)A convenience method that adds an input Type to this Capability.voidaddOutputFeature(java.lang.String aFeatureName)A convenience method that adds an output Feature to this Capability.voidaddOutputSofa(java.lang.String aSofaName)A convenience method that adds an output Sofa name to this Capability.voidaddOutputType(java.lang.String aTypeName, boolean aAllAnnotatorFeatures)A convenience method that adds an output Type to this Capability.voidaddSupportedLanguage(java.lang.String aLanguage)A convenience method that adds a supported language to this Capability.java.lang.StringgetDescription()Gets the description of this Capability.TypeOrFeature[]getInputs()Gets the inputs of this Capability.java.lang.String[]getInputSofas()Gets the inputs Sofa names of this Capability.java.lang.String[]getLanguagesSupported()A convenience method that analyzes the preconditions of thisCapabilityand returns the ISO language identifiers that the Resource supports.java.lang.String[]getMimeTypesSupported()A convenience method that analyzes the preconditions of thisCapabilityand returns the MIME types that the Resource can take as input.TypeOrFeature[]getOutputs()Gets the outputs of this Capability.java.lang.String[]getOutputSofas()Gets the output Sofa names of this Capability.Precondition[]getPreconditions()Retrieves the preconditions that must be satisfied in order for the Resource to begin processing.protected XmlizationInfogetXmlizationInfo()To be implemented by subclasses to return information describing how to represent this object in XML.voidremoveSupportedLanguage(java.lang.String aLanguage)A convenience method that removes a supported language from this Capability.voidsetDescription(java.lang.String aDescription)Sets the description of this Capability.voidsetInputs(TypeOrFeature[] aInputs)Sets the inputs of this Capability.voidsetInputSofas(java.lang.String[] aInputSofaNames)Sets the input Sofa names.voidsetLanguagesSupported(java.lang.String[] aLanguageIDs)A convenience method that sets the languages that this Resource supports.voidsetMimeTypesSupported(java.lang.String[] aMimeTypes)A convenience method that sets the MIME types that this Resource can take as input.voidsetOutputs(TypeOrFeature[] aOutputs)Sets the outputs of this Capability.voidsetOutputSofas(java.lang.String[] aOutputSofaNames)Sets the output Sofa names of this capabilityvoidsetPreconditions(Precondition[] aPreconditions)Sets thePreconditions 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
-
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Description copied from interface:CapabilityGets the description of this Capability.- Specified by:
getDescriptionin interfaceCapability- Returns:
- the description of this Capability.
-
setDescription
public void setDescription(java.lang.String aDescription)
Description copied from interface:CapabilitySets the description of this Capability.- Specified by:
setDescriptionin interfaceCapability- Parameters:
aDescription- aDescription the description of this Capability.
-
getInputs
public TypeOrFeature[] getInputs()
Description copied from interface:CapabilityGets the inputs of this Capability.- Specified by:
getInputsin interfaceCapability- Returns:
- an array of references to Types or Features in this Resource's Type System.
- See Also:
Capability.getInputs()
-
getOutputs
public TypeOrFeature[] getOutputs()
Description copied from interface:CapabilityGets the outputs of this Capability.- Specified by:
getOutputsin interfaceCapability- Returns:
- an array of references to Types or Features in this Resource's TypeSystem.
- See Also:
Capability.getOutputs()
-
getPreconditions
public Precondition[] getPreconditions()
Description copied from interface:CapabilityRetrieves the preconditions that must be satisfied in order for the Resource to begin processing.- Specified by:
getPreconditionsin interfaceCapability- Returns:
- an unmodifiable list of
Preconditions. - See Also:
Capability.getPreconditions()
-
getLanguagesSupported
public java.lang.String[] getLanguagesSupported()
Description copied from interface:CapabilityA convenience method that analyzes the preconditions of thisCapabilityand returns the ISO language identifiers that the Resource supports. This is only meaningful when analyzing text documents.- Specified by:
getLanguagesSupportedin interfaceCapability- Returns:
- an array of ISO language identifiers. An empty array means that the Resource claims to be language-independent.
- See Also:
Capability.getLanguagesSupported()
-
getMimeTypesSupported
public java.lang.String[] getMimeTypesSupported()
Description copied from interface:CapabilityA convenience method that analyzes the preconditions of thisCapabilityand returns the MIME types that the Resource can take as input.- Specified by:
getMimeTypesSupportedin interfaceCapability- Returns:
- an array of MIME types. This may be empty if the Resource does not declare MIME type preconditions.
- See Also:
Capability.getMimeTypesSupported()
-
setInputs
public void setInputs(TypeOrFeature[] aInputs)
Description copied from interface:CapabilitySets the inputs of this Capability.- Specified by:
setInputsin interfaceCapability- Parameters:
aInputs- an array of references to Types or Features in this Resource's TypeSystem.- See Also:
Capability.setInputs(TypeOrFeature[])
-
setOutputs
public void setOutputs(TypeOrFeature[] aOutputs)
Description copied from interface:CapabilitySets the outputs of this Capability.- Specified by:
setOutputsin interfaceCapability- Parameters:
aOutputs- an array of references to Types or Features in this Resource's TypeSystem.- See Also:
Capability.setOutputs(TypeOrFeature[])
-
setPreconditions
public void setPreconditions(Precondition[] aPreconditions)
Description copied from interface:CapabilitySets thePreconditions of thisCapability.- Specified by:
setPreconditionsin interfaceCapability- Parameters:
aPreconditions- an array ofPreconditionobjects- See Also:
Capability.setPreconditions(Precondition[])
-
setLanguagesSupported
public void setLanguagesSupported(java.lang.String[] aLanguageIDs)
Description copied from interface:CapabilityA 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:
setLanguagesSupportedin interfaceCapability- Parameters:
aLanguageIDs- an array of ISO language identifiers. An empty array means that the Resource claims to be language-independent.- See Also:
Capability.setLanguagesSupported(String[])
-
setMimeTypesSupported
public void setMimeTypesSupported(java.lang.String[] aMimeTypes)
Description copied from interface:CapabilityA 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:
setMimeTypesSupportedin interfaceCapability- Parameters:
aMimeTypes- an array of MIME types. This may be empty if the Resource does not declare MIME type preconditions.- See Also:
Capability.setMimeTypesSupported(java.lang.String[])
-
addInputType
public void addInputType(java.lang.String aTypeName, boolean aAllAnnotatorFeatures)Description copied from interface:CapabilityA convenience method that adds an input Type to this Capability.- Specified by:
addInputTypein 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:
Capability.addInputType(java.lang.String, boolean)
-
addInputFeature
public void addInputFeature(java.lang.String aFeatureName)
Description copied from interface:CapabilityA convenience method that adds an input Feature to this Capability.- Specified by:
addInputFeaturein interfaceCapability- Parameters:
aFeatureName- the fully qualified feature name- See Also:
Capability.addInputFeature(java.lang.String)
-
addOutputType
public void addOutputType(java.lang.String aTypeName, boolean aAllAnnotatorFeatures)Description copied from interface:CapabilityA convenience method that adds an output Type to this Capability.- Specified by:
addOutputTypein 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:
Capability.addOutputType(java.lang.String, boolean)
-
addOutputFeature
public void addOutputFeature(java.lang.String aFeatureName)
Description copied from interface:CapabilityA convenience method that adds an output Feature to this Capability.- Specified by:
addOutputFeaturein interfaceCapability- Parameters:
aFeatureName- the fully qualified feature name- See Also:
Capability.addOutputFeature(java.lang.String)
-
addSupportedLanguage
public void addSupportedLanguage(java.lang.String aLanguage)
Description copied from interface:CapabilityA convenience method that adds a supported language to this Capability.- Specified by:
addSupportedLanguagein interfaceCapability- Parameters:
aLanguage- the ISO language identifier- See Also:
Capability.addSupportedLanguage(java.lang.String)
-
removeSupportedLanguage
public void removeSupportedLanguage(java.lang.String aLanguage)
Description copied from interface:CapabilityA convenience method that removes a supported language from this Capability.- Specified by:
removeSupportedLanguagein interfaceCapability- Parameters:
aLanguage- the ISO language identifier
-
getInputSofas
public java.lang.String[] getInputSofas()
Description copied from interface:CapabilityGets the inputs Sofa names of this Capability.- Specified by:
getInputSofasin interfaceCapability- Returns:
- an array of strings representing the SofAName
-
getOutputSofas
public java.lang.String[] getOutputSofas()
Description copied from interface:CapabilityGets the output Sofa names of this Capability.- Specified by:
getOutputSofasin interfaceCapability- Returns:
- an array of strings representing output SofA names
-
setInputSofas
public void setInputSofas(java.lang.String[] aInputSofaNames)
Description copied from interface:CapabilitySets the input Sofa names.- Specified by:
setInputSofasin interfaceCapability- Parameters:
aInputSofaNames- an array of strings containing SofA names
-
setOutputSofas
public void setOutputSofas(java.lang.String[] aOutputSofaNames)
Description copied from interface:CapabilitySets the output Sofa names of this capability- Specified by:
setOutputSofasin interfaceCapability- Parameters:
aOutputSofaNames- an array of strings containing SoFA name
-
addInputSofa
public void addInputSofa(java.lang.String aSofaName)
Description copied from interface:CapabilityA convenience method that adds an input Sofa name to this Capability.- Specified by:
addInputSofain interfaceCapability- Parameters:
aSofaName- the sofa to add to the inputs
-
addOutputSofa
public void addOutputSofa(java.lang.String aSofaName)
Description copied from interface:CapabilityA convenience method that adds an output Sofa name to this Capability.- Specified by:
addOutputSofain interfaceCapability- Parameters:
aSofaName- the sofa to add as an output
-
getXmlizationInfo
protected XmlizationInfo getXmlizationInfo()
Description copied from class:MetaDataObject_implTo be implemented by subclasses to return information describing how to represent this object in XML.- Specified by:
getXmlizationInfoin classMetaDataObject_impl- Returns:
- information defining this object's XML representation
-
-