public class TLcdOGCFilterDecoder extends Object implements ILcdInputStreamFactoryCapable
Constructor and Description |
---|
TLcdOGCFilterDecoder()
Creates a new
TLcdOGCFilterDecoder
with a default input stream factory. |
Modifier and Type | Method and Description |
---|---|
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.
|
Object |
decode(String aSourceName)
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 a
TLcdOGCFilter instance. |
ILcdModelReference |
getDefaultModelReference()
Returns the currently set default model reference.
|
ILcdInputStreamFactory |
getInputStreamFactory()
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.
|
public TLcdOGCFilterDecoder()
TLcdOGCFilterDecoder
with a default input stream factory.public ILcdModelReference getDefaultModelReference()
setDefaultModelReference(ILcdModelReference)
public void setDefaultModelReference(ILcdModelReference aDefaultModelReference)
aDefaultModelReference
- A valid model reference name, or null to reset it to the global default.public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used.public ILcdInputStreamFactory getInputStreamFactory()
getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
public Object decode(String aSourceName) throws IOException
aSourceName
- the full path to the file to be decoded, including the file name.IOException
- thrown if an error occurs during the read process.public final Object decode(InputStream aInputStream) throws IOException
aInputStream
- the input streamIOException
- thrown if an error occurs during the read process.public static TLcdOGCFilter decodeFromString(String aFilterXMLString) throws IOException
TLcdOGCFilter
instance.aFilterXMLString
- The OGC filter as XML stringaFilterXMLString
IOException
- When something goes wrong during the decoding