Package org.vast.swe
Class XmlDataWriter
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataWriter
org.vast.swe.XmlDataWriter
- All Implemented Interfaces:
DataStreamWriter
Writes CDM XML data stream using the given data components structure and encoding information.
- Since:
- Feb 29, 2008
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected int
protected XMLStreamWriter
Fields inherited from class org.vast.swe.AbstractDataWriter
CHOICE_ERROR, dataTypeUtils, NO_HANDLER_ERROR, stopWriting, 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 void
void
void
flush()
protected void
processAtom
(ScalarComponent component) Processes a scalar componentprotected boolean
processBlock
(DataComponent component) Processes an aggregate componentvoid
setOutput
(OutputStream outputStream) void
write
(OutputStream outputStream) Methods inherited from class org.vast.swe.AbstractDataWriter
setDataComponents, startStream, stop, write
Methods inherited from class org.vast.swe.DataTreeVisitor
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, reset, 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.DataStreamWriter
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
-
Field Details
-
xmlWriter
-
namespace
-
prefix
-
prevStackSize
protected int prevStackSize
-
-
Constructor Details
-
XmlDataWriter
public XmlDataWriter()
-
-
Method Details
-
setOutput
- Specified by:
setOutput
in interfaceDataStreamWriter
- Specified by:
setOutput
in classAbstractDataWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceDataStreamWriter
- Specified by:
close
in classAbstractDataWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceDataStreamWriter
- Specified by:
flush
in classAbstractDataWriter
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataStreamWriter
- Overrides:
write
in classAbstractDataWriter
- Throws:
IOException
-
closeElements
- Throws:
XMLStreamException
-
processBlock
Description copied from class:DataTreeVisitor
Processes an aggregate component- Specified by:
processBlock
in classAbstractDataWriter
- 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 classAbstractDataWriter
- Throws:
IOException
-
endStream
- Specified by:
endStream
in interfaceDataStreamWriter
- Overrides:
endStream
in classAbstractDataWriter
- Throws:
IOException
-