@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdGDFModelEncoder extends Object implements ILcdModelEncoder, ILcdOutputStreamFactoryCapable
ILcdModelEncoder
encodes GDF models.Constructor and Description |
---|
TLcdGDFModelEncoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canExport(ILcdModel aLcdModel,
String s)
Returns whether this encoder can export the specified model to the specified destination.
|
boolean |
canSave(ILcdModel aLcdModel)
Returns whether this model encoder can save the specified model to the location it originally came from.
|
void |
export(ILcdModel aModel,
String aSourceName)
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 aLcdModel)
Saves the model to the location where it originally came from.
|
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Sets the output stream factory to be used.
|
void |
setXOffset(long aXOfsset)
Sets the offset for X-values.
|
void |
setXYMultiplicationFactor(int aXYMultiplicationFactor)
Sets this multiplication factor of the X- and Y-coordinates.
|
void |
setYOffset(long aYOfsset)
Sets the offset for Y-values.
|
void |
setZMultiplicationFactor(double aXYMultiplicationFactor)
Sets this multiplication factor of the Z-coordinates.
|
void |
setZOffset(long aZOfsset)
Sets the offset for Z-values.
|
public void setXYMultiplicationFactor(int aXYMultiplicationFactor)
aXYMultiplicationFactor
- the multiplication factor for X- and Y-coordinates.IllegalArgumentException
- if aXYMultiplicationFactor < -9 ||
aXYMultiplicationFactor > 9
.public void setZMultiplicationFactor(double aXYMultiplicationFactor)
aXYMultiplicationFactor
- the multiplication factor forZ-coordinates.public void setXOffset(long aXOfsset)
aXOfsset
- the offset for X-values.public void setYOffset(long aYOfsset)
aYOfsset
- the offset for X-values.public void setZOffset(long aZOfsset)
aZOfsset
- the offset for X-values.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
public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.getDisplayName
in interface ILcdModelEncoder
ILcdModelEncoder
.public boolean canSave(ILcdModel aLcdModel)
ILcdModelEncoder
canSave
in interface ILcdModelEncoder
aLcdModel
- 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 save(ILcdModel aLcdModel) throws IllegalArgumentException, IOException
ILcdModelEncoder
save
in interface ILcdModelEncoder
aLcdModel
- 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 aLcdModel, String s)
ILcdModelEncoder
canExport
in interface ILcdModelEncoder
aLcdModel
- the model to be verified.s
- 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 void export(ILcdModel aModel, String aSourceName) throws IllegalArgumentException, IOException
ILcdModelEncoder
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.