public abstract class BaseCountStep extends BasePipelineStep
| Constructor and Description |
|---|
BaseCountStep() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract long |
count(Segment segment,
LocaleId locale) |
protected abstract long |
count(TextContainer textContainer,
LocaleId locale) |
protected abstract long |
countInTextUnit(ITextUnit textUnit) |
protected abstract boolean |
countOnlyTranslatable() |
long |
getBatchCount() |
long |
getBatchItemCount() |
abstract String |
getDescription()
Gets a short localizable description of what this step does.
|
long |
getDocumentCount() |
long |
getGroupCount() |
abstract String |
getMetric() |
abstract String |
getName()
Gets the localizable name of this step.
|
protected TextContainer |
getSource() |
long |
getSubDocumentCount() |
protected Event |
handleEndBatch(Event event)
Handles the
EventType.END_BATCH event. |
protected Event |
handleEndBatchItem(Event event)
Handles the
EventType.END_BATCH_ITEM event. |
protected Event |
handleEndDocument(Event event)
Handles the
EventType.END_DOCUMENT event. |
protected Event |
handleEndGroup(Event event)
Handles the
EventType.END_GROUP event. |
protected Event |
handleEndSubDocument(Event event)
Handles the
EventType.END_SUBDOCUMENT event. |
protected Event |
handleStartBatch(Event event)
Handles the
EventType.START_BATCH event. |
protected Event |
handleStartBatchItem(Event event)
Handles the
EventType.START_BATCH_ITEM event. |
protected Event |
handleStartDocument(Event event)
Handles the
EventType.START_DOCUMENT event. |
protected Event |
handleStartGroup(Event event)
Handles the
EventType.START_GROUP event. |
protected Event |
handleStartSubDocument(Event event)
Handles the
EventType.START_SUBDOCUMENT event. |
protected Event |
handleTextUnit(Event event)
Handles the
EventType.TEXT_UNIT event. |
protected void |
removeFromMetrics(IWithAnnotations res,
String metricName) |
protected void |
removeFromMetrics(Segment seg,
String metricName) |
protected void |
removeFromMetrics(TextContainer textContainer,
String metricName) |
protected void |
saveCount(Metrics metrics,
long count) |
protected void |
saveToMetrics(Event event,
long count) |
protected void |
saveToMetrics(Segment seg,
long count) |
protected void |
saveToMetrics(TextContainer textContainer,
long count) |
cancel, destroy, getHelpLocation, getParameters, getSourceLocale, getTargetLocale, handleCustom, handleDocumentPart, handleEndSubfilter, handleEvent, handleMultiEvent, handlePipelineParameters, handleRawDocument, handleStartSubfilter, isDone, isLastOutputStep, setLastOutputStep, setParameters, setSourceLocale, setTargetLocalepublic abstract String getName()
IPipelineSteppublic abstract String getDescription()
IPipelineSteppublic abstract String getMetric()
protected abstract long count(TextContainer textContainer, LocaleId locale)
protected abstract long countInTextUnit(ITextUnit textUnit)
protected abstract boolean countOnlyTranslatable()
protected void saveCount(Metrics metrics, long count)
public long getBatchCount()
public long getBatchItemCount()
public long getDocumentCount()
public long getSubDocumentCount()
public long getGroupCount()
protected void saveToMetrics(Event event, long count)
protected void removeFromMetrics(IWithAnnotations res, String metricName)
protected void removeFromMetrics(TextContainer textContainer, String metricName)
protected void saveToMetrics(TextContainer textContainer, long count)
protected void saveToMetrics(Segment seg, long count)
protected Event handleStartBatch(Event event)
BasePipelineStepEventType.START_BATCH event.handleStartBatch in class BasePipelineStepevent - event to handle.protected Event handleEndBatch(Event event)
BasePipelineStepEventType.END_BATCH event.handleEndBatch in class BasePipelineStepevent - event to handle.protected Event handleStartBatchItem(Event event)
BasePipelineStepEventType.START_BATCH_ITEM event.handleStartBatchItem in class BasePipelineStepevent - event to handle.protected Event handleEndBatchItem(Event event)
BasePipelineStepEventType.END_BATCH_ITEM event.handleEndBatchItem in class BasePipelineStepevent - event to handle.protected Event handleStartDocument(Event event)
BasePipelineStepEventType.START_DOCUMENT event.handleStartDocument in class BasePipelineStepevent - event to handle.protected Event handleEndDocument(Event event)
BasePipelineStepEventType.END_DOCUMENT event.handleEndDocument in class BasePipelineStepevent - event to handle.protected Event handleStartSubDocument(Event event)
BasePipelineStepEventType.START_SUBDOCUMENT event.handleStartSubDocument in class BasePipelineStepevent - event to handle.protected Event handleEndSubDocument(Event event)
BasePipelineStepEventType.END_SUBDOCUMENT event.handleEndSubDocument in class BasePipelineStepevent - event to handle.protected Event handleStartGroup(Event event)
BasePipelineStepEventType.START_GROUP event.handleStartGroup in class BasePipelineStepevent - event to handle.protected Event handleEndGroup(Event event)
BasePipelineStepEventType.END_GROUP event.handleEndGroup in class BasePipelineStepevent - event to handle.protected TextContainer getSource()
protected Event handleTextUnit(Event event)
BasePipelineStepEventType.TEXT_UNIT event.handleTextUnit in class BasePipelineStepevent - event to handle.Copyright © 2021. All rights reserved.