Class TuFilteringStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.common.tufiltering.TuFilteringStep
-
- All Implemented Interfaces:
IPipelineStep
public class TuFilteringStep extends BasePipelineStep
-
-
Constructor Summary
Constructors Constructor Description TuFilteringStep()TuFilteringStep(ITextUnitFilter tuFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()StringgetName()ParametersgetParameters()protected EventhandleStartBatch(Event event)protected EventhandleTextUnit(Event event)protected EventprocessFiltered(Event tuEvent)Process a given text unit event.voidsetParameters(IParameters params)-
Methods inherited from class net.sf.okapi.common.pipeline.BasePipelineStep
cancel, destroy, getHelpLocation, getSourceLocale, getTargetLocale, handleCustom, handleDocumentPart, handleEndBatch, handleEndBatchItem, handleEndDocument, handleEndGroup, handleEndSubDocument, handleEndSubfilter, handleEvent, handleMultiEvent, handlePipelineParameters, handleRawDocument, handleStartBatchItem, handleStartDocument, handleStartGroup, handleStartSubDocument, handleStartSubfilter, isDone, isLastOutputStep, setLastOutputStep, setSourceLocale, setTargetLocale
-
-
-
-
Constructor Detail
-
TuFilteringStep
public TuFilteringStep()
-
TuFilteringStep
public TuFilteringStep(ITextUnitFilter tuFilter)
-
-
Method Detail
-
getParameters
public Parameters getParameters()
- Specified by:
getParametersin interfaceIPipelineStep- Overrides:
getParametersin classBasePipelineStep
-
setParameters
public void setParameters(IParameters params)
- Specified by:
setParametersin interfaceIPipelineStep- Overrides:
setParametersin classBasePipelineStep
-
getName
public String getName()
-
getDescription
public String getDescription()
-
processFiltered
protected Event processFiltered(Event tuEvent)
Process a given text unit event. This method can modify the event's text unit resource, can drop the event and return NO_OP, can create and return a new event (for example, a DOCUMENT_PART event), or it can produce several events and return them packed in a MULTI_EVENT's resource.This method can be overridden in subclasses to change the way text unit events are processed if accepted.
If not overridden, clears the "translatable" flag of accepted text units, thus marking the text units non-translatable.
- Parameters:
tuEvent- the text unit event which resource can be modified.- Returns:
- the modified event
-
handleStartBatch
protected Event handleStartBatch(Event event)
- Overrides:
handleStartBatchin classBasePipelineStep
-
handleTextUnit
protected Event handleTextUnit(Event event)
- Overrides:
handleTextUnitin classBasePipelineStep
-
-