public final class TLcdKML22ModelEncoder extends Object implements ILcdModelEncoder, ILcdOutputStreamFactoryCapable
ILcdModelEncoder
implementation to convert a KML 2.2 model to a KML file.
The main purpose of this model encoder is to save KML models made programmatically, from a custom conversion process for example.
reference
to this model encoder.Constructor and Description |
---|
TLcdKML22ModelEncoder()
Default constructor for
TLcdKML22ModelEncoder . |
Modifier and Type | Method and Description |
---|---|
boolean |
canExport(ILcdModel aModel,
String aDestinationName)
Returns whether a
ILcdModel can be exported to a KML file. |
boolean |
canSave(ILcdModel aModel)
Returns whether a
ILcdModel can be saved. |
void |
export(ILcdModel aModel,
String aDestinationName)
Exports the specified model to the specified destination.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
ILcdOutputStreamFactory |
getOutputStreamFactory()
Returns the output stream factory that is used.
|
void |
save(ILcdModel aModel)
Saves the model to the location where it originally came from.
|
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Sets the output stream factory to be used.
|
public TLcdKML22ModelEncoder()
TLcdKML22ModelEncoder
.public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.getDisplayName
in interface ILcdModelEncoder
ILcdModelEncoder
.public boolean canSave(ILcdModel aModel)
ILcdModel
can be saved.canSave
in interface ILcdModelEncoder
aModel
- the model to be verified.ILcdModelEncoder.save(com.luciad.model.ILcdModel)
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 boolean canExport(ILcdModel aModel, String aDestinationName)
ILcdModel
can be exported to a KML file.canExport
in interface ILcdModelEncoder
aModel
- the model to be verified.aDestinationName
- the location where the model should be exported to.ILcdModelEncoder.export(com.luciad.model.ILcdModel, java.lang.String)
public void export(ILcdModel aModel, String aDestinationName) throws IllegalArgumentException, IOException
ILcdModelEncoder
export
in interface ILcdModelEncoder
aModel
- the model to be exported.aDestinationName
- 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 void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
ILcdOutputStreamFactoryCapable
setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
aOutputStreamFactory
- the output stream factory to be used.public ILcdOutputStreamFactory getOutputStreamFactory()
ILcdOutputStreamFactoryCapable
getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable