Class MSBatchTranslationStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.msbatchtranslation.MSBatchTranslationStep
-
- All Implemented Interfaces:
IPipelineStep
public class MSBatchTranslationStep extends BasePipelineStep
-
-
Constructor Summary
Constructors Constructor Description MSBatchTranslationStep()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventgenerateAltOutput(String outFilePath, String defaultEncoding, LocaleId sourceLocale, LocaleId targetLocale, String filterConfigId)Generates the alternative output used by several Trados StepsStringgetDescription()Gets a short localizable description of what this step does.StringgetName()Gets the localizable name of this step.ParametersgetParameters()Gets the current parameters for this step.EventhandleEvent(Event event)Processes each event sent though the pipeline.protected EventhandleStartBatch(Event event)Handles theEventType.START_BATCHevent.voidsetBatchInputCount(int batchInputCount)voidsetInputRootDirectory(String inputRootDir)voidsetParameters(IParameters params)Sets new parameters for this step.voidsetRootDirectory(String rootDir)voidsetSourceLocale(LocaleId sourceLocale)Delegate to concrete classvoidsetTargetLocale(LocaleId targetLocale)-
Methods inherited from class net.sf.okapi.common.pipeline.BasePipelineStep
cancel, destroy, getHelpLocation, getSourceLocale, getTargetLocale, handleCustom, handleDocumentPart, handleEndBatch, handleEndBatchItem, handleEndDocument, handleEndGroup, handleEndSubDocument, handleEndSubfilter, handleMultiEvent, handlePipelineParameters, handleRawDocument, handleStartBatchItem, handleStartDocument, handleStartGroup, handleStartSubDocument, handleStartSubfilter, handleTextUnit, isDone, isLastOutputStep, setLastOutputStep
-
-
-
-
Field Detail
-
DOMAINVAR
public static final String DOMAINVAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescription
public String getDescription()
Description copied from interface:IPipelineStepGets a short localizable description of what this step does.- Returns:
- the text of a short description of what this step does.
-
getName
public String getName()
Description copied from interface:IPipelineStepGets the localizable name of this step.- Returns:
- the localizable name of this step.
-
setSourceLocale
public void setSourceLocale(LocaleId sourceLocale)
Description copied from interface:IPipelineStepDelegate to concrete class- Specified by:
setSourceLocalein interfaceIPipelineStep- Overrides:
setSourceLocalein classBasePipelineStep
-
setTargetLocale
public void setTargetLocale(LocaleId targetLocale)
- Specified by:
setTargetLocalein interfaceIPipelineStep- Overrides:
setTargetLocalein classBasePipelineStep
-
setRootDirectory
public void setRootDirectory(String rootDir)
-
setInputRootDirectory
public void setInputRootDirectory(String inputRootDir)
-
setBatchInputCount
public void setBatchInputCount(int batchInputCount)
-
getParameters
public Parameters getParameters()
Description copied from interface:IPipelineStepGets the current parameters for this step.- Specified by:
getParametersin interfaceIPipelineStep- Overrides:
getParametersin classBasePipelineStep- Returns:
- the current parameters for this step or null if there are no parameters.
-
setParameters
public void setParameters(IParameters params)
Description copied from interface:IPipelineStepSets new parameters for this step.- Specified by:
setParametersin interfaceIPipelineStep- Overrides:
setParametersin classBasePipelineStep- Parameters:
params- the new parameters to use.
-
handleStartBatch
protected Event handleStartBatch(Event event)
Description copied from class:BasePipelineStepHandles theEventType.START_BATCHevent.- Overrides:
handleStartBatchin classBasePipelineStep- Parameters:
event- event to handle.- Returns:
- the event returned.
-
handleEvent
public Event handleEvent(Event event)
Description copied from interface:IPipelineStepProcesses each event sent though the pipeline.- Specified by:
handleEventin interfaceIPipelineStep- Overrides:
handleEventin classBasePipelineStep- Parameters:
event- the event to process.- Returns:
- the event to pass down the pipeline.
-
generateAltOutput
public static Event generateAltOutput(String outFilePath, String defaultEncoding, LocaleId sourceLocale, LocaleId targetLocale, String filterConfigId)
Generates the alternative output used by several Trados Steps- Parameters:
outFilePath- path of the new input file.defaultEncoding- default encoding of the new file.sourceLocale- source locale.targetLocale- target locale.filterConfigId- filter configuration id of the new file.- Returns:
- the event created.
-
-