public class XmlDataWriterDOM extends AbstractDataWriter
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 OutputStream |
outputStream |
protected String |
prefix |
protected int |
prevStackSize |
CHOICE_ERROR, dataTypeUtils, NO_HANDLER_ERROR, stopWriting, STREAM_ERROR
componentStack, currentRecord, dataComponents, dataEncoding, dataHandler, endOfArray, errorHandler, newBlock, parentArray, parentArrayIndex, parsing, rawHandler
Constructor and Description |
---|
XmlDataWriterDOM() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected String |
getElementName(DataComponent component) |
protected void |
init(DOMHelper dom,
Element parentElt) |
protected void |
processAtom(ScalarComponent scalarInfo) |
protected boolean |
processBlock(DataComponent blockInfo)
Process an aggregate component
|
protected void |
setCurrentParent() |
void |
setOutput(OutputStream outputStream) |
void |
write(DataBlock data) |
void |
write(DOMHelper dom,
Element parentElt) |
void |
write(OutputStream outputStream) |
setDataComponents, stop
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
protected DOMHelper dom
protected Element currentParentElt
protected String namespace
protected String prefix
protected int prevStackSize
protected OutputStream outputStream
public void setOutput(OutputStream outputStream) throws IOException
setOutput
in interface DataStreamWriter
setOutput
in class AbstractDataWriter
IOException
public void write(OutputStream outputStream) throws IOException
write
in interface DataStreamWriter
write
in class AbstractDataWriter
IOException
public void write(DataBlock data) throws IOException
write
in interface DataStreamWriter
write
in class AbstractDataWriter
IOException
public void write(DOMHelper dom, Element parentElt) throws IOException
IOException
public void flush() throws IOException
flush
in interface DataStreamWriter
flush
in class AbstractDataWriter
IOException
public void close() throws IOException
close
in interface DataStreamWriter
close
in class AbstractDataWriter
IOException
protected void init(DOMHelper dom, Element parentElt) throws IOException
IOException
protected String getElementName(DataComponent component)
protected void setCurrentParent()
protected boolean processBlock(DataComponent blockInfo) throws IOException
DataTreeVisitor
processBlock
in class AbstractDataWriter
IOException
protected void processAtom(ScalarComponent scalarInfo) throws IOException
processAtom
in class AbstractDataWriter
IOException
Copyright © 2016 Sensia Software LLC. All rights reserved.