Package net.sf.okapi.common.pipeline
Interface IPipelineStep
-
- All Known Subinterfaces:
ICallableStep<T>,IWorkQueueStep<T>
- All Known Implementing Classes:
AbstractCompoundStep,AltAnnotationBasedCountStep,BaseCountStep,BasePipelineStep,BatchTmLeveragingStep,BatchTranslationStep,BOMConversionStep,CharacterCountStep,CharactersCheckerStep,CharListingStep,CleanupStep,CodeSimplifierStep,CodesRemovalStep,ConcordanceCharacterCountStep,ConcordanceWordCountStep,ConvertSegmentsToTextUnitsStep,CopyOrMoveStep,CopySourceOnEmptyTargetStep,CreateTargetStep,DesegmentationStep,DiffLeverageStep,EncodingConversionStep,EnrycherStep,ExactDocumentContextMatchCharacterCountStep,ExactDocumentContextMatchWordCountStep,ExactLocalContextMatchCharacterCountStep,ExactLocalContextMatchWordCountStep,ExactMatchCharacterCountStep,ExactMatchWordCountStep,ExactPreviousVersionMatchCharacterCountStep,ExactPreviousVersionMatchWordCountStep,ExactRepairedCharacterCountStep,ExactRepairedWordCountStep,ExactStructuralMatchCharacterCountStep,ExactStructuralMatchWordCountStep,ExactTextOnlyCharacterCountStep,ExactTextOnlyPreviousVersionMatchCharacterCountStep,ExactTextOnlyPreviousVersionMatchWordCountStep,ExactTextOnlyUniqueIdMatchCharacterCountStep,ExactTextOnlyUniqueIdMatchWordCountStep,ExactTextOnlyWordCountStep,ExactUniqueIdMatchCharacterCountStep,ExactUniqueIdMatchWordCountStep,ExternalCommandStep,ExtractionStep,ExtractionStep,ExtractionVerificationStep,FilterEventsToRawDocumentStep,FilterEventsWriterStep,FormatConversionStep,FullWidthConversionStep,FuzzyMatchCharacterCountStep,FuzzyMatchWordCountStep,FuzzyPreviousVersionMatchCharacterCountStep,FuzzyPreviousVersionMatchWordCountStep,FuzzyRepairedCharacterCountStep,FuzzyRepairedWordCountStep,FuzzyUniqueIdMatchCharacterCountStep,FuzzyUniqueIdMatchWordCountStep,GeneralCheckerStep,GMXAlphanumericOnlyTextUnitCharacterCountStep,GMXAlphanumericOnlyTextUnitWordCountStep,GMXExactMatchedCharacterCountStep,GMXExactMatchedWordCountStep,GMXFuzzyMatchCharacterCountStep,GMXFuzzyMatchWordCountStep,GMXLeveragedMatchedCharacterCountStep,GMXLeveragedMatchedWordCountStep,GMXMeasurementOnlyTextUnitCharacterCountStep,GMXMeasurementOnlyTextUnitWordCountStep,GMXNumericOnlyTextUnitCharacterCountStep,GMXNumericOnlyTextUnitWordCountStep,GMXProtectedCharacterCountStep,GMXProtectedWordCountStep,GMXRepetitionMatchedCharacterCountStep,GMXRepetitionMatchedWordCountStep,IdBasedAlignerStep,IdBasedCopyStep,ImageModificationStep,InconsistencyCheckStep,InlineCodesCheckerStep,LengthCheckerStep,LeveragingStep,LineBreakConversionStep,LocalizableCheckerStep,MergingStep,MergingStep,MSBatchTranslationStep,MTCharacterCountStep,MTWordCountStep,OriginalDocumentTextUnitFlatMergerStep,OriginalDocumentXliffMergerStep,ParagraphAlignerStep,PatternsCheckerStep,PhraseAssembledCharacterCountStep,PhraseAssembledWordCountStep,PostSegmentationCodeSimplifierStep,QualityCheckStep,RawDocumentToFilterEventsStep,RawDocumentToOutputStreamStep,RawDocumentWriterStep,RemoveTargetStep,RepetitionAnalysisStep,ResourceSimplifierStep,RTFConversionStep,ScopingReportStep,SearchAndReplaceStep,SegmentationStep,SentenceAlignerStep,SimpleWordCountStep,SpaceCheckStep,TermExtractionStep,TerminologyLeveragingStep,TextModificationStep,TMImportStep,TokenCharacterCountStep,TokenCountStep,TokenizationStep,TranslationComparisonStep,TTXJoinerStep,TTXSplitterStep,TuFilteringStep,UriConversionStep,WhitespaceCorrectionStep,WordCountStep,XliffJoinerStep,XliffSplitterStep,XliffWCSplitterStep,XMLAnalysisStep,XMLCharFixingStep,XMLValidationStep,XPipeline,XPipelineAsStepImpl,XPipelineStep,XSLTransformStep
public interface IPipelineStepCommon set of methods for a step within aIPipelinepipeline.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcancel()Cancel processing on this pipeline.voiddestroy()Executes any cleanup code for this step.StringgetDescription()Gets a short localizable description of what this step does.StringgetHelpLocation()Gets the relative directory location for the help of this step.StringgetName()Gets the localizable name of this step.IParametersgetParameters()Gets the current parameters for this step.default LocaleIdgetSourceLocale()Delegate to concrete classdefault LocaleIdgetTargetLocale()Delegate to concrete classEventhandleEvent(Event event)Processes each event sent though the pipeline.booleanisDone()Steps that can generateEvents such asIFilters return false until no more events can be created.booleanisLastOutputStep()Is this step the last step with output in the pipeline?voidsetLastOutputStep(boolean isLastStep)Tell the step if it is the last one on the pipeline with output.voidsetParameters(IParameters params)Sets new parameters for this step.default voidsetSourceLocale(LocaleId sourceLocale)Delegate to concrete classdefault voidsetTargetLocale(LocaleId targetLocale)
-
-
-
Method Detail
-
getParameters
IParameters getParameters()
Gets the current parameters for this step.- Returns:
- the current parameters for this step or null if there are no parameters.
-
setParameters
void setParameters(IParameters params)
Sets new parameters for this step.- Parameters:
params- the new parameters to use.
-
getName
String getName()
Gets the localizable name of this step.- Returns:
- the localizable name of this step.
-
getDescription
String getDescription()
Gets a short localizable description of what this step does.- Returns:
- the text of a short description of what this step does.
-
getHelpLocation
String getHelpLocation()
Gets the relative directory location for the help of this step. The main help file for the step must be at that location and its name must be the name of the class implementing the step in lowercase with a .html extension.- Returns:
- the relative directory location for the help of this step.
-
handleEvent
Event handleEvent(Event event)
Processes each event sent though the pipeline.- Parameters:
event- the event to process.- Returns:
- the event to pass down the pipeline.
-
isDone
boolean isDone()
Steps that can generateEvents such asIFilters return false until no more events can be created. Steps which do not createEvents always return true.- Returns:
- false if can generate more events, true otherwise.
-
destroy
void destroy()
Executes any cleanup code for this step. Called once at the end of the pipeline lifecycle.
-
cancel
void cancel()
Cancel processing on this pipeline. EachIPipelineStepis responsible to implement a cancel method that will interrupt long running operations
-
isLastOutputStep
boolean isLastOutputStep()
Is this step the last step with output in the pipeline?- Returns:
- true if last step with output, false otherwise.
-
setLastOutputStep
void setLastOutputStep(boolean isLastStep)
Tell the step if it is the last one on the pipeline with output.- Parameters:
isLastStep- true if last step with output, false otherwise.
-
getSourceLocale
default LocaleId getSourceLocale()
Delegate to concrete class- Returns:
- LocaleId
-
setSourceLocale
default void setSourceLocale(LocaleId sourceLocale)
Delegate to concrete class- Parameters:
sourceLocale-
-
getTargetLocale
default LocaleId getTargetLocale()
Delegate to concrete class- Returns:
- LocaleId
-
setTargetLocale
default void setTargetLocale(LocaleId targetLocale)
-
-