Package com.luciad.format.pol
Class TLcdPOLModelEncoder
java.lang.Object
com.luciad.format.pol.TLcdPOLModelEncoder
- All Implemented Interfaces:
ILcdModelEncoder
,Serializable
@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
implementationsILcdPoint
implementationsILcdPointList
implementations.ILcdExtruded
implementations where the base shape is aILcdPolygon
or aILcdPolyline
.
ILcdPOLAttributeProvider
set to provide POL specific attributes
for arbitrary elements in the model.- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests if the model contains any elements that this encoder can process.boolean
Returns whether this model encoder can save the specified model to the location it originally came from.void
Exports the specified model to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.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
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.
-
Field Details
-
TYPE_NAME
- See Also:
-
DISPLAY_NAME
- See Also:
-
-
Constructor Details
-
TLcdPOLModelEncoder
public TLcdPOLModelEncoder()
-
-
Method Details
-
getPOLAttributeProvider
Returns the POL attribute provider to provide POL specific attributes for arbitrary elements.- Returns:
- the POL attribute provider to provide POL specific attributes for arbitrary elements.
- See Also:
-
setPOLAttributeProvider
Sets the POL attribute provider to provide POL specific attributes for arbitrary elements.- Parameters:
aPOLAttributeProvider
- the POL attribute provider to provide POL specific attributes for arbitrary elements.- See Also:
-
canSave
Description copied from interface:ILcdModelEncoder
Returns whether this model encoder can save the specified model to the location it originally came from. Often this will only be a simple test, for example checking the type of the model's model descriptor.- Specified by:
canSave
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to be verified.- Returns:
true
if this encoder can save the model in the location where it originally came from,false
otherwise.- See Also:
-
getDisplayName
Description copied from interface:ILcdModelEncoder
Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.- Specified by:
getDisplayName
in interfaceILcdModelEncoder
- Returns:
- the displayable name of this
ILcdModelEncoder
.
-
save
Description copied from interface:ILcdModelEncoder
Saves the model to the location where it originally came from.- Specified by:
save
in 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
Tests if the model contains any elements that this encoder can process. This implementation callsisPOLElement(java.lang.Object)
for every object in the model until 1 object passes the test.- Specified by:
canExport
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to export.aDestination
- not used.- Returns:
- true if at least one element can be exported.
- See Also:
-
export
Description copied from interface:ILcdModelEncoder
Exports the specified model to the specified destination.- Specified by:
export
in interfaceILcdModelEncoder
- Parameters:
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.- Throws:
IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.
-
isPOLElement
Test whether an object can be exported as a POL element.- Parameters:
aElement
-- Returns:
- true if the element is an implementation of
ILcdPOLGeometry
,ILcdPoint
,ILcdPointList
or an extruded shape based on aILcdPolygon
or a
ILcdPolyline
.
-