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 Stringprotected SWEDataTypeUtilsprotected static final Stringprotected booleanprotected static final StringFields 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 voidclose()voidabstract voidflush()protected abstract voidprocessAtom(ScalarComponent component) Processes a scalar componentprotected abstract booleanprocessBlock(DataComponent component) Processes an aggregate componentvoidsetDataComponents(DataComponent dataInfo) abstract voidvoidstartStream(boolean multipleRecords) voidstop()voidwrite(OutputStream outputStream) voidMethods inherited from class org.vast.swe.DataTreeVisitor
endDataBlock, getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, reset, setDataEncoding, setDataHandler, setErrorHandler, setParentArray, setRawDataHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
setOutputin interfaceDataStreamWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceDataStreamWriter- Throws:
IOException
-
flush
- Specified by:
flushin interfaceDataStreamWriter- Throws:
IOException
-
processAtom
Description copied from class:DataTreeVisitorProcesses a scalar component- Specified by:
processAtomin classDataTreeVisitor- Throws:
IOException
-
processBlock
Description copied from class:DataTreeVisitorProcesses an aggregate component- Specified by:
processBlockin classDataTreeVisitor- Returns:
- true if children should be processed, false otherwise
- Throws:
IOException
-
write
- Specified by:
writein interfaceDataStreamWriter- Throws:
IOException
-
write
- Specified by:
writein interfaceDataStreamWriter- Throws:
IOException
-
startStream
- Specified by:
startStreamin interfaceDataStreamWriter- Throws:
IOException
-
endStream
- Specified by:
endStreamin interfaceDataStreamWriter- Throws:
IOException
-
stop
public void stop()- Specified by:
stopin interfaceDataStreamWriter
-
setDataComponents
- Specified by:
setDataComponentsin interfaceDataStreamWriter- Overrides:
setDataComponentsin classDataTreeVisitor
-