public class TLcdOGCFilterEncoder extends Object implements ILcdOutputStreamFactoryCapable
Modifier and Type | Class and Description |
---|---|
static class |
TLcdOGCFilterEncoder.Version
Enumeration to indicate which OGC Filter version to encode to.
|
Constructor and Description |
---|
TLcdOGCFilterEncoder()
Creates a new encoder, configured for OGC Filter 1.1.0
|
TLcdOGCFilterEncoder(TLcdOGCFilterEncoder.Version aVersion)
Creates a new encoder, configured for the given OGC Filter version (1.1 or 2.0).
|
Modifier and Type | Method and Description |
---|---|
void |
encode(Object aFilterModelObject,
OutputStream aOutputStream)
Encodes the given filter model object to the given output stream.
|
void |
encode(Object aFilterModelObject,
String aSourceName)
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.
|
ILcdOutputStreamFactory |
getOutputStreamFactory()
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.
|
public TLcdOGCFilterEncoder()
public TLcdOGCFilterEncoder(TLcdOGCFilterEncoder.Version aVersion)
aVersion
- The version to output the filter to.public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
aOutputStreamFactory
- the output stream factory to be used.public ILcdOutputStreamFactory getOutputStreamFactory()
getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
public void encode(Object aFilterModelObject, String aSourceName) throws IOException
aFilterModelObject
- the given object of the filter modelaSourceName
- the full path to the source where the object should be written.IOException
- thrown if an error occurs during the write process.public final void encode(Object aFilterModelObject, OutputStream aOutputStream) throws IOException
aFilterModelObject
- the given object of the filter modelaOutputStream
- the stream to which the output should be writtenIOException
- thrown if an error occurs during the write process.public static String encodeToString(TLcdOGCFilter aOGCFilter) throws IOException
aOGCFilter
- The filteraOGCFilter
IOException
- When something goes wrong during the encoding