Class TLcdSLDGXYLayerTreeNodeFactory

All Implemented Interfaces:

@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.
  • Constructor Details

    • TLcdSLDGXYLayerTreeNodeFactory

      public TLcdSLDGXYLayerTreeNodeFactory()
      Creates a new layer node factory. The sub-layers are created by the layer factories available from the TLcdServiceLoader.
    • TLcdSLDGXYLayerTreeNodeFactory

      public TLcdSLDGXYLayerTreeNodeFactory(Supplier<ILcdSLDGXYLayerFactory> aLeafLayerFactorySupplier)
      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.
      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 an ILcdGXYLayer for representing the given ILcdModel on an ILcdGXYView, according to the given TLcdSLDFeatureTypeStyle's.
      Specified by:
      createGXYLayer in interface ILcdSLDGXYLayerFactory
      aModel - the model that needs to be visualized in an ILcdGXYView
      aSLDFeatureTypeStyles - the SLD feature type style(s) defining how the model should be visually represented on the view
      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).