com.luciad.format.gml2.xml
, com.luciad.format.gml31.xml
and
com.luciad.format.gml32.xml
.public class TLcdGMLModelEncoder extends Object implements ILcdModelEncoder, ILcdOutputStreamFactoryCapable
ILcdModelEncoder
that saves the model to GML format. The
model descriptor must be an ILcdFeaturedDescriptor
.Constructor and Description |
---|
TLcdGMLModelEncoder()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addNameSpace(String aPrefix,
String aURI)
Deprecated.
Adds a name space to be included in the GML output.
|
boolean |
canExport(ILcdModel aModel,
String aSourceName)
Deprecated.
Returns whether this encoder can export the specified model to the specified destination.
|
boolean |
canSave(ILcdModel aModel)
Deprecated.
Returns whether this model encoder can save the specified model to the location it originally came from.
|
void |
export(ILcdModel aModel,
String aSourceName)
Deprecated.
Encodes the given
ILcdModel . |
String |
getDisplayName()
Deprecated.
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
ILcdModelReferenceEncoder |
getModelReferenceEncoder()
Deprecated.
Returns the current model reference encoder.
|
ILcdOutputStreamFactory |
getOutputStreamFactory()
Deprecated.
Returns the
ILcdOutputStreamFactory used by the encoder to
generate output. |
boolean |
isWriteModelReference()
Deprecated.
Returns true if the encoder is set to write the model reference.
|
boolean |
isWriteSchema()
Deprecated.
Returns true if the encoder is set to write GML application schemas.
|
void |
save(ILcdModel aModel)
Deprecated.
Saves the model to the location where it originally came from.
|
void |
setDefaultNamespace(org.jdom.Namespace aNamespace)
Deprecated.
|
void |
setModelReferenceEncoder(ILcdModelReferenceEncoder aModelReferenceEncoder)
Deprecated.
Sets the model reference encoder to be used when
setWriteModelReference()
has been set to true. |
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Deprecated.
Sets an
ILcdOutputStreamFactory for the encoder to use when
generating output. |
void |
setSchemaURI(String aURI)
Deprecated.
Sets the schema URI to be written to the GML output.
|
void |
setWriteModelReference(boolean aWriteModelReference)
Deprecated.
Specifies whether or not the encoder should create a model reference file.
|
void |
setWriteSchema(boolean aWriteSchema)
Deprecated.
Specifies whether or not the encoder should create a GML application
schema.
|
void |
setXCoordinatesFirst(boolean aXCoordinatesFirst)
Deprecated.
Specifies whether the decoder should write coordinates in XY or YX order.
|
public void setDefaultNamespace(org.jdom.Namespace aNamespace)
public void setWriteSchema(boolean aWriteSchema)
setSchemaURI()
method. Without an application
schema, the resulting GML will not be readable!
If set to true, the encoder will create a .XSD file with the same name as
the .GML file being created.aWriteSchema
- sets the new writeSchema property value.isWriteSchema()
public boolean isWriteSchema()
setWriteSchema(boolean)
public void setWriteModelReference(boolean aWriteModelReference)
setModelReferenceEncoder()
can be used to specify
which encoder should be used to create this file. By default,
TLcdModelReferenceEncoder
is used.aWriteModelReference
- sets the new writeModelReference property value.isWriteModelReference()
public boolean isWriteModelReference()
setWriteModelReference(boolean)
public void setModelReferenceEncoder(ILcdModelReferenceEncoder aModelReferenceEncoder)
setWriteModelReference()
has been set to true.aModelReferenceEncoder
- An ILcdModelReferenceEncoder
.getModelReferenceEncoder()
public ILcdModelReferenceEncoder getModelReferenceEncoder()
ILcdModelReferenceEncoder
.setModelReferenceEncoder(com.luciad.model.ILcdModelReferenceEncoder)
public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
ILcdOutputStreamFactory
for the encoder to use when
generating output.setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
aOutputStreamFactory
- An ILcdOutputStreamFactory
.public ILcdOutputStreamFactory getOutputStreamFactory()
ILcdOutputStreamFactory
used by the encoder to
generate output.getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
ILcdOutputStreamFactory
used by the encoder to
generate output.public boolean canExport(ILcdModel aModel, String aSourceName)
ILcdModelEncoder
canExport
in interface ILcdModelEncoder
aModel
- the model to be verified.aSourceName
- the location where the model should be exported to.true
if this encoder can export the specified model to the
specified location, false
otherwise.ILcdModelEncoder.export(com.luciad.model.ILcdModel, java.lang.String)
public boolean canSave(ILcdModel aModel)
ILcdModelEncoder
canSave
in interface ILcdModelEncoder
aModel
- the model to be verified.true
if this encoder can save the model in the location where it originally came from,
false
otherwise.ILcdModelEncoder.save(com.luciad.model.ILcdModel)
public void addNameSpace(String aPrefix, String aURI)
aPrefix
- The prefix of the XML name space.aURI
- The URI of the XML name space.public void setSchemaURI(String aURI)
aURI
- The full contents of the xsi:schemaLocation
attribute.public void export(ILcdModel aModel, String aSourceName) throws IllegalArgumentException, IOException
ILcdModel
. The model must have an
ILcdFeaturedDescriptor
unless it is either a
TLcdModelList
or a TLcdGMLModelList
. In these
cases, the submodels must have featured descriptors. In the case of a
TLcdGMLModelList
, the encoder will make use of the feature ID
retrievers and the property index subsets associated with each of the
submodels.export
in interface ILcdModelEncoder
aModel
- the model to be exported.aSourceName
- the location where the model should be saved. Typically, this is a name for the output
file, but it can also point to a file containing the required properties to create a set
of data files.IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.getDisplayName
in interface ILcdModelEncoder
ILcdModelEncoder
.public void save(ILcdModel aModel) throws IllegalArgumentException, IOException
ILcdModelEncoder
save
in interface ILcdModelEncoder
aModel
- the model to be saved.IllegalArgumentException
- if the model cannot be saved by this encoder (!canSave(aModel)
).IOException
- if an I/O error occurs during encoding.public void setXCoordinatesFirst(boolean aXCoordinatesFirst)
aXCoordinatesFirst
- If false, coordinates are written in YX order.