Package net.sf.okapi.filters.table.fwc
Class FixedWidthColumnsFilter
- 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.table.base.BaseTableFilter
-
- net.sf.okapi.filters.table.fwc.FixedWidthColumnsFilter
-
- All Implemented Interfaces:
AutoCloseable,Iterator<Event>,IFilter
public class FixedWidthColumnsFilter extends BaseTableFilter
Fixed-Width Columns filter. Extracts text from a fixed-width columns table padded with white-spaces.- Version:
- 0.1, 09.06.2009
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLUMN_WIDTHprotected List<Integer>columnEndPositionsprotected List<Integer>columnStartPositionsstatic StringFILTER_CONFIGstatic StringFILTER_NAME-
Fields inherited from class net.sf.okapi.filters.table.base.BaseTableFilter
COLUMN_NUMBER, columnNames, commentColumns, commentSourceRefs, FILTER_MIME, ROW_NUMBER, sourceColumns, sourceIdColumns, sourceIdSourceRefs, sourceIdSuffixes, targetColumns, targetLanguages, targetSourceRefs
-
Fields inherited from class net.sf.okapi.filters.plaintext.base.BasePlainTextFilter
FILTER_CONFIG_TRIM_ALL, FILTER_CONFIG_TRIM_TRAIL
-
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 FixedWidthColumnsFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TextProcessingResultextractCells(List<ITextUnit> cells, TextContainer lineContainer, long lineNum)Splits line into table cells.protected voidinit()-
Methods inherited from class net.sf.okapi.filters.table.base.BaseTableFilter
getColumnNames, getFieldDelimiter, getFieldQualifier, isMerging, isSendListedMode, processCells, processLine
-
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, done, getActiveSkeleton, getFirstDocumentPart, getFirstTextUnit, getHeadSkeleton, getLineBreak, getQueueSize, getTargetLocale, hasNext, next, open, open, sendEvent, sendEvent, waitForLine
-
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, getFilterWriter, getMimeType, getName, getNewlineType, getParameters, getParameters, getParametersClassName, getParentId, getSrcLoc, getTrgLoc, isCanceled, isGenerateSkeleton, isMultilingual, isUtf8Bom, isUtf8Encoding, removeConfiguration, setDisplayName, setDocumentName, setEncoding, setFilterConfigurationMapper, setFilterWriter, 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
-
COLUMN_WIDTH
public static String COLUMN_WIDTH
-
-
Method Detail
-
init
protected void init()
- Overrides:
initin classBaseTableFilter
-
extractCells
protected TextProcessingResult extractCells(List<ITextUnit> cells, TextContainer lineContainer, long lineNum)
Description copied from class:BaseTableFilterSplits line into table cells.- Overrides:
extractCellsin classBaseTableFilter- Returns:
- string array of cells
-
-