Package org.vast.swe
Class XmlDataParserDOM
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataParser
org.vast.swe.XmlDataParserDOM
- All Implemented Interfaces:
DataStreamParser
Writes CDM XML data stream using the given data components structure directly inside a DOM.
- Since:
- Feb 29, 2008
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Element
protected DOMHelper
protected String
protected int
protected String
protected int
protected int
protected AsciiDataParser
Fields inherited from class org.vast.swe.AbstractDataParser
CHOICE_ERROR, dataTypeUtils, renewDataBlock, stopParsing, STREAM_ERROR
Fields inherited from class org.vast.swe.DataTreeVisitor
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected Element
getCurrentElement
(DataComponent componentInfo) protected String
getElementName
(DataComponent component) protected boolean
moreData()
Checks if more data is available from the streamvoid
parse
(InputStream inputStream) protected void
processAtom
(ScalarComponent component) Processes a scalar componentprotected boolean
processBlock
(DataComponent blockComponent) Processes an aggregate componentvoid
void
reset()
Reset the parser before parsing a new tupleprotected void
void
setInput
(InputStream inputStream) Methods inherited from class org.vast.swe.AbstractDataParser
parse, parse, parseNextBlock, setDataComponents, setRenewDataBlock, stop
Methods inherited from class org.vast.swe.DataTreeVisitor
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.vast.cdm.common.DataStreamParser
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
-
Field Details
-
dom
-
currentParentElt
-
namespace
-
prefix
-
prevStackSize
protected int prevStackSize -
tokenParser
-
recordCounter
protected int recordCounter -
numRecord
protected int numRecord
-
-
Constructor Details
-
XmlDataParserDOM
public XmlDataParserDOM()
-
-
Method Details
-
setInput
- Throws:
IOException
-
parse
- Throws:
IOException
-
read
- Throws:
IOException
-
moreData
protected boolean moreData()Checks if more data is available from the stream- Specified by:
moreData
in classAbstractDataParser
- Returns:
- true if more data needs to be parsed, false otherwise
-
reset
public void reset()Description copied from class:DataTreeVisitor
Reset the parser before parsing a new tuple- Specified by:
reset
in interfaceDataStreamParser
- Overrides:
reset
in classAbstractDataParser
-
getElementName
-
setCurrentParent
protected void setCurrentParent() -
getCurrentElement
- Throws:
IOException
-
processBlock
Description copied from class:DataTreeVisitor
Processes an aggregate component- Specified by:
processBlock
in classDataTreeVisitor
- Returns:
- true if children should be processed, false otherwise
- Throws:
IOException
-
processAtom
Description copied from class:DataTreeVisitor
Processes a scalar component- Specified by:
processAtom
in classDataTreeVisitor
- Throws:
IOException
-
close
- Throws:
IOException
-