Package com.luciad.ogc.sld.view.gxy
Class TLcdSLDGXYLayerTreeNodeFactory
java.lang.Object
com.luciad.ogc.sld.view.gxy.TLcdSLDGXYLayerTreeNodeFactory
- All Implemented Interfaces:
ILcdSLDGXYLayerFactory
@LcdService(service=ILcdSLDGXYLayerFactory.class,
priority=50000)
public final class TLcdSLDGXYLayerTreeNodeFactory
extends Object
implements ILcdSLDGXYLayerFactory
SLD Layer factory to create layer nodes with sub-layers (
ILcdLayerTreeNode
's) for models with sub-models
(ILcdModelTreeNode
's). It loops over all sub-models and creates a layer for each. To create the sub-layers,
it either uses a provided SLD layer factory, or by default, all layer factories registered with the service loader.
It only accepts ILcdModelTreeNode
's that are empty,
so ones that don't have data in the nodes, only in the leafs. This is by far the most common case. It has a fall back
priority to allow more specialized layer factories to easily overrule this generic implementation.- Since:
- 2017.0
-
Constructor Summary
ConstructorDescriptionCreates a new layer node factory.TLcdSLDGXYLayerTreeNodeFactory
(Supplier<ILcdSLDGXYLayerFactory> aLeafLayerFactorySupplier) Creates a new layer node factory. -
Method Summary
Modifier and TypeMethodDescriptioncreateGXYLayer
(ILcdModel aModel, List<TLcdSLDFeatureTypeStyle> aSLDFeatureTypeStyles) Creates anILcdGXYLayer
for representing the givenILcdModel
on anILcdGXYView
, according to the givenTLcdSLDFeatureTypeStyle
's.
-
Constructor Details
-
TLcdSLDGXYLayerTreeNodeFactory
public TLcdSLDGXYLayerTreeNodeFactory()Creates a new layer node factory. The sub-layers are created by the layer factories available from theTLcdServiceLoader
. -
TLcdSLDGXYLayerTreeNodeFactory
Creates a new layer node factory. The sub-layers are created by the supplied layer factory. Should there be a hierarchy of layer nodes inside layer nodes, then the nodes will be created by this layer factory, and the leafs by the given factory.- Parameters:
aLeafLayerFactorySupplier
- Supplier of the layer factory used to create the leafs of the layer tree.
-
-
Method Details
-
createGXYLayer
public ILcdGXYLayer createGXYLayer(ILcdModel aModel, List<TLcdSLDFeatureTypeStyle> aSLDFeatureTypeStyles) Description copied from interface:ILcdSLDGXYLayerFactory
Creates anILcdGXYLayer
for representing the givenILcdModel
on anILcdGXYView
, according to the givenTLcdSLDFeatureTypeStyle
's.- Specified by:
createGXYLayer
in interfaceILcdSLDGXYLayerFactory
- Parameters:
aModel
- the model that needs to be visualized in anILcdGXYView
aSLDFeatureTypeStyles
- the SLD feature type style(s) defining how the model should be visually represented on the view- Returns:
- a layer representing the given model, or
null
if a layer cannot be created (e.g. because this layer factory doesn't support the given model).
-