Package org.vast.swe.fast
Class XmlDataWriter
java.lang.Object
org.vast.swe.fast.DataBlockProcessor
org.vast.swe.fast.AbstractDataWriter
org.vast.swe.fast.XmlDataWriter
- All Implemented Interfaces:
DataComponentVisitor
,DataStreamWriter
New implementation of XML data writer with better efficiency since the write 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 class
protected class
protected class
protected class
protected class
protected class
protected class
protected class
protected class
protected class
protected class
Nested 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 Map<String,
XmlDataWriter.IntegerWriter> protected String
protected String
protected XMLStreamWriter
Fields inherited from class org.vast.swe.fast.AbstractDataWriter
dataEncoding, lastArrayElt, parentArray
Fields inherited from class org.vast.swe.fast.DataBlockProcessor
dataComponents, enableSubTree, filter, hasVarSizeArray, processorStack, processorTreeReady, rootProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
void
flush()
protected DataBlockProcessor.ArrayProcessor
getArrayProcessor
(DataArray array) protected DataBlockProcessor.ArraySizeSupplier
getArraySizeSupplier
(String refId) protected DataBlockProcessor.ChoiceProcessor
getChoiceProcessor
(DataChoice choice) protected DataBlockProcessor.ImplicitSizeProcessor
protected DataBlockProcessor.AtomProcessor
getRangeProcessor
(RangeComponent range) protected DataBlockProcessor.RecordProcessor
getRecordProcessor
(DataRecord record) protected DataBlockProcessor.RecordProcessor
getVectorProcessor
(Vector vect) protected void
init()
void
void
startStream
(boolean addWrapper) void
void
void
void
void
void
void
protected void
writeStartElement
(String eltName) Methods inherited from class org.vast.swe.fast.AbstractDataWriter
getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler, stop, write
Methods inherited from class org.vast.swe.fast.DataBlockProcessor
addToProcessorTree, checkEnabled, getDataComponents, setDataComponentFilter, setDataComponents, setEnabled, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitRange
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, setDataComponents
-
Field Details
-
xmlWriter
-
namespace
-
prefix
-
countWriters
-
-
Constructor Details
-
XmlDataWriter
public XmlDataWriter()
-
-
Method Details
-
writeStartElement
- Throws:
XMLStreamException
-
init
protected void init()- Specified by:
init
in classDataBlockProcessor
-
setOutput
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataStreamWriter
- Overrides:
write
in classAbstractDataWriter
- Throws:
IOException
-
startStream
- Specified by:
startStream
in interfaceDataStreamWriter
- Overrides:
startStream
in classAbstractDataWriter
- Throws:
IOException
-
endStream
- Specified by:
endStream
in interfaceDataStreamWriter
- Overrides:
endStream
in classAbstractDataWriter
- Throws:
IOException
-
flush
- Throws:
IOException
-
close
- Throws:
IOException
-
visit
-
visit
-
visit
-
visit
-
visit
-
visit
-
getRangeProcessor
- Overrides:
getRangeProcessor
in classDataBlockProcessor
-
getRecordProcessor
- Overrides:
getRecordProcessor
in classDataBlockProcessor
-
getVectorProcessor
- Overrides:
getVectorProcessor
in classDataBlockProcessor
-
getChoiceProcessor
- Specified by:
getChoiceProcessor
in classDataBlockProcessor
-
getArrayProcessor
- Overrides:
getArrayProcessor
in classDataBlockProcessor
-
getImplicitSizeProcessor
- Specified by:
getImplicitSizeProcessor
in classDataBlockProcessor
-
getArraySizeSupplier
- Specified by:
getArraySizeSupplier
in classDataBlockProcessor
-