org.apache.uima.resource.metadata.impl
Class Capability_impl

java.lang.Object
  extended by org.apache.uima.resource.metadata.impl.MetaDataObject_impl
      extended by 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 of Capability

See Also:
Serialized Form

Constructor Summary
Capability_impl()
           
 
Method Summary
 void addInputFeature(java.lang.String aFeatureName)
          A convenience method that adds an input Feature to this Capability.
 void addInputSofa(java.lang.String aSofaName)
          A convenience method that adds an input Sofa name to this Capability.
 void addInputType(java.lang.String aTypeName, boolean aAllAnnotatorFeatures)
          A convenience method that adds an input Type to this Capability.
 void addOutputFeature(java.lang.String aFeatureName)
          A convenience method that adds an output Feature to this Capability.
 void addOutputSofa(java.lang.String aSofaName)
          A convenience method that adds an output Sofa name to this Capability.
 void addOutputType(java.lang.String aTypeName, boolean aAllAnnotatorFeatures)
          A convenience method that adds an output Type to this Capability.
 void addSupportedLanguage(java.lang.String aLanguage)
          A convenience method that adds a supported language to this Capability.
 java.lang.String getDescription()
          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 this Capability and returns the ISO language identifiers that the Resource supports.
 java.lang.String[] getMimeTypesSupported()
          A convenience method that analyzes the preconditions of this Capability and 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  XmlizationInfo getXmlizationInfo()
          To be implemented by subclasses to return information describing how to represent this object in XML.
 void removeSupportedLanguage(java.lang.String aLanguage)
          A convenience method that removes a supported language from this Capability.
 void setDescription(java.lang.String aDescription)
          Sets the description of this Capability.
 void setInputs(TypeOrFeature[] aInputs)
          Sets the inputs of this Capability.
 void setInputSofas(java.lang.String[] aInputSofaNames)
          Reserved for future use.
 void setLanguagesSupported(java.lang.String[] aLanguageIDs)
          A convenience method that sets the languages that this Resource supports.
 void setMimeTypesSupported(java.lang.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(java.lang.String[] aOutputSofaNames)
          Sets the output Sofa names of this capabilitty
 void setPreconditions(Precondition[] aPreconditions)
          Sets the Preconditions of this Capability.
 
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, buildFromXMLElement, clone, equals, getAttributeClass, getAttributeValue, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSourceUrl, getSourceUrlString, getWrapperClass, getXMLAttributes, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, setAttributeValue, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, 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 Detail

Capability_impl

public Capability_impl()
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: Capability
Gets the description of this Capability.

Specified by:
getDescription in interface Capability
Returns:
the description of this Capability.

setDescription

public void setDescription(java.lang.String aDescription)
Description copied from interface: Capability
Sets the description of this Capability.

Specified by:
setDescription in interface Capability
Parameters:
aDescription - aDescription the description of this Capability.

getInputs

public TypeOrFeature[] getInputs()
Description copied from interface: Capability
Gets the inputs of this Capability.

Specified by:
getInputs in interface Capability
Returns:
an array of references to Types or Features in this Resource's Type System.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#getInputs()

getOutputs

public TypeOrFeature[] getOutputs()
Description copied from interface: Capability
Gets the outputs of this Capability.

Specified by:
getOutputs in interface Capability
Returns:
an array of references to Types or Features in this Resource's TypeSystem.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#getOutputs()

getPreconditions

public Precondition[] 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 interface Capability
Returns:
an unmodifiable list of Preconditions.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#getPreconditions()

getLanguagesSupported

public java.lang.String[] getLanguagesSupported()
Description copied from interface: Capability
A convenience method that analyzes the preconditions of this Capability and returns the ISO language identifiers that the Resource supports. This is only meaningful when analyzing text documents.

Specified by:
getLanguagesSupported in interface Capability
Returns:
an array of ISO language identifiers. An empty array means that the Resource claims to be language-independent.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#getLanguagesSupported()

getMimeTypesSupported

public java.lang.String[] getMimeTypesSupported()
Description copied from interface: Capability
A convenience method that analyzes the preconditions of this Capability and returns the MIME types that the Resource can take as input.

Specified by:
getMimeTypesSupported in interface Capability
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: Capability
Sets the inputs of this Capability.

Specified by:
setInputs in interface Capability
Parameters:
aInputs - an array of references to Types or Features in this Resource's TypeSystem.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#setInputs(TypeOrFeature[])

setOutputs

public void setOutputs(TypeOrFeature[] aOutputs)
Description copied from interface: Capability
Sets the outputs of this Capability.

Specified by:
setOutputs in interface Capability
Parameters:
aOutputs - an array of references to Types or Features in this Resource's TypeSystem.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#setOutputs(TypeOrFeature[])

setPreconditions

public void setPreconditions(Precondition[] aPreconditions)
Description copied from interface: Capability
Sets the Preconditions of this Capability.

Specified by:
setPreconditions in interface Capability
Parameters:
aPreconditions - an array of Precondition objects
See Also:
org.apache.uima.analysis_engine.metadata.Capability#setPreconditions(Precondition[])

setLanguagesSupported

public void setLanguagesSupported(java.lang.String[] aLanguageIDs)
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 interface Capability
Parameters:
aLanguageIDs - an array of ISO language identifiers. An empty array means that the Resource claims to be language-independent.
See Also:
org.apache.uima.analysis_engine.metadata.Capability#setLanguagesSupported(String[])

setMimeTypesSupported

public void setMimeTypesSupported(java.lang.String[] aMimeTypes)
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 interface Capability
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: Capability
A convenience method that adds an input Type to this Capability.

Specified by:
addInputType in interface Capability
Parameters:
aTypeName - the fully qualified type name
aAllAnnotatorFeatures - 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 calling Capability.addInputFeature(String).
See Also:
org.apache.uima.analysis_engine.metadata.Capability#addInputType(java.lang.String, boolean)

addInputFeature

public void addInputFeature(java.lang.String aFeatureName)
Description copied from interface: Capability
A convenience method that adds an input Feature to this Capability.

Specified by:
addInputFeature in interface Capability
Parameters:
aFeatureName - the fully qualified feature name
See Also:
org.apache.uima.analysis_engine.metadata.Capability#addInputFeature(java.lang.String)

addOutputType

public void addOutputType(java.lang.String aTypeName,
                          boolean aAllAnnotatorFeatures)
Description copied from interface: Capability
A convenience method that adds an output Type to this Capability.

Specified by:
addOutputType in interface Capability
Parameters:
aTypeName - the fully qualified type name
aAllAnnotatorFeatures - 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 calling Capability.addOutputFeature(String).
See Also:
org.apache.uima.analysis_engine.metadata.Capability#addOutputType(java.lang.String, boolean)

addOutputFeature

public void addOutputFeature(java.lang.String aFeatureName)
Description copied from interface: Capability
A convenience method that adds an output Feature to this Capability.

Specified by:
addOutputFeature in interface Capability
Parameters:
aFeatureName - the fully qualified feature name
See Also:
org.apache.uima.analysis_engine.metadata.Capability#addOutputFeature(java.lang.String)

addSupportedLanguage

public void addSupportedLanguage(java.lang.String aLanguage)
Description copied from interface: Capability
A convenience method that adds a supported language to this Capability.

Specified by:
addSupportedLanguage in interface Capability
Parameters:
aLanguage - the ISO language identifier
See Also:
org.apache.uima.analysis_engine.metadata.Capability#addSupportedLanguage(java.lang.String)

removeSupportedLanguage

public void removeSupportedLanguage(java.lang.String aLanguage)
Description copied from interface: Capability
A convenience method that removes a supported language from this Capability.

Specified by:
removeSupportedLanguage in interface Capability
Parameters:
aLanguage - the ISO language identifier

getInputSofas

public java.lang.String[] getInputSofas()
Description copied from interface: Capability
Gets the inputs Sofa names of this Capability.

Specified by:
getInputSofas in interface Capability
Returns:
an array of strings representing the SofAName

getOutputSofas

public java.lang.String[] getOutputSofas()
Description copied from interface: Capability
Gets the output Sofa names of this Capability.

Specified by:
getOutputSofas in interface Capability
Returns:
an array of strings representing output SofA names

setInputSofas

public void setInputSofas(java.lang.String[] aInputSofaNames)
Description copied from interface: Capability
Reserved for future use.

Specified by:
setInputSofas in interface Capability

setOutputSofas

public void setOutputSofas(java.lang.String[] aOutputSofaNames)
Description copied from interface: Capability
Sets the output Sofa names of this capabilitty

Specified by:
setOutputSofas in interface Capability
Parameters:
aOutputSofaNames - an array of strings containing SoFA name

addInputSofa

public void addInputSofa(java.lang.String aSofaName)
Description copied from interface: Capability
A convenience method that adds an input Sofa name to this Capability.

Specified by:
addInputSofa in interface Capability

addOutputSofa

public void addOutputSofa(java.lang.String aSofaName)
Description copied from interface: Capability
A convenience method that adds an output Sofa name to this Capability.

Specified by:
addOutputSofa in interface Capability

getXmlizationInfo

protected XmlizationInfo 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 class MetaDataObject_impl
Returns:
information defining this object's XML representation


Copyright © 2012. All Rights Reserved.