Package org.apache.uima.resource
Interface ExternalResourceDependency
-
- All Superinterfaces:
java.lang.Cloneable,MetaDataObject,java.io.Serializable,XMLizable
- All Known Implementing Classes:
ExternalResourceDependency_impl
public interface ExternalResourceDependency extends MetaDataObject
AnExternalResourceDependencyobject describes an resources's requirements on an external resource. This object has four properties:- A key, by which the annotator will identify the resource.
- A textual description of the resource dependency.
- The name of a Java interface through which the data will be accessed. This is optional; if
not specified, the default
DataResourceinterface will be used. - Whether the resource is required or optional.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDescription()Retrieves the textual description of the resource.java.lang.StringgetInterfaceName()Retrieves the name of the Java interface through which this resource will be accessed.java.lang.StringgetKey()Retrieves the key by which the resource is identified.booleanisOptional()Gets whether this resource dependency is optional.voidsetDescription(java.lang.String aDescription)Retrieves the textual description of the resource.voidsetInterfaceName(java.lang.String aName)Sets the name of the Java interface through which this resource will be accessed.voidsetKey(java.lang.String aKey)Sets the key by which the resource is identified.voidsetOptional(boolean aOptional)Sets whether this resource dependency is optional.-
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
-
getKey
java.lang.String getKey()
Retrieves the key by which the resource is identified.- Returns:
- the key for this resource.
-
setKey
void setKey(java.lang.String aKey)
Sets the key by which the resource is identified.- Parameters:
aKey- the key for this resource.
-
getDescription
java.lang.String getDescription()
Retrieves the textual description of the resource.- Returns:
- the textual description of the resource.
-
setDescription
void setDescription(java.lang.String aDescription)
Retrieves the textual description of the resource.- Parameters:
aDescription- the textual description of the resource.
-
getInterfaceName
java.lang.String getInterfaceName()
Retrieves the name of the Java interface through which this resource will be accessed.- Returns:
- the name of the Java interface for this external resource,
nullif none.
-
setInterfaceName
void setInterfaceName(java.lang.String aName)
Sets the name of the Java interface through which this resource will be accessed.- Parameters:
aName- the name of the Java interface for this external resource,nullif none.- Throws:
UIMA_UnsupportedOperationException- if this object is not modifiable
-
isOptional
boolean isOptional()
Gets whether this resource dependency is optional. Dependencies that are not optional must be linked to resource definitions prior to instantiating the Analysis Engine, or an exception will be thrown.- Returns:
- true if this resource dependency is optional, false if not
-
setOptional
void setOptional(boolean aOptional)
Sets whether this resource dependency is optional. Dependencies that are not optional must be linked to resource definitions prior to instantiating the Analysis Engine, or an exception will be thrown.- Parameters:
aOptional- true if this resource dependency is optional, false if not
-
-