Package org.vast.swe
Class AbstractDataWriter
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataWriter
- All Implemented Interfaces:
DataStreamWriter
- Direct Known Subclasses:
AsciiDataWriter
,BinaryDataWriter
,FilteredWriter
,XmlDataWriter
,XmlDataWriterDOM
Abstract class for writing a CDM data stream.
- Since:
- Feb 10, 2006
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected SWEDataTypeUtils
protected static final String
protected boolean
protected static final String
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 TypeMethodDescriptionabstract void
close()
void
abstract void
flush()
protected abstract void
processAtom
(ScalarComponent component) Processes a scalar componentprotected abstract boolean
processBlock
(DataComponent component) Processes an aggregate componentvoid
setDataComponents
(DataComponent dataInfo) abstract void
void
startStream
(boolean multipleRecords) void
stop()
void
write
(OutputStream outputStream) void
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
-
STREAM_ERROR
- See Also:
-
CHOICE_ERROR
- See Also:
-
NO_HANDLER_ERROR
- See Also:
-
dataTypeUtils
-
stopWriting
protected boolean stopWriting
-
-
Constructor Details
-
AbstractDataWriter
public AbstractDataWriter()
-
-
Method Details
-
setOutput
- Specified by:
setOutput
in interfaceDataStreamWriter
- Throws:
IOException
-
close
- Specified by:
close
in interfaceDataStreamWriter
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceDataStreamWriter
- Throws:
IOException
-
processAtom
Description copied from class:DataTreeVisitor
Processes a scalar component- Specified by:
processAtom
in classDataTreeVisitor
- 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
-
write
- Specified by:
write
in interfaceDataStreamWriter
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataStreamWriter
- Throws:
IOException
-
startStream
- Specified by:
startStream
in interfaceDataStreamWriter
- Throws:
IOException
-
endStream
- Specified by:
endStream
in interfaceDataStreamWriter
- Throws:
IOException
-
stop
public void stop()- Specified by:
stop
in interfaceDataStreamWriter
-
setDataComponents
- Specified by:
setDataComponents
in interfaceDataStreamWriter
- Overrides:
setDataComponents
in classDataTreeVisitor
-