Package org.vast.swe
Class FilteredWriter
java.lang.Object
org.vast.swe.DataTreeVisitor
org.vast.swe.AbstractDataWriter
org.vast.swe.FilteredWriter
- All Implemented Interfaces:
DataStreamWriter
Delegating writer for writing only the selected components.
This is used to implement filtering by observed property in SOS.
- Since:
- Oct 9, 2015
-
Nested Class Summary
Nested classes/interfaces inherited from class org.vast.swe.DataTreeVisitor
DataTreeVisitor.Record
-
Field Summary
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
ConstructorsConstructorDescriptionFilteredWriter
(AbstractDataWriter writer, Collection<String> enabledDefUris) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
void
flush()
protected void
processAtom
(ScalarComponent component) Processes a scalar componentprotected boolean
processBlock
(DataComponent component) Processes an aggregate componentvoid
reset()
Reset the parser before parsing a new tuplevoid
setDataComponents
(DataComponent dataInfo) void
setDataEncoding
(DataEncoding dataEncoding) void
Methods inherited from class org.vast.swe.AbstractDataWriter
endStream, startStream, stop, write, write
Methods inherited from class org.vast.swe.DataTreeVisitor
getDataComponents, getDataEncoding, getDataHandler, getErrorHandler, getRawDataHandler, isEndOfDataBlock, processNextElement, 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, setDataHandler, setErrorHandler, setParentArray, setRawDataHandler
-
Constructor Details
-
FilteredWriter
-
-
Method Details
-
processAtom
Description copied from class:DataTreeVisitor
Processes a scalar component- Specified by:
processAtom
in classAbstractDataWriter
- Throws:
IOException
-
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
-
endDataBlock
- Overrides:
endDataBlock
in classDataTreeVisitor
- Throws:
CDMException
IOException
-
setDataComponents
- Specified by:
setDataComponents
in interfaceDataStreamWriter
- Overrides:
setDataComponents
in classAbstractDataWriter
-
setDataEncoding
- Specified by:
setDataEncoding
in interfaceDataStreamWriter
- Overrides:
setDataEncoding
in classDataTreeVisitor
-
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
-
reset
public void reset()Description copied from class:DataTreeVisitor
Reset the parser before parsing a new tuple- Specified by:
reset
in interfaceDataStreamWriter
- Overrides:
reset
in classDataTreeVisitor
-