gate
Interface ProcessingResource

All Superinterfaces:
Executable, FeatureBearer, NameBearer, Resource, Serializable
All Known Subinterfaces:
LanguageAnalyser
All Known Implementing Classes:
AbstractProcessingResource, AnnotationDeletePR, AnnotationSetTransfer, DefaultGazetteer

public interface ProcessingResource
extends Resource, Executable

Models all sorts of processing resources. Because run() doesn't throw exceptions, we have a check() that will re-throw any exception that was caught when run() was invoked.


Method Summary
 void interrupt()
          Notifies this PR that it should stop its execution as soon as possible.
 boolean isInterrupted()
          Checks whether this PR has been interrupted since the lsat time its Executable.execute() method was called.
 void reInit()
          Reinitialises the processing resource.
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 
Methods inherited from interface gate.Executable
execute
 

Method Detail

reInit

public void reInit()
            throws ResourceInstantiationException
Reinitialises the processing resource. After calling this method the resource should be in the state it is after calling init. If the resource depends on external resources (such as rules files) then the resource will re-read those resources. If the data used to create the resource has changed since the resource has been created then the resource will change too after calling reInit().

isInterrupted

public boolean isInterrupted()
Checks whether this PR has been interrupted since the lsat time its Executable.execute() method was called.
Specified by:
isInterrupted in interface Executable

interrupt

public void interrupt()
Notifies this PR that it should stop its execution as soon as possible.
Specified by:
interrupt in interface Executable