Package com.luciad.ogc.filter.xml
Class TLcdOGCFilterEncoder
java.lang.Object
com.luciad.ogc.filter.xml.TLcdOGCFilterEncoder
- All Implemented Interfaces:
ILcdOutputStreamFactoryCapable
XML encoder for generating documents describing OGC filters, structured according to version 1.1.0 or 2.0 of the OGC
Filter specification.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration to indicate which OGC Filter version to encode to. -
Constructor Summary
ConstructorDescriptionCreates a new encoder, configured for OGC Filter 1.1.0Creates a new encoder, configured for the given OGC Filter version (1.1 or 2.0). -
Method Summary
Modifier and TypeMethodDescriptionfinal void
encode
(Object aFilterModelObject, OutputStream aOutputStream) Encodes the given filter model object to the given output stream.void
Encodes the given filter model object to the given destination.static String
encodeToString
(TLcdOGCFilter aOGCFilter) Utility method to encode the filter as an OGC Filter 2.0.0 XML string.Returns the output stream factory that is currently used for creating output streams given source names.void
setOutputStreamFactory
(ILcdOutputStreamFactory aOutputStreamFactory) Sets the output stream factory that will be used for creating output streams given source names.
-
Constructor Details
-
TLcdOGCFilterEncoder
public TLcdOGCFilterEncoder()Creates a new encoder, configured for OGC Filter 1.1.0 -
TLcdOGCFilterEncoder
Creates a new encoder, configured for the given OGC Filter version (1.1 or 2.0).- Parameters:
aVersion
- The version to output the filter to.- Since:
- 2017.0
-
-
Method Details
-
setOutputStreamFactory
Sets the output stream factory that will be used for creating output streams given source names.- Specified by:
setOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Parameters:
aOutputStreamFactory
- the output stream factory to be used.
-
getOutputStreamFactory
Returns the output stream factory that is currently used for creating output streams given source names.- Specified by:
getOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Returns:
- the input stream factory that is currently used.
-
encode
Encodes the given filter model object to the given destination.- Parameters:
aFilterModelObject
- the given object of the filter modelaSourceName
- the full path to the source where the object should be written.- Throws:
IOException
- thrown if an error occurs during the write process.
-
encode
Encodes the given filter model object to the given output stream.- Parameters:
aFilterModelObject
- the given object of the filter modelaOutputStream
- the stream to which the output should be written- Throws:
IOException
- thrown if an error occurs during the write process.- Since:
- 2017.0
-
encodeToString
Utility method to encode the filter as an OGC Filter 2.0.0 XML string.- Parameters:
aOGCFilter
- The filter- Returns:
- An XML-encoded version of
aOGCFilter
- Throws:
IOException
- When something goes wrong during the encoding- Since:
- 2017.0
-