gate
Interface Controller

All Superinterfaces:
Executable, FeatureBearer, NameBearer, Resource, Serializable
All Known Subinterfaces:
ConditionalController, CorpusController
All Known Implementing Classes:
AbstractController, ConditionalSerialAnalyserController, ConditionalSerialController, RealtimeCorpusController, SerialAnalyserController, SerialController

public interface Controller
extends Resource, Executable, NameBearer, FeatureBearer

Models the execution of groups of ProcessingResources.


Method Summary
 void execute()
           Executes this controller.
 Collection getPRs()
          Returns all the ProcessingResources contained by this controller.
 void setPRs(Collection PRs)
          Populates this controller from a collection of ProcessingResources (optional operation).
 
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
interrupt, isInterrupted
 

Method Detail

getPRs

Collection getPRs()
Returns all the ProcessingResources contained by this controller. The actual type of collection returned depends on the controller type.


setPRs

void setPRs(Collection PRs)
Populates this controller from a collection of ProcessingResources (optional operation). Controllers that are serializable must implement this method needed by GATE to restore their contents.

Throws:
UnsupportedOperationException - if the setPRs method is not supported by this controller.

execute

void execute()
             throws ExecutionException

Executes this controller. Different controller implementations will provide different strategies for executing the PRs they contain, e.g. execute the PRs one after the other in sequence, execute them once for each document in a corpus, or in parallel, based on some condition, or in a branching workflow arrangement, etc.

If any of its child PRs implement the ControllerAwarePR interface, then the controller must ensure that all their relevant methods are called at the correct times. See the documentation for ControllerAwarePR for details.

Specified by:
execute in interface Executable
Throws:
ExecutionException