@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdPOLModelEncoder extends Object implements ILcdModelEncoder
ILcdModelEncoder
implementation to export ILcdModel
objects to
Polygon files which can be read by Jeppesen's TAAM application.
The current implementation supports exporting of
ILcdPOLGeometry
implementations
ILcdPoint
implementations
ILcdPointList
implementations.
ILcdExtruded
implementations where the base shape is a ILcdPolygon
or a ILcdPolyline
.
ILcdPOLAttributeProvider
set to provide POL specific attributes
for arbitrary elements in the model.Modifier and Type | Field and Description |
---|---|
static String |
DISPLAY_NAME |
static String |
TYPE_NAME |
Constructor and Description |
---|
TLcdPOLModelEncoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canExport(ILcdModel aModel,
String aDestination)
Tests if the model contains any elements that this encoder can process.
|
boolean |
canSave(ILcdModel aModel)
Returns whether this model encoder can save the specified model to the location it originally came from.
|
void |
export(ILcdModel aModel,
String aString)
Exports the specified model to the specified destination.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
ILcdPOLAttributeProvider |
getPOLAttributeProvider()
Returns the POL attribute provider to provide POL specific attributes for arbitrary elements.
|
protected boolean |
isPOLElement(Object aElement)
Test whether an object can be exported as a POL element.
|
void |
save(ILcdModel aModel)
Saves the model to the location where it originally came from.
|
void |
setPOLAttributeProvider(ILcdPOLAttributeProvider aPOLAttributeProvider)
Sets the POL attribute provider to provide POL specific attributes for arbitrary elements.
|
public static final String TYPE_NAME
public static final String DISPLAY_NAME
public ILcdPOLAttributeProvider getPOLAttributeProvider()
setPOLAttributeProvider(com.luciad.format.pol.ILcdPOLAttributeProvider)
public void setPOLAttributeProvider(ILcdPOLAttributeProvider aPOLAttributeProvider)
aPOLAttributeProvider
- the POL attribute provider to provide POL specific attributes for arbitrary elements.getPOLAttributeProvider()
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 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 boolean canExport(ILcdModel aModel, String aDestination)
isPOLElement(java.lang.Object)
for every object in the model until 1 object passes the test.canExport
in interface ILcdModelEncoder
aModel
- the model to export.aDestination
- not used.ILcdModelEncoder.export(com.luciad.model.ILcdModel, java.lang.String)
public void export(ILcdModel aModel, String aString) throws IllegalArgumentException, IOException
ILcdModelEncoder
export
in interface ILcdModelEncoder
aModel
- the model to be exported.aString
- 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.protected boolean isPOLElement(Object aElement)
aElement
- ILcdPOLGeometry
, ILcdPoint
,
ILcdPointList
or an extruded shape based on a ILcdPolygon or a ILcdPolyline
.