public abstract class AbstractPipelineStep extends OkapiComponent implements IPipelineStep
IPipelineStep interface.| Constructor and Description |
|---|
AbstractPipelineStep() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel processing on this pipeline.
|
void |
destroy()
Executes any cleanup code for this step.
|
String |
getHelpLocation()
Gets the relative directory location for the help of this step.
|
protected LocaleId |
getSourceLocale() |
protected LocaleId |
getTargetLocale() |
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. |
protected Event |
handleEndSubfilter(Event event)
Handles the
EventType.END_SUBFILTER 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 |
handleStartSubfilter(Event event)
Handles the
EventType.START_SUBFILTER 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 |
setSourceLocale(LocaleId sourceLocale) |
void |
setTargetLocale(LocaleId targetLocale) |
component_done, component_init, getParameters, getParameters, getParametersClassName, setParametersexec, getDescription, getName, setDescription, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getName, getParameters, setParametersprotected LocaleId getSourceLocale()
protected LocaleId getTargetLocale()
public void cancel()
IPipelineStepIPipelineStep is responsible
to implement a cancel method that will interrupt long running operationscancel in interface IPipelineSteppublic void destroy()
IPipelineStepdestroy in interface IPipelineSteppublic String getHelpLocation()
IPipelineStepgetHelpLocation in interface IPipelineSteppublic Event handleEvent(Event event)
IPipelineStephandleEvent in interface IPipelineStepevent - the event to process.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 boolean isLastOutputStep()
IPipelineStepisLastOutputStep in interface IPipelineSteppublic void setLastOutputStep(boolean isLastStep)
IPipelineStepsetLastOutputStep in interface IPipelineStepisLastStep - true if last step with output, false otherwise.protected Event handleStartBatch(Event event)
EventType.START_BATCH event.event - the event itself.protected Event handleEndBatch(Event event)
EventType.END_BATCH event.event - the event itself.protected Event handleStartBatchItem(Event event)
EventType.START_BATCH_ITEM event.event - the event itself.protected Event handleEndBatchItem(Event event)
EventType.END_BATCH_ITEM event.event - the event itself.protected Event handleRawDocument(Event event)
EventType.RAW_DOCUMENT event.event - the event itself.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.protected Event handleStartDocument(Event event)
EventType.START_DOCUMENT event.event - the event itself.public void setSourceLocale(LocaleId sourceLocale)
public void setTargetLocale(LocaleId targetLocale)
protected Event handleEndDocument(Event event)
EventType.END_DOCUMENT event.event - the event itself.protected Event handleStartSubDocument(Event event)
EventType.START_SUBDOCUMENT event.event - the event itself.protected Event handleEndSubDocument(Event event)
EventType.END_SUBDOCUMENT event.event - the event itself.protected Event handleStartGroup(Event event)
EventType.START_GROUP event.event - the event itself.protected Event handleEndGroup(Event event)
EventType.END_GROUP event.event - the event itself.protected Event handleStartSubfilter(Event event)
EventType.START_SUBFILTER event.event - the event itself.protected Event handleEndSubfilter(Event event)
EventType.END_SUBFILTER event.event - the event itself.protected Event handleTextUnit(Event event)
EventType.TEXT_UNIT event.event - the event itself.protected Event handleDocumentPart(Event event)
EventType.DOCUMENT_PART event.event - the event itself.protected Event handleCustom(Event event)
EventType.CUSTOM event.event - the event itself.Copyright © 2021. All rights reserved.