Class ALcdSLDWMSGXYLayerFactory

java.lang.Object
com.luciad.wms.server.ALcdSLDWMSGXYLayerFactory
All Implemented Interfaces:
ILcdWMSGXYLayerFactory

public abstract class ALcdSLDWMSGXYLayerFactory extends Object implements ILcdWMSGXYLayerFactory
Abstract implementation of ILcdWMSGXYLayerFactory that adds SLD support.

For requests without an SLD parameter, the method createGXYLayer(ILcdModel, ALcdWMSLayer, String) is used to create a layer.

For requests with an SLD parameter, the following methods are used:

In each of these methods, the TLcdSLDNamedLayer and TLcdSLDUserLayer objects represent the client's point of view on the layer to be rendered, while the ALcdWMSLayer objects represent the server's point of view as it is defined in the capabilities of the server (see ALcdWMSCapabilities).

Each of the listed methods has an additional method that adds TLcdWMSRequestContext as parameter; by default, these methods have an implementation that delegate to their counterpart without the parameter.

  • Constructor Details

    • ALcdSLDWMSGXYLayerFactory

      public ALcdSLDWMSGXYLayerFactory()
      Since:
      2022.0
  • Method Details

    • createGXYLayer

      public abstract ILcdGXYLayer createGXYLayer(ILcdModel aModel, ALcdWMSLayer aWMSLayer, String aStyleID)
      This method shall create a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      Parameters:
      aModel - the model to be wrapped into a ILcdGXYLayer.
      aWMSLayer - the Web Map Server layer for which this is done.
      aStyleID - the id of the style to be used. The value may be null.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public ILcdGXYLayer createGXYLayer(ILcdModel aModel, ALcdWMSLayer aWMSLayer, String aStyleID, TLcdWMSRequestContext aRequestContext)
      This method shall create a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      Note that this method is identical to the createGXYLayer method, apart from the servlet request context parameter. By default, the implementation delegates to this other method.

      Specified by:
      createGXYLayer in interface ILcdWMSGXYLayerFactory
      Parameters:
      aModel - the model to be wrapped into a ILcdGXYLayer.
      aWMSLayer - the WMS layer for which this is done.
      aStyleID - the id of the style to be used. The value may be null.
      aRequestContext - the request context for which this layer is created.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, String aStyleID)
      This method shall create a ILcdGXYLayer representing the given ILcdModel, corresponding to a named layer with/without a named style.

      As this corresponds to the default WMS behavior without SLD, the default implementation delegates to createGXYLayer(ILcdModel, ALcdWMSLayer, String).

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      Parameters:
      aModel - the model to be wrapped into a ILcdGXYLayer.
      aNamedLayer - the named SLD layer for which this is done, which represents the client's point of view.
      aWMSLayer - the WMS layer for which this is done (the server's point of view).
      aStyleID - the id of the style to be used. The value may be null.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, String aStyleID, TLcdWMSRequestContext aRequestContext)
      This method shall create a ILcdGXYLayer representing the given ILcdModel, corresponding to a named layer with/without a named style.

      As this corresponds to the default WMS behavior without SLD, the default implementation delegates to the method createGXYLayer(ILcdModel, ALcdWMSLayer, String) in ILcdWMSGXYLayerFactory.

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      As this corresponds to the default WMS behavior without SLD, the default implementation delegates to createGXYLayer(ILcdModel, ALcdWMSLayer, String, TLcdWMSRequestContext).

      Parameters:
      aModel - the model to be wrapped into a ILcdGXYLayer.
      aNamedLayer - the named SLD layer for which this is done, which represents the client's point of view.
      aWMSLayer - the WMS layer for which this is done (the server's point of view).
      aStyleID - the id of the style to be used. The value may be null.
      aRequestContext - the servlet request context.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public abstract ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle)
      This method shall create a ILcdGXYLayer representing the given ILcdModel, corresponding to a named layer with a user-defined style. This user-defined style is represented by one or more feature type styles (TLcdSLDFeatureTypeStyle), supplied as parameter to this method. A common layer implementation for a single feature type style is TLcdGXYLayer. In case of multiple feature type styles, the layers can be grouped in a TLcdGXYLayerTreeNode.

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      Parameters:
      aModel - the model to be wrapped into a ILcdGXYLayer.
      aNamedLayer - the named SLD layer for which this is done, which represents the client's point of view.
      aWMSLayer - the WMS layer for which this is done (the server's point of view).
      aStyle - the style to be used.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public ILcdGXYLayer createGXYLayer(ILcdModel aModel, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext)
      This method shall create a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      A common layer implementation for a single feature type style is TLcdGXYLayer. In case of multiple feature type styles, the layers can be grouped in a TLcdGXYLayerTreeNode.

      This method allows the user to implement request-based SLD rendering customizations for feature styles defined on the server. It is used when ALcdOGCWMSCommandDispatcherFactory.createSLDFeatureTypeStyleProvider(ServletConfig aServletConfig) does not return null and ILcdWMSSLDFeatureTypeStyleProvider.getSLDFeatureTypeStyles(String, String, ALcdRequestContext) returns a non empty list of feature styles defined on the server.

      Parameters:
      aModel - the model(s) to be wrapped into ILcdGXYLayer(s).
      aWMSLayer - the WMS layer for which this is done (the server's point of view).
      aStyle - the style to be used.
      aRequestContext - the servlet request context.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
      Since:
      2022.0
    • createGXYLayer

      public ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext)
      This method shall create a ILcdGXYLayer representing the given ILcdModel, corresponding to a named layer with a user-defined style. This user-defined style is represented by one or more feature type styles (TLcdSLDFeatureTypeStyle), supplied as parameter to this method. A common layer implementation for a single feature type style is TLcdGXYLayer. In case of multiple feature type styles, the layers can be grouped in a TLcdGXYLayerTreeNode.

      Note that the supplied ALcdWMSLayer can contain child layer information, but this should be disregarded: this method will be called subsequently for all child layers.

      Note that this method is identical to the createGXYLayer method, apart from the servlet request context parameter. By default, the implementation delegates to this other method.

      Parameters:
      aModel - the model to be wrapped into a ILcdGXYLayer.
      aNamedLayer - the named SLD layer for which this is done, which represents the client's point of view.
      aWMSLayer - the WMS layer for which this is done (the server's point of view).
      aStyle - the style to be used.
      aRequestContext - the servlet request context.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public abstract ILcdGXYLayer[] createGXYLayer(ILcdModel[] aModel, TLcdSLDUserLayer aUserLayer, TLcdSLDFeatureTypeStyle[] aStyle)
      This method shall create the ILcdGXYLayer(s) representing the given ILcdModel(s), corresponding to a user-defined layer with a user-defined style.

      The user-defined layer is represented by the ILcdModel argument; an array is used because a user-defined layer can refer to multiple WFS feature types and / or WCS coverages, which each end up in a separate model. The user-defined style is represented by one or more feature type styles (TLcdSLDFeatureTypeStyle), supplied as a parameter to this method.

      For each model in the model array argument, a corresponding layer needs to be created and returned via the layer array return value. Each layer should take into account all feature type styles supplied to this method. A common layer implementation for a single feature type style is TLcdGXYLayer. In case of multiple feature type styles, the layers can be grouped in a TLcdGXYLayerTreeNode.

      Parameters:
      aModel - the model(s) to be wrapped into ILcdGXYLayer(s).
      aUserLayer - the user-defined SLD layer for which this is done
      aStyle - the style to be used.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.
    • createGXYLayer

      public ILcdGXYLayer[] createGXYLayer(ILcdModel[] aModel, TLcdSLDUserLayer aUserLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext)
      This method shall create the ILcdGXYLayer(s) representing the given ILcdModel(s), corresponding to a user-defined layer with a user-defined style.

      The user-defined layer is represented by the ILcdModel argument; an array is used because a user-defined layer can refer to multiple WFS feature types and / or WCS coverages, which each end up in a separate model. The user-defined style is represented by one or more feature type styles (TLcdSLDFeatureTypeStyle), supplied as a parameter to this method.

      For each model in the model array argument, a corresponding layer needs to be created and returned via the layer array return value. Each layer should take into account all feature type styles supplied to this method. A common layer implementation for a single feature type style is TLcdGXYLayer. In case of multiple feature type styles, the layers can be grouped in a TLcdGXYLayerTreeNode.

      Note that this method is identical to the createGXYLayer method, apart from the servlet request context parameter. By default, the implementation delegates to this other method.

      Parameters:
      aModel - the model(s) to be wrapped into ILcdGXYLayer(s).
      aUserLayer - the user-defined SLD layer for which this is done
      aStyle - the style to be used.
      aRequestContext - the servlet request context.
      Returns:
      a ILcdGXYLayer representing a ILcdModel on a ILcdGXYView.