Package com.luciad.format.kml22.xml
Class TLcdKML22ModelEncoder
java.lang.Object
com.luciad.format.kml22.xml.TLcdKML22ModelEncoder
- All Implemented Interfaces:
ILcdOutputStreamFactoryCapable,ILcdModelEncoder,Serializable
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.
Limitations
- This model encoder doesn't export other models into KML files.
- This model encoder does not support kmz extension.
- This model encoder was not made for round-trips and KML models don't have a
referenceto this model encoder. - Relative network links will not be modified and this model encoder will not copy their target contents.
- Since:
- 2015.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether aILcdModelcan be exported to a KML file.booleanReturns whether aILcdModelcan be saved.voidExports the specified model to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoderencodes to.Returns the output stream factory that is used.voidSaves the model to the location where it originally came from.voidsetOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory) Sets the output stream factory to be used.
-
Constructor Details
-
TLcdKML22ModelEncoder
public TLcdKML22ModelEncoder()Default constructor forTLcdKML22ModelEncoder.
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdModelEncoderReturns a short, displayable name for the format thisILcdModelEncoderencodes to.- Specified by:
getDisplayNamein interfaceILcdModelEncoder- Returns:
- the displayable name of this
ILcdModelEncoder.
-
canSave
Returns whether aILcdModelcan be saved.- Specified by:
canSavein interfaceILcdModelEncoder- Parameters:
aModel- the model to be verified.- Returns:
- true if the model is a KML model.
- See Also:
-
save
Description copied from interface:ILcdModelEncoderSaves the model to the location where it originally came from.- Specified by:
savein interfaceILcdModelEncoder- Parameters:
aModel- the model to be saved.- Throws:
IllegalArgumentException- if the model cannot be saved by this encoder (!canSave(aModel)).IOException- if an I/O error occurs during encoding.
-
canExport
Returns whether aILcdModelcan be exported to a KML file.- Specified by:
canExportin interfaceILcdModelEncoder- Parameters:
aModel- the model to be verified.aDestinationName- the location where the model should be exported to.- Returns:
- true if the model is a KML model and the destination is valid.
- See Also:
-
export
public void export(ILcdModel aModel, String aDestinationName) throws IllegalArgumentException, IOException Description copied from interface:ILcdModelEncoderExports the specified model to the specified destination.- Specified by:
exportin interfaceILcdModelEncoder- Parameters:
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.- Throws:
IllegalArgumentException- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)).IOException- if an I/O error occurs during encoding.
-
setOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapableSets the output stream factory to be used.- Specified by:
setOutputStreamFactoryin interfaceILcdOutputStreamFactoryCapable- Parameters:
aOutputStreamFactory- the output stream factory to be used.
-
getOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapableReturns the output stream factory that is used.- Specified by:
getOutputStreamFactoryin interfaceILcdOutputStreamFactoryCapable- Returns:
- the output stream factory that is used.
-