public class XmlDataParserDOM extends AbstractDataParser
Writes CDM XML data stream using the given data components structure directly inside a DOM.
DataTreeVisitor.Record
Modifier and Type | Field and Description |
---|---|
protected Element |
currentParentElt |
protected DOMHelper |
dom |
protected String |
namespace |
protected int |
numRecord |
protected String |
prefix |
protected int |
prevStackSize |
protected int |
recordCounter |
protected AsciiDataParser |
tokenParser |
CHOICE_ERROR, dataTypeUtils, renewDataBlock, stopParsing, STREAM_ERROR
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
Constructor and Description |
---|
XmlDataParserDOM() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Element |
getCurrentElement(DataComponent componentInfo) |
protected String |
getElementName(DataComponent component) |
protected boolean |
moreData()
Checks if more data is available from the stream
|
void |
parse(InputStream inputStream) |
protected void |
processAtom(ScalarComponent component) |
protected boolean |
processBlock(DataComponent blockComponent)
Process an aggregate component
|
void |
read(DOMHelper dom,
Element parentElt) |
void |
reset()
Reset the parser before parsing a new tuple
|
protected void |
setCurrentParent() |
void |
setInput(InputStream inputStream) |
parse, parse, parseNextBlock, setDataComponents, setRenewDataBlock, stop
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
protected DOMHelper dom
protected Element currentParentElt
protected String namespace
protected String prefix
protected int prevStackSize
protected AsciiDataParser tokenParser
protected int recordCounter
protected int numRecord
public void setInput(InputStream inputStream) throws IOException
IOException
public void parse(InputStream inputStream) throws IOException
IOException
public void read(DOMHelper dom, Element parentElt) throws IOException
IOException
protected boolean moreData()
moreData
in class AbstractDataParser
public void reset()
DataTreeVisitor
reset
in interface DataStreamParser
reset
in class AbstractDataParser
protected String getElementName(DataComponent component)
protected void setCurrentParent()
protected Element getCurrentElement(DataComponent componentInfo) throws IOException
IOException
protected boolean processBlock(DataComponent blockComponent) throws IOException
DataTreeVisitor
processBlock
in class DataTreeVisitor
IOException
protected void processAtom(ScalarComponent component) throws IOException
processAtom
in class DataTreeVisitor
IOException
public void close() throws IOException
IOException
Copyright © 2016 Sensia Software LLC. All rights reserved.