Class SplicedLinesFilter
- java.lang.Object
-
- net.sf.okapi.common.filters.AbstractFilter
-
- net.sf.okapi.common.filters.AbstractLineFilter
-
- net.sf.okapi.filters.plaintext.base.BasePlainTextFilter
-
- net.sf.okapi.filters.plaintext.spliced.SplicedLinesFilter
-
- All Implemented Interfaces:
AutoCloseable,Iterator<Event>,IFilter
public class SplicedLinesFilter extends BasePlainTextFilter
- Version:
- 0.1, 09.06.2009
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILTER_CONFIGstatic StringFILTER_CONFIG_BACKSLASHstatic StringFILTER_CONFIG_CUSTOMstatic StringFILTER_CONFIG_UNDERSCOREstatic StringFILTER_NAME-
Fields inherited from class net.sf.okapi.filters.plaintext.base.BasePlainTextFilter
FILTER_CONFIG_TRIM_ALL, FILTER_CONFIG_TRIM_TRAIL, FILTER_MIME
-
Fields inherited from class net.sf.okapi.common.filters.AbstractLineFilter
input, LINE_NUMBER, srcLang, startDoc, trgLang
-
Fields inherited from interface net.sf.okapi.common.filters.IFilter
SUB_FILTER
-
-
Constructor Summary
Constructors Constructor Description SplicedLinesFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddone()protected voidinit()protected TextProcessingResultprocessLine(TextContainer lineContainer)Called by the filter for every line read from the inputprotected voidwaitForLine(boolean lastChance)Called by the filter when there are no input lines (the input has been read).-
Methods inherited from class net.sf.okapi.filters.plaintext.base.BasePlainTextFilter
callSubfilter, checkTU, isEmpty, processTU, sendAsSkeleton, sendAsSkeleton, sendAsSkeleton, sendAsSource, sendAsSource, sendAsSource, sendAsTarget
-
Methods inherited from class net.sf.okapi.common.filters.AbstractLineFilter
addLineBreak, cancel, close, getActiveSkeleton, getFirstDocumentPart, getFirstTextUnit, getHeadSkeleton, getLineBreak, getQueueSize, getTargetLocale, hasNext, next, open, open, sendEvent, sendEvent
-
Methods inherited from class net.sf.okapi.common.filters.AbstractFilter
addConfiguration, addConfiguration, addConfiguration, addConfigurations, createEndFilterEvent, createFilterWriter, createSkeletonWriter, createStartFilterEvent, findConfiguration, getConfiguration, getConfigurations, getDisplayName, getDocumentId, getDocumentName, getEncoderManager, getEncoding, getFilterConfigurationMapper, getMimeType, getName, getNewlineType, getParameters, getParameters, getParametersClassName, getParentId, getSrcLoc, getTrgLoc, isCanceled, isGenerateSkeleton, isMultilingual, isUtf8Bom, isUtf8Encoding, removeConfiguration, setDisplayName, setDocumentName, setEncoding, setFilterConfigurationMapper, setGenerateSkeleton, setMimeType, setMultilingual, setName, setNewlineType, setOptions, setParameters, setParentId, setSrcLoc, setTrgLoc
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Field Detail
-
FILTER_NAME
public static final String FILTER_NAME
- See Also:
- Constant Field Values
-
FILTER_CONFIG
public static final String FILTER_CONFIG
- See Also:
- Constant Field Values
-
FILTER_CONFIG_UNDERSCORE
public static final String FILTER_CONFIG_UNDERSCORE
- See Also:
- Constant Field Values
-
FILTER_CONFIG_BACKSLASH
public static final String FILTER_CONFIG_BACKSLASH
- See Also:
- Constant Field Values
-
FILTER_CONFIG_CUSTOM
public static final String FILTER_CONFIG_CUSTOM
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
protected void init()
- Overrides:
initin classBasePlainTextFilter
-
processLine
protected TextProcessingResult processLine(TextContainer lineContainer)
Description copied from class:AbstractLineFilterCalled by the filter for every line read from the input- Overrides:
processLinein classBasePlainTextFilter- Returns:
-
waitForLine
protected void waitForLine(boolean lastChance)
Description copied from class:AbstractLineFilterCalled by the filter when there are no input lines (the input has been read). Used to control implementation-specific internal buffers.- Overrides:
waitForLinein classAbstractLineFilter- Parameters:
lastChance- True if there are no events in the queue, and if the method will not produce events, the filter will be finished.
-
done
protected void done()
- Overrides:
donein classAbstractLineFilter
-
-