|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.okapi.common.pipeline.BasePipelineStep
public abstract class BasePipelineStep
Abstract implementation of the IPipelineStep interface.
| Constructor Summary | |
|---|---|
BasePipelineStep()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancel processing on this pipeline. |
void |
destroy()
Executes any cleanup code for this step. |
java.lang.String |
getHelpLocation()
Gets the relative directory location for the help of this step. |
IParameters |
getParameters()
Gets the current parameters for this step. |
protected Event |
handleCustom(Event event)
Handles the EventType.CUSTOM event. |
protected Event |
handleDocumentPart(Event event)
Handles the EventType.DOCUMENT_PART event. |
protected Event |
handleEndBatch(Event event)
Handles the EventType.END_BATCH event. |
protected Event |
handleEndBatchItem(Event event)
Handles the EventType.END_BATCH_ITEM event. |
protected Event |
handleEndDocument(Event event)
Handles the EventType.END_DOCUMENT event. |
protected Event |
handleEndGroup(Event event)
Handles the EventType.END_GROUP event. |
protected Event |
handleEndSubDocument(Event event)
Handles the EventType.END_SUBDOCUMENT event. |
Event |
handleEvent(Event event)
Processes each event sent though the pipeline. |
protected Event |
handleMultiEvent(Event event)
Handles the EventType.MULTI_EVENT event. |
protected Event |
handlePipelineParameters(Event event)
Handles the EventType.PIPELINE_PARAMETERS event. |
protected Event |
handleRawDocument(Event event)
Handles the EventType.RAW_DOCUMENT event. |
protected Event |
handleStartBatch(Event event)
Handles the EventType.START_BATCH event. |
protected Event |
handleStartBatchItem(Event event)
Handles the EventType.START_BATCH_ITEM event. |
protected Event |
handleStartDocument(Event event)
Handles the EventType.START_DOCUMENT event. |
protected Event |
handleStartGroup(Event event)
Handles the EventType.START_GROUP event. |
protected Event |
handleStartSubDocument(Event event)
Handles the EventType.START_SUBDOCUMENT event. |
protected Event |
handleTextUnit(Event event)
Handles the EventType.TEXT_UNIT event. |
boolean |
isDone()
Steps that can generate Events such as IFilters return
false until no more events can be created. |
boolean |
isLastOutputStep()
Is this step the last step with output in the pipeline? |
void |
setLastOutputStep(boolean isLastStep)
Tell the step if it is the last one on the pipeline with output. |
void |
setParameters(IParameters params)
Sets new parameters for this step. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.okapi.common.pipeline.IPipelineStep |
|---|
getDescription, getName |
| Constructor Detail |
|---|
public BasePipelineStep()
| Method Detail |
|---|
public IParameters getParameters()
IPipelineStep
getParameters in interface IPipelineSteppublic void setParameters(IParameters params)
IPipelineStep
setParameters in interface IPipelineStepparams - the new parameters to use.public boolean isDone()
IPipelineStepEvents such as IFilters return
false until no more events can be created.
Steps which do not create Events always return true.
isDone in interface IPipelineSteppublic java.lang.String getHelpLocation()
IPipelineStep
getHelpLocation in interface IPipelineSteppublic Event handleEvent(Event event)
IPipelineStep
handleEvent in interface IPipelineStepevent - the event to process.
public void cancel()
IPipelineStepIPipelineStep is responsible
to implement a cancel method that will interrupt long running operations
cancel in interface IPipelineSteppublic void destroy()
IPipelineStep
destroy in interface IPipelineSteppublic boolean isLastOutputStep()
IPipelineStep
isLastOutputStep in interface IPipelineSteppublic void setLastOutputStep(boolean isLastStep)
IPipelineStep
setLastOutputStep in interface IPipelineStepisLastStep - true if last step with output, false otherwise.protected Event handleStartBatch(Event event)
EventType.START_BATCH event.
event - event to handle.
protected Event handleEndBatch(Event event)
EventType.END_BATCH event.
event - event to handle.
protected Event handleStartBatchItem(Event event)
EventType.START_BATCH_ITEM event.
event - event to handle.
protected Event handleEndBatchItem(Event event)
EventType.END_BATCH_ITEM event.
event - event to handle.
protected Event handleRawDocument(Event event)
EventType.RAW_DOCUMENT event.
event - event to handle.
protected Event handleStartDocument(Event event)
EventType.START_DOCUMENT event.
event - event to handle.
protected Event handleEndDocument(Event event)
EventType.END_DOCUMENT event.
event - event to handle.
protected Event handleStartSubDocument(Event event)
EventType.START_SUBDOCUMENT event.
event - event to handle.
protected Event handleEndSubDocument(Event event)
EventType.END_SUBDOCUMENT event.
event - event to handle.
protected Event handleStartGroup(Event event)
EventType.START_GROUP event.
event - event to handle.
protected Event handleEndGroup(Event event)
EventType.END_GROUP event.
event - event to handle.
protected Event handleTextUnit(Event event)
EventType.TEXT_UNIT event.
event - event to handle.
protected Event handleDocumentPart(Event event)
EventType.DOCUMENT_PART event.
event - event to handle.
protected Event handleCustom(Event event)
EventType.CUSTOM event.
event - event to handle.
protected Event handleMultiEvent(Event event)
EventType.MULTI_EVENT event.
event - event to handle.
protected Event handlePipelineParameters(Event event)
EventType.PIPELINE_PARAMETERS event.
This method relies on the configuration parameters set in each step to set the corresponding values.
event - event to handle.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||