|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.okapi.common.pipeline.Pipeline
public class Pipeline
Default implementations of the IPipeline interface.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_ID
|
| Constructor Summary | |
|---|---|
Pipeline()
Creates a new Pipeline object. |
|
| Method Summary | |
|---|---|
void |
addObserver(IObserver observer)
Attaches a observer to the Observable. |
void |
addStep(IPipelineStep step)
Adds a step to this pipeline. |
void |
cancel()
Cancels processing on this pipeline. |
void |
clearSteps()
Remove all the IPipelineSteps from the pipeline. |
int |
countObservers()
Counts how many Observers were attached to this class. |
void |
deleteObserver(IObserver observer)
Detaches a previously attached observer to the observable. |
void |
deleteObservers()
Detaches all previously attached observer to the observable. |
void |
destroy()
Frees all resources from all steps in this pipeline. |
void |
endBatch()
Finishes a batch of inputs. |
java.lang.String |
getId()
Get the Pipelines identifier. |
java.util.List<IObserver> |
getObservers()
Returns list of observers registered with the Observable. |
PipelineReturnValue |
getState()
Gets the current pipeline state. |
java.util.List<IPipelineStep> |
getSteps()
Gets the list of all steps in this pipeline. |
void |
notifyObservers()
Notifies all attached observers about changes in the observable. |
void |
notifyObservers(java.lang.Object arg)
Notifies all attached observers about changes in the observable. |
void |
process(Event input)
Starts IPipeline processing with a Event as input. |
void |
process(RawDocument input)
Starts IPipeline processing with a RawDocument as input. |
void |
setId(java.lang.String id)
Set the pipelines identifier. |
void |
startBatch()
Starts a batch of inputs. |
void |
update(IObservable o,
java.lang.Object arg)
This method is called whenever the observed object is changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_ID
| Constructor Detail |
|---|
public Pipeline()
| Method Detail |
|---|
public void startBatch()
IPipeline
startBatch in interface IPipelinepublic void endBatch()
IPipeline
endBatch in interface IPipelinepublic void addStep(IPipelineStep step)
IPipeline
addStep in interface IPipelinestep - the step to add.public java.util.List<IPipelineStep> getSteps()
IPipeline
getSteps in interface IPipelinepublic void cancel()
IPipeline
cancel in interface IPipelinepublic PipelineReturnValue getState()
IPipeline
getState in interface IPipelinepublic void process(RawDocument input)
IPipelineIPipeline processing with a RawDocument as input. This is a convenience method that calls
IPipeline.process(Event).
process in interface IPipelineinput - the RawDocument to process.public void process(Event input)
IPipelineIPipeline processing with a Event as input.
process in interface IPipelineinput - event that primes the IPipelinepublic void destroy()
IPipeline
destroy in interface IPipelinepublic void clearSteps()
IPipelineIPipelineSteps from the pipeline. Also calls the destroy() method on each step.
clearSteps in interface IPipelinepublic java.lang.String getId()
IPipeline
getId in interface IPipelinepublic void setId(java.lang.String id)
IPipeline
setId in interface IPipeline
public void update(IObservable o,
java.lang.Object arg)
IObserver
update in interface IObserverpublic void addObserver(IObserver observer)
IObservable
addObserver in interface IObservableobserver - The observer to attach to the observablepublic int countObservers()
IObservable
countObservers in interface IObservableIObserverpublic void deleteObserver(IObserver observer)
IObservable
deleteObserver in interface IObservableobserver - The observer to detach from the observablepublic void notifyObservers()
IObservable
notifyObservers in interface IObservablepublic void notifyObservers(java.lang.Object arg)
IObservable
notifyObservers in interface IObservablearg - an arbitrary Object to be passed to the Observerpublic void deleteObservers()
IObservable
deleteObservers in interface IObservablepublic java.util.List<IObserver> getObservers()
IObservable
getObservers in interface IObservable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||