at.ofai.gate.modularpipelines
Class Pipeline

java.lang.Object
  extended by gate.util.AbstractFeatureBearer
      extended by gate.creole.AbstractResource
          extended by gate.creole.AbstractProcessingResource
              extended by gate.creole.AbstractLanguageAnalyser
                  extended by at.ofai.gate.modularpipelines.Pipeline
All Implemented Interfaces:
gate.creole.ANNIEConstants, gate.Executable, gate.LanguageAnalyser, gate.ProcessingResource, gate.Resource, gate.util.FeatureBearer, gate.util.NameBearer, Serializable

@CreoleResource(name="Pipeline",
                comment="Represents a pipeline or corpus pipeline loaded from a xgapp/gapp file")
public class Pipeline
extends gate.creole.AbstractLanguageAnalyser
implements gate.ProcessingResource

A processing resource that wraps a controller loaded from a pipeline file. This makes it possible to create modular pipelines which contain sub-pipelines represented by this PR. The advantage over conventional nested pipelines is that pipelines wrapped by this PR always represent the newest version of the original pipeline file when they are loaded or re-initialized. Re-initializing this PR will recursively delete all resources loaded by the pipeline and reload a fresh copy of the pipeline from its pipeline file.

Author:
Johann Petrak
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gate.creole.AbstractProcessingResource
gate.creole.AbstractProcessingResource.InternalStatusListener, gate.creole.AbstractProcessingResource.IntervalProgressListener
 
Field Summary
protected  gate.Controller controller
           
protected  URL pipelineFileURL
           
 
Fields inherited from class gate.creole.AbstractLanguageAnalyser
corpus, document
 
Fields inherited from class gate.creole.AbstractProcessingResource
interrupted
 
Fields inherited from class gate.creole.AbstractResource
name
 
Fields inherited from class gate.util.AbstractFeatureBearer
features
 
Fields inherited from interface gate.creole.ANNIEConstants
ANNOTATION_COREF_FEATURE_NAME, DATE_ANNOTATION_TYPE, DATE_POSTED_ANNOTATION_TYPE, DEFAULT_FILE, DOCUMENT_COREF_FEATURE_NAME, JOB_ID_ANNOTATION_TYPE, LOCATION_ANNOTATION_TYPE, LOOKUP_ANNOTATION_TYPE, LOOKUP_CLASS_FEATURE_NAME, LOOKUP_INSTANCE_FEATURE_NAME, LOOKUP_LANGUAGE_FEATURE_NAME, LOOKUP_MAJOR_TYPE_FEATURE_NAME, LOOKUP_MINOR_TYPE_FEATURE_NAME, LOOKUP_ONTOLOGY_FEATURE_NAME, MONEY_ANNOTATION_TYPE, ORGANIZATION_ANNOTATION_TYPE, PERSON_ANNOTATION_TYPE, PERSON_GENDER_FEATURE_NAME, PLUGIN_DIR, PR_NAMES, SENTENCE_ANNOTATION_TYPE, SPACE_TOKEN_ANNOTATION_TYPE, TOKEN_ANNOTATION_TYPE, TOKEN_CATEGORY_FEATURE_NAME, TOKEN_KIND_FEATURE_NAME, TOKEN_LENGTH_FEATURE_NAME, TOKEN_ORTH_FEATURE_NAME, TOKEN_STRING_FEATURE_NAME
 
Constructor Summary
Pipeline()
           
 
Method Summary
 void cleanup()
           
 void execute()
           
 URL getPipelineFileURL()
           
 gate.Resource init()
           
protected  void initialise_pipeline()
           
 void reInit()
           
 void setPipelineFileURL(URL fileURL)
           
 
Methods inherited from class gate.creole.AbstractLanguageAnalyser
getCorpus, getDocument, setCorpus, setDocument
 
Methods inherited from class gate.creole.AbstractProcessingResource
addProgressListener, addStatusListener, fireProcessFinished, fireProgressChanged, fireStatusChanged, getRuntimeParameterValues, getRuntimeParameterValues, interrupt, isInterrupted, removeProgressListener, removeStatusListener
 
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.Resource
getParameterValue, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 
Methods inherited from interface gate.Executable
interrupt, isInterrupted
 

Field Detail

pipelineFileURL

protected URL pipelineFileURL

controller

protected gate.Controller controller
Constructor Detail

Pipeline

public Pipeline()
Method Detail

setPipelineFileURL

@CreoleParameter
public void setPipelineFileURL(URL fileURL)

getPipelineFileURL

public URL getPipelineFileURL()

init

public gate.Resource init()
                   throws gate.creole.ResourceInstantiationException
Specified by:
init in interface gate.Resource
Overrides:
init in class gate.creole.AbstractProcessingResource
Throws:
gate.creole.ResourceInstantiationException

reInit

public void reInit()
Specified by:
reInit in interface gate.ProcessingResource
Overrides:
reInit in class gate.creole.AbstractProcessingResource

execute

public void execute()
Specified by:
execute in interface gate.Executable
Overrides:
execute in class gate.creole.AbstractProcessingResource

cleanup

public void cleanup()
Specified by:
cleanup in interface gate.Resource
Overrides:
cleanup in class gate.creole.AbstractProcessingResource

initialise_pipeline

protected void initialise_pipeline()
                            throws gate.persist.PersistenceException,
                                   IOException,
                                   gate.creole.ResourceInstantiationException
Throws:
gate.persist.PersistenceException
IOException
gate.creole.ResourceInstantiationException