|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Capability
A Capability
defines an operation that an Resource can carry out. Each Capability
consists of the following information:
MetaDataObject
s, a Capability
may or may not be modifiable.
An application can find out by calling the MetaDataObject.isModifiable()
method.
Method Summary | |
---|---|
void |
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. |
String |
getDescription()
Gets the description of this Capability. |
TypeOrFeature[] |
getInputs()
Gets the inputs of this Capability. |
String[] |
getInputSofas()
Gets the inputs Sofa names of this Capability. |
String[] |
getLanguagesSupported()
A convenience method that analyzes the preconditions of this Capability and
returns the ISO language identifiers that the Resource supports. |
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. |
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. |
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[] aInputSofas)
Reserved for future use. |
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[] aOutputSofas)
Sets the output Sofa names of this capabilitty |
void |
setPreconditions(Precondition[] aPreconditions)
Sets the Precondition s of this Capability . |
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 |
---|
String getDescription()
void setDescription(String aDescription)
aDescription
- aDescription the description of this Capability.TypeOrFeature[] getInputs()
TypeOrFeature[] getOutputs()
String[] getInputSofas()
String[] getOutputSofas()
Precondition[] getPreconditions()
Precondition
s.String[] getLanguagesSupported()
Capability
and
returns the ISO language identifiers that the Resource supports. This is only meaningful when
analyzing text documents.
String[] getMimeTypesSupported()
Capability
and
returns the MIME types that the Resource can take as input.
void setInputs(TypeOrFeature[] aInputs)
aInputs
- an array of references to Types or Features in this Resource's TypeSystem.void setOutputs(TypeOrFeature[] aOutputs)
aOutputs
- an array of references to Types or Features in this Resource's TypeSystem.void setInputSofas(String[] aInputSofas)
void setOutputSofas(String[] aOutputSofas)
aOutputSofas
- an array of strings containing SoFA namevoid setPreconditions(Precondition[] aPreconditions)
Precondition
s of this Capability
.
aPreconditions
- an array of Precondition
objects
UIMA_UnsupportedOperationException
- if this MetaDataObject
is not modifiable.void setLanguagesSupported(String[] aLanguageIDs)
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.
aLanguageIDs
- an array of ISO language identifiers. An empty array means that the Resource claims to
be language-independent.void setMimeTypesSupported(String[] aMimeTypes)
Calling this method affects the preconditions of this Capability
. All other
MIME type preconditions will be removed, but other preconditions will be unaffected.
aMimeTypes
- an array of MIME types. This may be empty if the Resource does not declare MIME type
preconditions.void addInputType(String aTypeName, boolean aAllAnnotatorFeatures)
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 calling addInputFeature(String)
.void addInputFeature(String aFeatureName)
aFeatureName
- the fully qualified feature namevoid addOutputType(String aTypeName, boolean aAllAnnotatorFeatures)
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 calling addOutputFeature(String)
.void addOutputFeature(String aFeatureName)
aFeatureName
- the fully qualified feature namevoid addInputSofa(String aSofaName)
aSofaName
- void addOutputSofa(String aSofaName)
aSofaName
- void addSupportedLanguage(String aLanguage)
aLanguage
- the ISO language identifiervoid removeSupportedLanguage(String aLanguage)
aLanguage
- the ISO language identifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |