|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gate.util.AbstractFeatureBearer gate.creole.AbstractResource gate.creole.AbstractController gate.creole.SerialController gate.creole.ConditionalSerialController gate.creole.ConditionalSerialAnalyserController
@CreoleResource(name="Conditional Corpus Pipeline", comment="A serial controller for conditionally run PR pipelines over corpora.", helpURL="http://gate.ac.uk/userguide/sec:developer:cond") public class ConditionalSerialAnalyserController
This class implements a SerialController that only contains
LanguageAnalyser
s.
It has a Corpus
and its execute method runs all the analysers in
turn over each of the documents in the corpus.
This is a copy of the SerialAnalyserController
, the only difference
being that it inherits from ConditionalSerialController
rather than
from SerialController
which makes it a conditional serial
analyser controller.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class gate.creole.AbstractController |
---|
AbstractController.InternalStatusListener, AbstractController.IntervalProgressListener |
Field Summary | |
---|---|
protected Corpus |
corpus
|
protected Document |
document
The document being processed. |
Fields inherited from class gate.creole.ConditionalSerialController |
---|
strategiesList |
Fields inherited from class gate.creole.SerialController |
---|
log, prList, prof, prTimeMap, sListener, timeMap |
Fields inherited from class gate.creole.AbstractController |
---|
benchmarkFeatures, benchmarkID, interrupted |
Fields inherited from class gate.creole.AbstractResource |
---|
name |
Fields inherited from class gate.util.AbstractFeatureBearer |
---|
features |
Constructor Summary | |
---|---|
ConditionalSerialAnalyserController()
|
Method Summary | |
---|---|
void |
add(int index,
ProcessingResource pr)
Overidden from SerialController to only allow
LanguageAnalyser s as components. |
void |
add(ProcessingResource pr)
Overidden from SerialController to only allow
LanguageAnalyser s as components. |
protected void |
checkLanguageAnalyser(ProcessingResource pr)
Throw an exception if the given processing resource is not a LanguageAnalyser. |
protected void |
executeImpl()
Run the Processing Resources in sequence. |
Corpus |
getCorpus()
Returns the Corpus used by this
controller. |
Document |
getDocument()
Get the document property for this analyser. |
List |
getOffendingPocessingResources()
Checks whether all the contained PRs have all the required runtime parameters set. |
void |
resourceUnloaded(CreoleEvent e)
Overridden to also clean up the corpus value. |
void |
setCorpus(Corpus corpus)
Sets the Corpus which contains the data on which
the controller is going to run. |
protected void |
setDocToPrs(Document doc)
Sets the current document to the memeber PRs |
void |
setDocument(Document document)
Set the document property for this analyser. |
Methods inherited from class gate.creole.ConditionalSerialController |
---|
cleanup, duplicate, getRunningStrategies, remove, remove, runComponent, setRunningStrategies, setRunningStrategy |
Methods inherited from class gate.creole.SerialController |
---|
checkParameters, datastoreClosed, datastoreCreated, datastoreOpened, getPRs, getPrTimeMap, resetPrTimeMap, resourceLoaded, resourceRenamed, set, setPRs |
Methods inherited from class gate.creole.AbstractResource |
---|
checkParameterValues, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class gate.util.AbstractFeatureBearer |
---|
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gate.Controller |
---|
execute, getPRs, setPRs |
Methods inherited from interface gate.ProcessingResource |
---|
reInit |
Methods inherited from interface gate.Resource |
---|
cleanup, getParameterValue, init, setParameterValue, setParameterValues |
Methods inherited from interface gate.Executable |
---|
interrupt, isInterrupted |
Field Detail |
---|
protected Corpus corpus
protected Document document
LanguageAnalyser
interface, so this value is only used when the controller is used as a
member of another controller.
Constructor Detail |
---|
public ConditionalSerialAnalyserController()
Method Detail |
---|
public Document getDocument()
LanguageAnalyser
getDocument
in interface LanguageAnalyser
@Optional @RunTime @CreoleParameter public void setDocument(Document document)
LanguageAnalyser
setDocument
in interface LanguageAnalyser
document
- the document to setpublic Corpus getCorpus()
CorpusController
Corpus
used by this
controller.
getCorpus
in interface CorpusController
getCorpus
in interface LanguageAnalyser
public void setCorpus(Corpus corpus)
CorpusController
Corpus
which contains the data on which
the controller is going to run.
setCorpus
in interface CorpusController
setCorpus
in interface LanguageAnalyser
protected void executeImpl() throws ExecutionException
executeImpl
in class SerialController
ExecutionException
public void add(ProcessingResource pr)
SerialController
to only allow
LanguageAnalyser
s as components.
add
in class ConditionalSerialController
pr
- the PR to be added.public void add(int index, ProcessingResource pr)
SerialController
to only allow
LanguageAnalyser
s as components.
add
in class ConditionalSerialController
index
- the position for the PRpr
- the PR to be set.protected void checkLanguageAnalyser(ProcessingResource pr)
protected void setDocToPrs(Document doc)
public List getOffendingPocessingResources() throws ResourceInstantiationException
getOffendingPocessingResources
in class AbstractController
List
of ProcessingResource
s that have required
parameters with null values if they exist null otherwise.
{@link
- ResourceInstantiationException} if problems occur while
inspecting the parameters for one of the resources. These will normally be
introspection problems and are usually caused by the lack of a parameter
or of the read accessor for a parameter.
ResourceInstantiationException
public void resourceUnloaded(CreoleEvent e)
resourceUnloaded
in interface CreoleListener
resourceUnloaded
in class SerialController
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |