gate.creole
Class SerialController

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--gate.creole.SerialController
All Implemented Interfaces:
Cloneable, Collection, Controller, FeatureBearer, List, ProcessingResource, Resource, Runnable, Serializable
Direct Known Subclasses:
Nerc

public class SerialController
extends ArrayList
implements Controller, List

Execute a list of PRs serially.

See Also:
Serialized Form

Field Summary
protected  ExecutionException executionException
          Any exception caught during run() invocations are stored here.
protected  FeatureMap features
          The feature set
 
Fields inherited from class java.util.ArrayList
elementData, size
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SerialController()
           
 
Method Summary
 void check()
          Trigger any exception that was caught when run() was invoked.
 boolean equals(Object other)
          Two controller that contain the same modules are not equal.
 FeatureMap getFeatures()
          Get the feature set
 String getName()
          Returns the name of this resource
 Resource init()
          Initialise this resource, and return it.
 void reInit()
          Reinitialises the processing resource.
 void run()
          Run the Processing Resources in sequence.
 void setFeatures(FeatureMap features)
          Set the feature set
 void setName(String name)
          Sets the name of this resource
 void setRuntimeParameters(FeatureMap parameters)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, RangeCheck, readObject, remove, removeRange, set, size, toArray, toArray, trimToSize, writeObject
 
Methods inherited from class java.util.AbstractList
hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Field Detail

executionException

protected ExecutionException executionException
Any exception caught during run() invocations are stored here.

features

protected FeatureMap features
The feature set
Constructor Detail

SerialController

public SerialController()
Method Detail

init

public Resource init()
              throws ResourceInstantiationException
Initialise this resource, and return it.
Specified by:
init in interface Resource

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(). This method simply calls init(). This functionality will be overriden by derived classes as necessary.
Specified by:
reInit in interface ProcessingResource

run

public void run()
Run the Processing Resources in sequence.
Specified by:
run in interface Runnable

check

public void check()
           throws ExecutionException
Trigger any exception that was caught when run() was invoked. If there is an exception stored it is cleared by this call.
Specified by:
check in interface ProcessingResource

setName

public void setName(String name)
Sets the name of this resource
Specified by:
setName in interface FeatureBearer

getName

public String getName()
Returns the name of this resource
Specified by:
getName in interface FeatureBearer

setRuntimeParameters

public void setRuntimeParameters(FeatureMap parameters)

getFeatures

public FeatureMap getFeatures()
Get the feature set
Specified by:
getFeatures in interface FeatureBearer

setFeatures

public void setFeatures(FeatureMap features)
Set the feature set
Specified by:
setFeatures in interface FeatureBearer

equals

public boolean equals(Object other)
Two controller that contain the same modules are not equal. Two controllers are only equal if they are the same. equals() overriden to return "==".
Specified by:
equals in interface Collection
Overrides:
equals in class AbstractList