|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractController
gate.creole.SerialController
gate.creole.SerialAnalyserController
@CreoleResource(name="Corpus Pipeline",
comment="A serial controller for PR pipelines over corpora.",
helpURL="http://gate.ac.uk/userguide/sec:developer:apps")
public class SerialAnalyserController
This class implements a SerialController that only contains
LanguageAnalysers. It has a Corpus and its execute
method runs all the analysers in turn over each of the documents in the
corpus.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gate.creole.AbstractController |
|---|
AbstractController.InternalStatusListener, AbstractController.IntervalProgressListener |
| Field Summary | |
|---|---|
protected Corpus |
corpus
The corpus being processed by this controller. |
private static boolean |
DEBUG
Debug flag |
protected Document |
document
The document being processed. |
| Fields inherited from class gate.creole.SerialController |
|---|
log, prList, prof, prTimeMap, sListener, timeMap |
| Fields inherited from class gate.creole.AbstractController |
|---|
benchmarkFeatures, benchmarkID, interrupted, name |
| Fields inherited from class gate.creole.AbstractResource |
|---|
serialVersionUID |
| Fields inherited from class gate.util.AbstractFeatureBearer |
|---|
features |
| Constructor Summary | |
|---|---|
SerialAnalyserController()
|
|
| Method Summary | |
|---|---|
void |
add(int index,
ProcessingResource pr)
Overidden from SerialController to only allow
LanguageAnalysers as components. |
void |
add(ProcessingResource pr)
Overidden from SerialController to only allow
LanguageAnalysers 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.SerialController |
|---|
checkParameters, cleanup, datastoreClosed, datastoreCreated, datastoreOpened, duplicate, getPRs, getPrTimeMap, remove, remove, resetPrTimeMap, resourceLoaded, resourceRenamed, runComponent, set, setPRs |
| Methods inherited from class gate.creole.AbstractResource |
|---|
checkParameterValues, getBeanInfo, getParameterValue, getParameterValue, removeResourceListeners, 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 |
|---|
private static final boolean DEBUG
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 SerialAnalyserController()
| Method Detail |
|---|
public Document getDocument()
LanguageAnalyser
getDocument in interface LanguageAnalyser@Optional @RunTime @CreoleParameter public void setDocument(Document document)
LanguageAnalyser
setDocument in interface LanguageAnalyserdocument - the document to setpublic Corpus getCorpus()
CorpusControllerCorpus used by this
controller.
getCorpus in interface CorpusControllergetCorpus in interface LanguageAnalyserpublic void setCorpus(Corpus corpus)
CorpusControllerCorpus which contains the data on which
the controller is going to run.
setCorpus in interface CorpusControllersetCorpus in interface LanguageAnalyser
protected void executeImpl()
throws ExecutionException
executeImpl in class SerialControllerExecutionExceptionpublic void add(ProcessingResource pr)
SerialController to only allow
LanguageAnalysers as components.
add in class SerialController
public void add(int index,
ProcessingResource pr)
SerialController to only allow
LanguageAnalysers as components.
add in class SerialControllerprotected void checkLanguageAnalyser(ProcessingResource pr)
protected void setDocToPrs(Document doc)
public List getOffendingPocessingResources()
throws ResourceInstantiationException
getOffendingPocessingResources in class AbstractControllerList of ProcessingResources 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.
ResourceInstantiationExceptionpublic void resourceUnloaded(CreoleEvent e)
resourceUnloaded in interface CreoleListenerresourceUnloaded in class SerialController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||