Package net.sf.okapi.steps.xliffsplitter
Class XliffSplitterStep
- java.lang.Object
-
- net.sf.okapi.common.pipeline.BasePipelineStep
-
- net.sf.okapi.steps.xliffsplitter.XliffSplitterStep
-
- All Implemented Interfaces:
IPipelineStep
public class XliffSplitterStep extends BasePipelineStep
Splits a single XLIFF file into multiple files, split on the file element. All other content (outside the file element) is copied as-is to each split file. Expects aRawDocumentas input and sends theRawDocumentEventunaltered. Will output multiple split XLIFF files in the set output path. An XLIFF file with only one file element is written out unaltered.- Author:
- Greg Perkins, HargraveJE
-
-
Constructor Summary
Constructors Constructor Description XliffSplitterStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()Gets a short localizable description of what this step does.StringgetName()Gets the localizable name of this step.URIgetOutputURI()XliffSplitterParametersgetParameters()Gets the current parameters for this step.protected EventhandleRawDocument(Event event)Handles theEventType.RAW_DOCUMENTevent.protected EventhandleStartBatch(Event event)Handles theEventType.START_BATCHevent.protected EventhandleStartBatchItem(Event event)Handles theEventType.START_BATCH_ITEMevent.booleanisDone()Steps that can generateEvents such asIFilters return false until no more events can be created.voidsetOutputURI(URI outputURI)voidsetParameters(IParameters params)Sets new parameters for this step.-
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, handleStartDocument, handleStartGroup, handleStartSubDocument, handleStartSubfilter, handleTextUnit, isLastOutputStep, setLastOutputStep, setSourceLocale, setTargetLocale
-
-
-
-
Method Detail
-
setOutputURI
public void setOutputURI(URI outputURI)
-
getOutputURI
public URI getOutputURI()
-
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.
-
getParameters
public XliffSplitterParameters 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.
-
handleStartBatchItem
protected Event handleStartBatchItem(Event event)
Description copied from class:BasePipelineStepHandles theEventType.START_BATCH_ITEMevent.- Overrides:
handleStartBatchItemin classBasePipelineStep- Parameters:
event- event to handle.- Returns:
- the event returned.
-
isDone
public boolean isDone()
Description copied from interface:IPipelineStepSteps that can generateEvents such asIFilters return false until no more events can be created. Steps which do not createEvents always return true.- Specified by:
isDonein interfaceIPipelineStep- Overrides:
isDonein classBasePipelineStep- Returns:
- false if can generate more events, true otherwise.
-
handleRawDocument
protected Event handleRawDocument(Event event)
Description copied from class:BasePipelineStepHandles theEventType.RAW_DOCUMENTevent.- Overrides:
handleRawDocumentin classBasePipelineStep- Parameters:
event- event to handle.- Returns:
- the event returned.
-
-