Class ALcdSLDWMSGXYLayerFactory
- All Implemented Interfaces:
ILcdWMSGXYLayerFactory
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:
createGXYLayer(ILcdModel, TLcdSLDNamedLayer, ALcdWMSLayer, String)
: this method is used for a named layer - named style combination, which corresponds to the classic usage of a WMS. Therefore, a default implementation already exists that delegates tocreateGXYLayer(ILcdModel, ALcdWMSLayer, String)
.createGXYLayer(ILcdModel, TLcdSLDNamedLayer, ALcdWMSLayer, TLcdSLDFeatureTypeStyle[])
: this method is used for a named layer - user style combination.createGXYLayer(ILcdModel[], TLcdSLDUserLayer, TLcdSLDFeatureTypeStyle[])
: this method is used for a user layer - user style combination.
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract ILcdGXYLayer[]
createGXYLayer
(ILcdModel[] aModel, TLcdSLDUserLayer aUserLayer, TLcdSLDFeatureTypeStyle[] aStyle) This method shall create theILcdGXYLayer
(s) representing the givenILcdModel
(s), corresponding to a user-defined layer with a user-defined style.createGXYLayer
(ILcdModel[] aModel, TLcdSLDUserLayer aUserLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext) This method shall create theILcdGXYLayer
(s) representing the givenILcdModel
(s), corresponding to a user-defined layer with a user-defined style.createGXYLayer
(ILcdModel aModel, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing aILcdModel
on aILcdGXYView
.abstract ILcdGXYLayer
createGXYLayer
(ILcdModel aModel, ALcdWMSLayer aWMSLayer, String aStyleID) This method shall create aILcdGXYLayer
representing aILcdModel
on aILcdGXYView
.createGXYLayer
(ILcdModel aModel, ALcdWMSLayer aWMSLayer, String aStyleID, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing aILcdModel
on aILcdGXYView
.abstract ILcdGXYLayer
createGXYLayer
(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle) This method shall create aILcdGXYLayer
representing the givenILcdModel
, corresponding to a named layer with a user-defined style.createGXYLayer
(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing the givenILcdModel
, corresponding to a named layer with a user-defined style.createGXYLayer
(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, String aStyleID) This method shall create aILcdGXYLayer
representing the givenILcdModel
, corresponding to a named layer with/without a named style.createGXYLayer
(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, String aStyleID, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing the givenILcdModel
, corresponding to a named layer with/without a named style.
-
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 aILcdGXYLayer
representing aILcdModel
on aILcdGXYView
. Note that the suppliedALcdWMSLayer
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 aILcdGXYLayer
.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 aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public ILcdGXYLayer createGXYLayer(ILcdModel aModel, ALcdWMSLayer aWMSLayer, String aStyleID, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing aILcdModel
on aILcdGXYView
. Note that the suppliedALcdWMSLayer
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 interfaceILcdWMSGXYLayerFactory
- Parameters:
aModel
- the model to be wrapped into aILcdGXYLayer
.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 aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, String aStyleID) This method shall create aILcdGXYLayer
representing the givenILcdModel
, corresponding to a named layer with/without a named style. As this corresponds to the default WMS behavior without SLD, the default implementation delegates tocreateGXYLayer(ILcdModel, ALcdWMSLayer, String)
. Note that the suppliedALcdWMSLayer
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 aILcdGXYLayer
.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 aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, String aStyleID, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing the givenILcdModel
, 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 methodcreateGXYLayer(ILcdModel, ALcdWMSLayer, String)
inILcdWMSGXYLayerFactory
. Note that the suppliedALcdWMSLayer
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 aILcdGXYLayer
.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 aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public abstract ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle) This method shall create aILcdGXYLayer
representing the givenILcdModel
, 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 isTLcdGXYLayer
. In case of multiple feature type styles, the layers can be grouped in aTLcdGXYLayerTreeNode
. Note that the suppliedALcdWMSLayer
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 aILcdGXYLayer
.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 aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public ILcdGXYLayer createGXYLayer(ILcdModel aModel, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing aILcdModel
on aILcdGXYView
. Note that the suppliedALcdWMSLayer
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
This method allows the user to implement request-based SLD rendering customizations for feature styles defined on the server. It is used whenTLcdGXYLayer
. In case of multiple feature type styles, the layers can be grouped in aTLcdGXYLayerTreeNode
.ALcdOGCWMSCommandDispatcherFactory.createSLDFeatureTypeStyleProvider(ServletConfig aServletConfig)
does not return null andILcdWMSSLDFeatureTypeStyleProvider.getSLDFeatureTypeStyles(String, String, ALcdRequestContext)
returns a non empty list of feature styles defined on the server.- Parameters:
aModel
- the model(s) to be wrapped intoILcdGXYLayer
(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 aILcdModel
on aILcdGXYView
. - Since:
- 2022.0
-
createGXYLayer
public ILcdGXYLayer createGXYLayer(ILcdModel aModel, TLcdSLDNamedLayer aNamedLayer, ALcdWMSLayer aWMSLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext) This method shall create aILcdGXYLayer
representing the givenILcdModel
, 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 isTLcdGXYLayer
. In case of multiple feature type styles, the layers can be grouped in aTLcdGXYLayerTreeNode
. Note that the suppliedALcdWMSLayer
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 aILcdGXYLayer
.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 aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public abstract ILcdGXYLayer[] createGXYLayer(ILcdModel[] aModel, TLcdSLDUserLayer aUserLayer, TLcdSLDFeatureTypeStyle[] aStyle) This method shall create theILcdGXYLayer
(s) representing the givenILcdModel
(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 aTLcdGXYLayerTreeNode
.- Parameters:
aModel
- the model(s) to be wrapped intoILcdGXYLayer
(s).aUserLayer
- the user-defined SLD layer for which this is doneaStyle
- the style to be used.- Returns:
- a
ILcdGXYLayer
representing aILcdModel
on aILcdGXYView
.
-
createGXYLayer
public ILcdGXYLayer[] createGXYLayer(ILcdModel[] aModel, TLcdSLDUserLayer aUserLayer, TLcdSLDFeatureTypeStyle[] aStyle, TLcdWMSRequestContext aRequestContext) This method shall create theILcdGXYLayer
(s) representing the givenILcdModel
(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 aTLcdGXYLayerTreeNode
.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 intoILcdGXYLayer
(s).aUserLayer
- the user-defined SLD layer for which this is doneaStyle
- the style to be used.aRequestContext
- the servlet request context.- Returns:
- a
ILcdGXYLayer
representing aILcdModel
on aILcdGXYView
.
-