|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.importer.base.tokenizer.AbstractImportTokenizer
pl.edu.agh.cast.importer.base.tokenizer.fixedwidth.FixedWidthTokenizer
public class FixedWidthTokenizer
Tokenizer for text files where fields are aligned in columns with spaces between each field.
Field Summary | |
---|---|
static String |
COMMENT_CHAR_OPTION_NAME
The comment character option indicating that a line is a comment and is not supposed to be imported. |
static String |
CUT_POINTS_OPTION_NAME
Indices of column cuts separated by white chars. |
Fields inherited from class pl.edu.agh.cast.importer.base.tokenizer.AbstractImportTokenizer |
---|
options |
Constructor Summary | |
---|---|
FixedWidthTokenizer()
|
Method Summary | |
---|---|
List<String> |
getInputFileLines()
|
List<Integer> |
getLineCutPoints()
Returns cut points indices. |
static String |
pointListToString(List<Integer> indices)
Converts list of cut points indices to string. |
List<RawTabularData> |
tokenize(InputStream is,
long rowsLimit,
org.eclipse.core.runtime.IProgressMonitor monitor)
Splits a given input stream into tokens, using specified tokenizer options. |
Methods inherited from class pl.edu.agh.cast.importer.base.tokenizer.AbstractImportTokenizer |
---|
equals, getEncoding, getOptionValue, getTokenizerOptions, hashCode, removeEmptyCellsFromRowEnd, removeQualifier, setEncoding, setTokenizerOptions |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COMMENT_CHAR_OPTION_NAME
public static final String CUT_POINTS_OPTION_NAME
Constructor Detail |
---|
public FixedWidthTokenizer()
Method Detail |
---|
public List<RawTabularData> tokenize(InputStream is, long rowsLimit, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException
is
- the data input stream to tokenizerowsLimit
- the maximum number of rows to be importedmonitor
- the progress monitor for the tokenization operation
IOException
IImportTokenizer.tokenize(java.io.InputStream, long,
org.eclipse.core.runtime.IProgressMonitor)
public static String pointListToString(List<Integer> indices)
indices
- cut points indices
public List<String> getInputFileLines()
public List<Integer> getLineCutPoints()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |