com.luciad.format.gml2.xml
, com.luciad.format.gml31.xml
and
com.luciad.format.gml32.xml
.@Deprecated public class TLcdGMLModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
ILcdModel
.
The GML file must follow the "OpenGIS Geography Markup Language (GML)
Implementation Specification, version 2.1.2"
(https://portal.opengeospatial.org/files/?artifact_id=11339)
of 17 september 2002.
The default implementation for decoding the model reference is done by using a second file. The second GML file containing the model reference must follow the specifications recommended by "Recommended Definition Data for Coordinate Reference Systems and Coordinate Transformations" (http://www.opengis.org/techno/specs/01-014r3.pdf) from 25th april 2001. If the GML file name is "name.gml", the file containing the model reference shall have be "name_ref.gml". This decoder can decode:
ILcdShapeList
)
ILcdShapeList
)
ILcdShapeList
)
ILcdComplexPolygon
)
ILcdPolygon
)
ILcdBounds
)
ILcdPolygon
)
ILcdPolyline
)
Constructor and Description |
---|
TLcdGMLModelDecoder()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addGMLModelObjectFactory(String aFeatureName,
ILcdGMLModelObjectFactory aGMLModelObjectFactory)
Deprecated.
Adds a model object factory to the decoder.
|
boolean |
canDecodeSource(String aSource)
Deprecated.
Checks whether a
ILcdModel can be decode from given data. |
ILcdModel |
decode(InputStream aInput)
Deprecated.
Creates a new
ILcdModel from the given InputStream. |
ILcdModel |
decode(String aSource)
Deprecated.
Creates a new
ILcdModel from the given data. |
String |
getDisplayName()
Deprecated.
Gets the display name of the decoder.
|
ILcdInputStreamFactory |
getInputStreamFactory()
Deprecated.
Returns the current
ILcdInputStreamFactory . |
ILcdModelReferenceDecoder |
getModelReferenceDecoder()
Deprecated.
Returns the
ILcdModelReferenceDecoder used to load the GML
file's model reference. |
void |
removeGMLModelObjectFactory(String aFeatureName)
Deprecated.
Removes a model object factory from the decoder.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Deprecated.
Sets
aInputStreamFactory as ILcdInputStreamFactory
on this TLcdGMLModelDecoder . |
void |
setModelReferenceDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder)
Deprecated.
Sets the
ILcdModelReferenceDecoder used to load the GML
file's model reference. |
void |
setReadCoordinatesAsXY(boolean aBoolean)
Deprecated.
Set a boolean to indicate how to read the coordinates: first X and the Y or first Y and then X.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
public String getDisplayName()
getDisplayName
in interface ILcdModelDecoder
ILcdModelDecoder
.public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setReadCoordinatesAsXY(boolean aBoolean)
aBoolean
- , when true coordinates expected to be x,y else expected to be y,x .public ILcdModelReferenceDecoder getModelReferenceDecoder()
ILcdModelReferenceDecoder
used to load the GML
file's model reference.ILcdModelReferenceDecoder
setModelReferenceDecoder(com.luciad.model.ILcdModelReferenceDecoder)
public void setModelReferenceDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder)
ILcdModelReferenceDecoder
used to load the GML
file's model reference.aModelReferenceDecoder
- an ILcdModelReferenceDecoder
getModelReferenceDecoder()
public void addGMLModelObjectFactory(String aFeatureName, ILcdGMLModelObjectFactory aGMLModelObjectFactory)
aFeatureName
- The feature name for which this model object factory is to be used.aGMLModelObjectFactory
- An ILcdGMLModelObjectFactory
.public void removeGMLModelObjectFactory(String aFeatureName)
aFeatureName
- The feature name for which the model object factory is to be removed.public boolean canDecodeSource(String aSource)
ILcdModel
can be decode from given data.canDecodeSource
in interface ILcdModelDecoder
aSource
- the data sourceILcdModelDecoder.decode(String)
,
ILcdModelDecoder.decodeModelMetadata(String)
public ILcdModel decode(InputStream aInput) throws IOException
ILcdModel
from the given InputStream. The model reference must be
provided externally, before this method is called.
Note that when using this method, the location of the source data is unknown. Hence, the
GML data should either refer to a schema that can be found in the classpath, or specify a
fully-qualified file name or URL for the schema. If the schema cannot be found, no data
will be decoded!aInput
- the InputStream from which to read the model data.IOException
- when an I/O error occurs or when the input could not be parsed.public ILcdModel decode(String aSource) throws IOException
ILcdModel
from the given data. The model reference must be
provided externally, before this method is called.decode
in interface ILcdModelDecoder
aSource
- the data source.IOException
- when an I/O error occurs or when the source file could not be parsed.InterruptedIOException
- When the thread on which this method is called is interrupted: it is recommended to stop the decoding
and throw an InterruptedIOException
.
This same exception can also be used if the decoder shows UI to the user, and the user cancels the decoding
through the UI.ILcdModelDecoder.canDecodeSource(String)
public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
aInputStreamFactory
as ILcdInputStreamFactory
on this TLcdGMLModelDecoder
. aInputStreamFactory
is then used for retrieving InputStream objects when decoding a GML
document and its associated application schema. To use the default way of
creating an InputStream, leave this property unset.setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the factory used to retrieve input streams from the sources.public ILcdInputStreamFactory getInputStreamFactory()
ILcdInputStreamFactory
.getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
ILcdInputStreamFactory
.