GATE
Version 3.1-2270

gate.jape
Class MultiPhaseTransducer

java.lang.Object
  extended by gate.jape.Transducer
      extended by gate.jape.MultiPhaseTransducer
All Implemented Interfaces:
JapeConstants, Serializable

public class MultiPhaseTransducer
extends Transducer
implements JapeConstants, Serializable

Represents a complete CPSL grammar, with a phase name, options and rule set (accessible by name and by sequence). Implements a transduce method taking a Document as input. Constructs from String or File.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gate.jape.Transducer
enableDebugging, interrupted, name, ontology
 
Fields inherited from interface gate.jape.JapeConstants
ALL_STYLE, APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, ONCE_STYLE, SINGLE_SPAN_BINDING
 
Constructor Summary
MultiPhaseTransducer()
          Anonymous construction
MultiPhaseTransducer(String name)
          Construction from name.
 
Method Summary
 void addPhase(String name, Transducer phase)
          Add phase.
 void cleanUp()
          Ask each phase to clean up (delete action class files, for e.g.).
 void finish()
          Finish: replace dynamic data structures with Java arrays; called after parsing.
 ArrayList getPhases()
           
 void interrupt()
          Notifies this PR that it should stop its execution as soon as possible.
 void orderPhases(String[] phaseNames)
          Change the phase order to the one specified in a list of names.
 void setEnableDebugging(boolean enableDebugging)
           
 void setName(String name)
          Set the name.
 void setOntology(Ontology ontology)
          Sets the ontology used by this transducer;
 void setPhases(ArrayList phases)
          Sets the phases
 String toString()
          Create a string representation of the object.
 String toString(String pad)
          Create a string representation of the object.
 void transduce(Document doc, AnnotationSet input, AnnotationSet output)
          Transduce the document by running each phase in turn.
 
Methods inherited from class gate.jape.Transducer
addProgressListener, addStatusListener, fireProcessFinished, fireProgressChanged, fireStatusChanged, getBaseURL, getName, getOntology, isDebugMode, isEnableDebugging, isInterrupted, isMatchGroupMode, removeProgressListener, removeStatusListener, setBaseURL, setDebugMode, setMatchGroupMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiPhaseTransducer

public MultiPhaseTransducer(String name)
Construction from name.


MultiPhaseTransducer

public MultiPhaseTransducer()
Anonymous construction

Method Detail

interrupt

public void interrupt()
Notifies this PR that it should stop its execution as soon as possible.

Overrides:
interrupt in class Transducer

setName

public void setName(String name)
Set the name.


setOntology

public void setOntology(Ontology ontology)
Sets the ontology used by this transducer;

Overrides:
setOntology in class Transducer
Parameters:
ontology - an Ontology value;

addPhase

public void addPhase(String name,
                     Transducer phase)
Add phase.


orderPhases

public void orderPhases(String[] phaseNames)
Change the phase order to the one specified in a list of names.


finish

public void finish()
Finish: replace dynamic data structures with Java arrays; called after parsing.

Specified by:
finish in class Transducer

transduce

public void transduce(Document doc,
                      AnnotationSet input,
                      AnnotationSet output)
               throws JapeException,
                      ExecutionException
Transduce the document by running each phase in turn.

Specified by:
transduce in class Transducer
Throws:
JapeException
ExecutionException

setEnableDebugging

public void setEnableDebugging(boolean enableDebugging)
Overrides:
setEnableDebugging in class Transducer

cleanUp

public void cleanUp()
Ask each phase to clean up (delete action class files, for e.g.).

Specified by:
cleanUp in class Transducer

toString

public String toString()
Create a string representation of the object.

Overrides:
toString in class Object

toString

public String toString(String pad)
Create a string representation of the object.

Specified by:
toString in class Transducer

getPhases

public ArrayList getPhases()

setPhases

public void setPhases(ArrayList phases)
Sets the phases

Parameters:
phases -

GATE
Version 3.1-2270