|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.util.AbstractFeatureBearer | +--gate.creole.AbstractResource | +--gate.creole.AbstractProcessingResource | +--gate.creole.Transducer
A cascaded multi-phase transducer using the Jape language which is a variant of the CPSL language.
Field Summary | |
private Batch |
batch
The actual JapeTransducer used for processing the document(s). |
private Document |
document
The Document curently set as target for this transducer. |
private String |
encoding
The encoding used for reding the grammar file(s). |
private URL |
grammarURL
The URL to the jape file used as grammar by this transducer. |
private String |
inputASName
The AnnotationSet used as input for the transducer. |
private String |
outputASName
The AnnotationSet used as output by the transducer. |
private Vector |
progressListeners
|
private StatusListener |
sListener
|
private Vector |
statusListeners
|
Fields inherited from class gate.creole.AbstractProcessingResource |
executionException |
Fields inherited from class gate.creole.AbstractResource |
serialVersionUID |
Fields inherited from class gate.util.AbstractFeatureBearer |
features |
Constructor Summary | |
Transducer()
Default constructor. |
Method Summary | |
void |
addProgressListener(ProgressListener l)
|
void |
addStatusListener(StatusListener l)
|
protected void |
fireProcessFinished()
|
protected void |
fireProgressChanged(int e)
|
protected void |
fireStatusChanged(String e)
If the transducer uses the Appelt match style then this option will be used to decide whether the longest match or the shortest will be used. |
Document |
getDocument()
Gets the document currently set as target for this transducer. |
String |
getEncoding()
Gets the encoding used for reding the grammar file(s). |
URL |
getGrammarURL()
Gets the URL to the grammar used to build this transducer. |
String |
getInputASName()
Gets the AnnotationSet used as input by this transducer. |
String |
getOutputASName()
Gets the AnnotationSet used as output by this transducer. |
Resource |
init()
This method is the one responsible for initialising the transducer. |
void |
removeProgressListener(ProgressListener l)
|
void |
removeStatusListener(StatusListener l)
|
void |
run()
Implementation of the run() method from Runnable . |
void |
setDocument(Document newDocument)
Sets the document to be processed through this transducer. |
void |
setEncoding(String newEncoding)
Sets the encoding to be used for reding the input file(s) forming the Jape grammar. |
void |
setGrammarURL(URL newGrammarURL)
Sets the grammar to be used for building this transducer. |
void |
setInputASName(String newInputASName)
Sets the AnnotationSet to be used as input for the transducer. |
void |
setOutputASName(String newOutputASName)
Sets the AnnotationSet to be used as output by the transducer. |
Methods inherited from class gate.creole.AbstractProcessingResource |
check, reInit |
Methods inherited from class gate.creole.AbstractResource |
getName, setName |
Methods inherited from class gate.util.AbstractFeatureBearer |
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface gate.util.FeatureBearer |
getFeatures, getName, setFeatures, setName |
Field Detail |
private URL grammarURL
private Document document
Document
curently set as target for this transducer.private Batch batch
private String encoding
private String inputASName
AnnotationSet
used as input for the transducer.private String outputASName
AnnotationSet
used as output by the transducer.private transient StatusListener sListener
private transient Vector statusListeners
private transient Vector progressListeners
Constructor Detail |
public Transducer()
init()
method.Method Detail |
public Resource init() throws ResourceInstantiationException
init
in class AbstractProcessingResource
public void run()
Runnable
.
This method is responsible for doing all the processing of the input
document.run
in class AbstractProcessingResource
public void setGrammarURL(URL newGrammarURL)
newGrammarURL
- an URL to a file containing a Jape grammar.public URL getGrammarURL()
URL
pointing to the grammar file.public void setDocument(Document newDocument)
a
- Document
to be processed.public Document getDocument()
Document
public void setEncoding(String newEncoding)
newEncoding
- a {link String} representing the encoding.public String getEncoding()
public void setInputASName(String newInputASName)
AnnotationSet
to be used as input for the transducer.newInputAS
- a AnnotationSet
public String getInputASName()
AnnotationSet
used as input by this transducer.AnnotationSet
public void setOutputASName(String newOutputASName)
AnnotationSet
to be used as output by the transducer.newOutputAS
- a AnnotationSet
public String getOutputASName()
AnnotationSet
used as output by this transducer.AnnotationSet
public void removeStatusListener(StatusListener l)
public void addStatusListener(StatusListener l)
protected void fireStatusChanged(String e)
public void removeProgressListener(ProgressListener l)
public void addProgressListener(ProgressListener l)
protected void fireProgressChanged(int e)
protected void fireProcessFinished()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |