public static class TLcdWMSDataSource.Builder extends Object
TLcdWMSDataSource
instances.
By default, all values are null
. The default value for transparency is true
.
The default value for invertXYForEPSG4326
is true
to comply with the WMS 1.3.0 specification.
The class documentation of TLcdWMSDataSource
documents the minimum requirement for building a TLcdWMSDataSource
.
TLcdWMSDataSource
Modifier and Type | Method and Description |
---|---|
TLcdWMSDataSource.Builder |
addLayer(String aLayerId)
Adds a WMS layer to load.
|
TLcdWMSDataSource.Builder |
addLayer(String aLayerId,
String aLayerStyle)
Adds a WMS layer to load.
|
TLcdWMSDataSource.Builder |
addLayer(String aLayerId,
String aLayerStyle,
boolean aVisible)
Adds a WMS layer to load.
|
TLcdWMSDataSource.Builder |
addLayer(String aLayerId,
String aLayerStyle,
boolean aVisible,
boolean aQueryable)
Adds a WMS layer to load.
|
TLcdWMSDataSource.Builder |
all(TLcdWMSDataSource aDataSource)
Initializes this builder to the values of the given
TLcdWMSDataSource . |
TLcdWMSDataSource |
build()
Create the
TLcdWMSDataSource instance that corresponds to the values in this
builder. |
TLcdWMSDataSource.Builder |
format(String aFormat)
Specify the image format.
|
TLcdWMSDataSource.Builder |
invertXYForEPSG4326(boolean aInvertXYForEPSG4326)
Specify if the bounding box coordinates should be inverted for EPSG:4326.
|
TLcdWMSDataSource.Builder |
layer(String aLayerId,
String aLayerStyle,
boolean aVisible)
Deprecated.
Since 2020.1.05: use
addLayer(String, String, boolean) instead. |
TLcdWMSDataSource.Builder |
styledLayerDescriptor(String aStyledLayerDescriptor)
Specify the styled layer descriptor serialized as a string.
|
TLcdWMSDataSource.Builder |
transparent(boolean aTransparent)
Specify if the image should have a transparent background.
|
TLcdWMSDataSource.Builder |
uri(String aUri)
Specify the URI of the WMS server.
|
TLcdWMSDataSource.Builder |
uri(URI aUri)
Specify the URI of the WMS server.
|
public TLcdWMSDataSource.Builder uri(URI aUri)
If the URI's query parameters contain layer
, style
or format
parameters, those are set
on this builder as well.
For example, http://hostname:8080/Luciad/WMS?layer=myLayer
specifies myLayer
.
aUri
- The URI of the WMSpublic TLcdWMSDataSource.Builder uri(String aUri)
aUri
- The URI of the WMSpublic TLcdWMSDataSource.Builder addLayer(String aLayerId, String aLayerStyle, boolean aVisible, boolean aQueryable)
Use ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities.
This argument is optional and may be null
.aVisible
- If the layer is visible.aQueryable
- If the layer should be queried.public TLcdWMSDataSource.Builder addLayer(String aLayerId, String aLayerStyle, boolean aVisible)
Use ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities.
This argument is optional and may be null
.aVisible
- If the layer is visible.addLayer(String, String, boolean, boolean)
public TLcdWMSDataSource.Builder layer(String aLayerId, String aLayerStyle, boolean aVisible)
addLayer(String, String, boolean)
instead. Use ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities.
This argument is optional and may be null
.aVisible
- If the layer is visible.addLayer(String, String, boolean)
,
addLayer(String, String, boolean, boolean)
public TLcdWMSDataSource.Builder addLayer(String aLayerId, String aLayerStyle)
Use ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities.
This argument is optional and may be null
.addLayer(String, String, boolean, boolean)
public TLcdWMSDataSource.Builder addLayer(String aLayerId)
Use ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.
aLayerId
- A WMS layer id.addLayer(String, String, boolean, boolean)
public TLcdWMSDataSource.Builder format(String aFormat)
Use ALcdOGCWMSCapabilities.getSupportedMapFormat(int)
to query the available formats.
aFormat
- A formatpublic TLcdWMSDataSource.Builder transparent(boolean aTransparent)
aTransparent
- if the image should have a transparent background.public TLcdWMSDataSource.Builder styledLayerDescriptor(String aStyledLayerDescriptor)
aStyledLayerDescriptor
- the styled layer descriptor string representation.public TLcdWMSDataSource.Builder invertXYForEPSG4326(boolean aInvertXYForEPSG4326)
aInvertXYForEPSG4326
- if the coordinates should be inverted to express the BBOX for the EPSG:4326 CRS.public TLcdWMSDataSource.Builder all(TLcdWMSDataSource aDataSource)
TLcdWMSDataSource
.aDataSource
- The data source instance to copypublic TLcdWMSDataSource build()
TLcdWMSDataSource
instance that corresponds to the values in this
builder.
You have to at least specify a uri(java.net.URI)
and either one or more layers or a Styled Layer Descriptor before building the instance.
IllegalArgumentException
- if the minimum requirements for building a TLcdWMSDataSource are not met.