Package net.sf.okapi.steps.common
Class RawDocumentToFilterEventsStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.common.RawDocumentToFilterEventsStep
-
- All Implemented Interfaces:
IPipelineStep
public class RawDocumentToFilterEventsStep extends BasePipelineStep
Converts aRawDocumentinto filter events.This class implements the
IPipelineStepinterface for a step that takes aRawDocumentand to generate its corresponding events either: a providedIFilterimplementation, or the filter configuration mapper accessible through the pipeline's context.This step can also work with the filters that generates multiple documents.
-
-
Constructor Summary
Constructors Constructor Description RawDocumentToFilterEventsStep()Creates a new RawDocumentToFilterEventsStep object.RawDocumentToFilterEventsStep(IFilter filter)Creates a new RawDocumentToFilterEventsStep object with a given filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()voiddestroy()StringgetDescription()StringgetName()EventhandleEvent(Event event)booleanisDone()voidsetFilter(IFilter filter)voidsetFilterConfigurationId(String filterConfigId)voidsetFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)-
Methods inherited from class net.sf.okapi.common.pipeline.BasePipelineStep
getHelpLocation, getParameters, getSourceLocale, getTargetLocale, handleCustom, handleDocumentPart, handleEndBatch, handleEndBatchItem, handleEndDocument, handleEndGroup, handleEndSubDocument, handleEndSubfilter, handleMultiEvent, handlePipelineParameters, handleRawDocument, handleStartBatch, handleStartBatchItem, handleStartDocument, handleStartGroup, handleStartSubDocument, handleStartSubfilter, handleTextUnit, isLastOutputStep, setLastOutputStep, setParameters, setSourceLocale, setTargetLocale
-
-
-
-
Constructor Detail
-
RawDocumentToFilterEventsStep
public RawDocumentToFilterEventsStep()
Creates a new RawDocumentToFilterEventsStep object. This constructor is needed to be able to instantiate an object from newInstance()
-
RawDocumentToFilterEventsStep
public RawDocumentToFilterEventsStep(IFilter filter)
Creates a new RawDocumentToFilterEventsStep object with a given filter. Use this constructor to create an object that is using a filter set using the one provided here, or usingsetFilter(IFilter), not using the filter configuration mapper of the pipeline context.- Parameters:
filter- the filter to set.
-
-
Method Detail
-
setFilter
public void setFilter(IFilter filter)
-
setFilterConfigurationMapper
public void setFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)
-
setFilterConfigurationId
public void setFilterConfigurationId(String filterConfigId)
-
getName
public String getName()
-
getDescription
public String getDescription()
-
handleEvent
public Event handleEvent(Event event)
- Specified by:
handleEventin interfaceIPipelineStep- Overrides:
handleEventin classBasePipelineStep
-
isDone
public boolean isDone()
- Specified by:
isDonein interfaceIPipelineStep- Overrides:
isDonein classBasePipelineStep
-
destroy
public void destroy()
- Specified by:
destroyin interfaceIPipelineStep- Overrides:
destroyin classBasePipelineStep
-
cancel
public void cancel()
- Specified by:
cancelin interfaceIPipelineStep- Overrides:
cancelin classBasePipelineStep
-
-