@CreoleResource(name="Conditional Pipeline", comment="A simple serial controller for conditionally run PRs.", helpURL="http://gate.ac.uk/userguide/sec:developer:cond") public class ConditionalSerialController extends SerialController implements ConditionalController
AnalyserRunningStrategy objects as running
strategies and they only work with LanguageAnalysers so the PRs that
are not analysers will get a default "run always" strategy.AbstractController.InternalStatusListener, AbstractController.IntervalProgressListener| Modifier and Type | Field and Description |
|---|---|
protected List<RunningStrategy> |
strategiesList
The list of running strategies for the member PRs.
|
log, prList, prof, prTimeMap, sListener, timeMapbenchmarkFeatures, benchmarkID, controllerCallbacksEnabled, interruptednamefeatures| Constructor and Description |
|---|
ConditionalSerialController() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
ProcessingResource pr)
Set a PR at a specified location.
|
void |
add(ProcessingResource pr)
Add a PR to the end of the execution list.
|
void |
cleanup()
Cleans the internal data and prepares this object to be collected
|
Resource |
duplicate(Factory.DuplicationContext ctx)
Custom duplication method for conditional controllers to handle
duplicating the running strategies.
|
List<RunningStrategy> |
getRunningStrategies()
Gets the collection of running strategies for the contained PRs.
|
ProcessingResource |
remove(int index) |
boolean |
remove(ProcessingResource pr) |
protected void |
runComponent(int componentIndex)
Executes a
ProcessingResource. |
void |
setRunningStrategies(Collection<RunningStrategy> strategies)
Populates this controller with the appropiate running strategies from a
collection of running strategies
(optional operation).
|
void |
setRunningStrategy(int index,
AnalyserRunningStrategy strategy) |
checkParameters, datastoreClosed, datastoreCreated, datastoreOpened, executeImpl, getPRs, getPrTimeMap, resetPrTimeMap, resourceLoaded, resourceRenamed, resourceUnloaded, set, setPRsaddControllerListener, addProgressListener, addStatusListener, execute, fireProcessFinished, fireProgressChanged, fireResourceAdded, fireResourceRemoved, fireStatusChanged, getBenchmarkId, getControllerAwarePRs, getOffendingPocessingResources, init, interrupt, invokeControllerExecutionAborted, invokeControllerExecutionFinished, invokeControllerExecutionStarted, isInterrupted, reInit, removeControllerListener, removeProgressListener, removeStatusListener, setBenchmarkId, setControllerCallbacksEnabledcheckParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toStringgetFeatures, setFeaturesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexecute, getPRs, setPRsgetParameterValue, init, setParameterValue, setParameterValuesgetFeatures, setFeaturesgetName, setNameinterrupt, isInterruptedprotected List<RunningStrategy> strategiesList
public List<RunningStrategy> getRunningStrategies()
ConditionalControllerController.getRunningStrategies in interface ConditionalControllerpublic void add(int index,
ProcessingResource pr)
add in class SerialControllerindex - the position for the PRpr - the PR to be set.public void add(ProcessingResource pr)
add in class SerialControllerpr - the PR to be added.public ProcessingResource remove(int index)
remove in class SerialControllerpublic boolean remove(ProcessingResource pr)
remove in class SerialControllerpublic void setRunningStrategy(int index,
AnalyserRunningStrategy strategy)
public void setRunningStrategies(Collection<RunningStrategy> strategies)
setRunningStrategies in interface ConditionalControllerUnsupportedOperationException - if the setPRs method
is not supported by this controller.protected void runComponent(int componentIndex)
throws ExecutionException
ProcessingResource.runComponent in class SerialControllerExecutionExceptionpublic void cleanup()
cleanup in interface Resourcecleanup in class SerialControllerpublic Resource duplicate(Factory.DuplicationContext ctx) throws ResourceInstantiationException
duplicate in interface CustomDuplicationduplicate in class SerialControllerctx - the current duplication context.
If an implementation of this method needs to duplicate any
other resources as part of the custom duplication process
it should pass this context back to the two-argument form of
Factory.duplicate
rather than using the single-argument form.ResourceInstantiationExceptionCopyright © 2024 GATE. All rights reserved.