Package com.luciad.ogc.filter.xml
Class TLcdOGCFilterDecoder
java.lang.Object
com.luciad.ogc.filter.xml.TLcdOGCFilterDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable
XML Decoder for documents describing OGC filters, structured according to version 1.1.0 and 2.0 of the OGC
Filter specification.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
decode
(InputStream aInputStream) Processes the given input stream of an XML source document, and returns the model object that corresponds to the root element.Processes the given XML source document, and returns the filter model object that corresponds to the root element.static TLcdOGCFilter
decodeFromString
(String aFilterXMLString) Utility method to parse a string representing an OGC filter in XML to aTLcdOGCFilter
instance.Returns the currently set default model reference.Returns the input stream factory that is currently used for creating input streams given source names.void
setDefaultModelReference
(ILcdModelReference aDefaultModelReference) Sets the default model reference which should be set on geometric primitives in case the objects do not contain a model reference themselves.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory that will be used for creating input streams given source names.
-
Constructor Details
-
TLcdOGCFilterDecoder
public TLcdOGCFilterDecoder()Creates a newTLcdOGCFilterDecoder
with a default input stream factory.
-
-
Method Details
-
getDefaultModelReference
Returns the currently set default model reference.- Returns:
- The default model reference, or null if none is set.
- See Also:
-
setDefaultModelReference
Sets the default model reference which should be set on geometric primitives in case the objects do not contain a model reference themselves.- Parameters:
aDefaultModelReference
- A valid model reference name, or null to reset it to the global default.
-
setInputStreamFactory
Sets the input stream factory that will be used for creating input streams given source names.- Specified by:
setInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Parameters:
aInputStreamFactory
- the input stream factory to be used.
-
getInputStreamFactory
Returns the input stream factory that is currently used for creating input streams given source names.- Specified by:
getInputStreamFactory
in interfaceILcdInputStreamFactoryCapable
- Returns:
- the input stream factory that is currently used.
-
decode
Processes the given XML source document, and returns the filter model object that corresponds to the root element.- Parameters:
aSourceName
- the full path to the file to be decoded, including the file name.- Returns:
- the model object that corresponds to the root element.
- Throws:
IOException
- thrown if an error occurs during the read process.
-
decode
Processes the given input stream of an XML source document, and returns the model object that corresponds to the root element.- Parameters:
aInputStream
- the input stream- Returns:
- the model object that corresponds to the root element.
- Throws:
IOException
- thrown if an error occurs during the read process.- Since:
- 2017.0
-
decodeFromString
Utility method to parse a string representing an OGC filter in XML to aTLcdOGCFilter
instance.- Parameters:
aFilterXMLString
- The OGC filter as XML string- Returns:
- the parsed version of
aFilterXMLString
- Throws:
IOException
- When something goes wrong during the decoding- Since:
- 2017.0
-