Package org.vast.swe.fast
Class TextDataParser
java.lang.Object
org.vast.swe.fast.DataBlockProcessor
org.vast.swe.fast.AbstractDataParser
org.vast.swe.fast.TextDataParser
- All Implemented Interfaces:
 DataComponentVisitor,DataStreamParser
New implementation of text data parser with better efficiency since the parsing tree is pre-computed during init instead of being re-evaluated while iterating through the component tree.
- Since:
 - Dec 7, 2016
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected classprotected classprotected classprotected classprotected classprotected classNested classes/interfaces inherited from class org.vast.swe.fast.DataBlockProcessor
DataBlockProcessor.ArrayProcessor, DataBlockProcessor.ArraySizeSupplier, DataBlockProcessor.AtomProcessor, DataBlockProcessor.BaseProcessor, DataBlockProcessor.ChoiceProcessor, DataBlockProcessor.CompositeProcessor, DataBlockProcessor.ImplicitSizeProcessor, DataBlockProcessor.RecordProcessor - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected char[]protected intprotected booleanprotected Map<String,TextDataParser.IntegerParser> protected String[]protected Readerprotected StringBuilderprotected intprotected StringFields inherited from class org.vast.swe.fast.AbstractDataParser
INVALID_ARRAY_SIZE_MSG, INVALID_BOOLEAN_MSG, INVALID_CHOICE_MSG, INVALID_DECIMAL_MSG, INVALID_INTEGER_MSGFields inherited from class org.vast.swe.fast.DataBlockProcessor
dataComponents, enableSubTree, filter, hasVarSizeArray, processorStack, processorTreeReady, rootProcessor - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected DataBlockProcessor.ArrayProcessorgetArrayProcessor(DataArray array) protected DataBlockProcessor.ArraySizeSuppliergetArraySizeSupplier(String refId) protected DataBlockProcessor.ChoiceProcessorgetChoiceProcessor(DataChoice choice) protected DataBlockProcessor.ImplicitSizeProcessorprotected voidinit()protected booleanmoreData()voidsetInput(InputStream is) voidvoidvoidvoidvoidvoidMethods inherited from class org.vast.swe.fast.AbstractDataParser
getDataEncoding, getDataHandler, getErrorHandler, getNextDataBlock, getRawDataHandler, parse, parse, parse, parseNextBlock, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler, setRenewDataBlock, stop, updateArraySizeMethods inherited from class org.vast.swe.fast.DataBlockProcessor
addToProcessorTree, checkEnabled, getDataComponents, getRangeProcessor, getRecordProcessor, getVectorProcessor, setDataComponentFilter, setDataComponents, setEnabled, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitRangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.vast.cdm.common.DataStreamParser
getDataComponents, setDataComponents 
- 
Field Details
- 
reader
 - 
tokenSep
 - 
blockSep
protected char[] blockSep - 
collapseWhiteSpaces
protected boolean collapseWhiteSpaces - 
tokenBuf
 - 
lastSplit
 - 
tokenIndex
protected int tokenIndex - 
blockSepIndex
protected int blockSepIndex - 
countReaders
 
 - 
 - 
Constructor Details
- 
TextDataParser
public TextDataParser() 
 - 
 - 
Method Details
- 
init
protected void init()- Specified by:
 initin classDataBlockProcessor
 - 
moreData
- Specified by:
 moreDatain classAbstractDataParser- Throws:
 IOException
 - 
setInput
- Throws:
 IOException
 - 
close
- Throws:
 IOException
 - 
visit
 - 
visit
 - 
visit
 - 
visit
 - 
visit
 - 
visit
 - 
getChoiceProcessor
- Specified by:
 getChoiceProcessorin classDataBlockProcessor
 - 
getArrayProcessor
- Overrides:
 getArrayProcessorin classDataBlockProcessor
 - 
getImplicitSizeProcessor
- Specified by:
 getImplicitSizeProcessorin classDataBlockProcessor
 - 
getArraySizeSupplier
- Specified by:
 getArraySizeSupplierin classDataBlockProcessor
 
 -