gate
Interface Resource
- All Superinterfaces:
- FeatureBearer, NameBearer, Serializable
- All Known Subinterfaces:
- AnnotationVisualResource, Controller, Corpus, Document, LanguageAnalyser, LanguageResource, ProcessingResource, VisualResource
- All Known Implementing Classes:
- AbstractResource
- public interface Resource
- extends FeatureBearer, NameBearer, Serializable
Models all sorts of resources.
init
public Resource init()
throws ResourceInstantiationException
- Initialise this resource, and return it.
cleanup
public void cleanup()
- Clears the internal data of the resource, when it gets released
getParameterValue
public Object getParameterValue(String paramaterName)
throws ResourceInstantiationException
- Gets the value of a parameter of this resource.
- Parameters:
paramaterName
- the name of the parameter- Returns:
- the current value of the parameter
setParameterValue
public void setParameterValue(String paramaterName,
Object parameterValue)
throws ResourceInstantiationException
- Sets the value for a specified parameter.
- Parameters:
paramaterName
- the name for the parameteerparameterValue
- the value the parameter will receive
setParameterValues
public void setParameterValues(FeatureMap parameters)
throws ResourceInstantiationException
- Sets the values for more parameters in one step.
- Parameters:
parameters
- a FeatureMap
that has parameter names as keys and
parameter values as values.