Class TLcyLspTransformingModelFormatWrapper
An ALcyLspFormatWrapper
instance which adds support for transforming the models in the layer factory, for
example to add support for clustering.
This format wrapper can only be used if the ALcyFormat
(which normally provides the model decoder and model workspace support for the format)
is wrapped with an TLcyTransformingModelFormatWrapper
.
This format wrapper has a layer factory implementation which allows to convert the model
into a ALcdTransformingModel
and create a layer for that.
A possible use-case is if you want to cluster the domain objects on the map.
The Lucy clustering sample illustrates a usage of this class.
See samples.lucy.clustering.lightspeed.LspClusteringSHPAddOn#createBaseFormat()
.
- Since:
- 2017.1
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcyLspTransformingModelFormatWrapper
(ALcyLspFormat aFormat, TLcyTransformingModelFormatWrapper aGXYFormatWrapper, ILspLayerFactory aTransformedModelLayerFactory) Creates a newTLcyLspTransformingModelFormatWrapper
instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
canHandleModel
(ILcdModel aModel) Returnstrue
if and only if the given model can be visualized by this format.final ILspLayerFactory
Creates the layer factory for this format.final boolean
isLayerOfFormat
(ILspLayer aLayer) Returnstrue
if and only if the given layer is a layer of this format.Methods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormatWrapper
createAll, createBalloonContentProviders, createFormatBarFactory, createLayerCustomizerPanelFactories, createLayerCustomizerPanelWorkspaceCodecs, createLayerMeasureProviderFactory, createLayerSelectionTransferHandlers, createLayerStyleCodecFileTypeDescriptors, createLayerStyleCodecs, createLayerStyleProviders, createLayerWorkspaceCodecs, getFormat, getLongPrefix, getLucyEnv, getShortPrefix
Methods inherited from class com.luciad.lucy.format.lightspeed.ALcyLspFormat
checkInitialized, createLayerContextOfFormatFilter, getBalloonContentProviders, getFormatBarFactory, getLayerCustomizerPanelFactories, getLayerCustomizerPanelWorkspaceCodecs, getLayerFactory, getLayerMeasureProviderFactory, getLayerSelectionTransferHandlers, getLayerStyleCodecFileTypeDescriptors, getLayerStyleCodecs, getLayerStyleProviders, getLayerWorkspaceCodecs, toString
-
Constructor Details
-
TLcyLspTransformingModelFormatWrapper
public TLcyLspTransformingModelFormatWrapper(ALcyLspFormat aFormat, TLcyTransformingModelFormatWrapper aGXYFormatWrapper, ILspLayerFactory aTransformedModelLayerFactory) Creates a newTLcyLspTransformingModelFormatWrapper
instance.- Parameters:
aFormat
- The delegate Lightspeed formataGXYFormatWrapper
- TheTLcyTransformingModelFormatWrapper
instance which is used to add transforming model support to the GXY format. The actual transforming of the models will be delegated to theTLcyTransformingModelFormatWrapper.transformModel(ILcdModel)
method.aTransformedModelLayerFactory
- Layer factory responsible for the creation of the layers forALcdTransformingModel
instances.
-
-
Method Details
-
createLayerFactory
Creates the layer factory for this format. The default implementation returns
null
.This implementations returns the instance created by the decorated format.
For each incoming model, the layer factory will:
- Try transforming the model by calling the
TLcyTransformingModelFormatWrapper.transformModel(ILcdModel)
method. -
If the returned model is a
ALcdTransformingModel
, layer creation will be delegated to the layer factory passed in the constructor. If not, layer creation is delegated to the layer factory of the delegate format.
- Overrides:
createLayerFactory
in classALcyLspFormatWrapper
- Returns:
- The
ILspLayerFactory
for this format. May benull
- See Also:
- Try transforming the model by calling the
-
canHandleModel
Description copied from class:ALcyLspFormat
Returns
true
if and only if the given model can be visualized by this format.- Overrides:
canHandleModel
in classALcyLspFormatWrapper
- Parameters:
aModel
- The model to check- Returns:
true
if and only if the given model can be visualized by this format.
-
isLayerOfFormat
Description copied from class:ALcyLspFormat
Returns
true
if and only if the given layer is a layer of this format.The default implementation uses the
ALcyLspFormat.canHandleModel(com.luciad.model.ILcdModel)
to determine whetheraLayer
is a layer of this format.- Overrides:
isLayerOfFormat
in classALcyLspFormatWrapper
- Parameters:
aLayer
- The layer to check- Returns:
true
if and only if the given layer is a layer of this format
-