Class WmsDataSource

java.lang.Object
com.luciad.formats.wms.WmsDataSource
All Implemented Interfaces:
AutoCloseable

public final class WmsDataSource extends Object implements AutoCloseable
Data source representation for a WMS, with one or more layers.

The WMS data source requires as a minimum:

  • The URL location of the WMS.
  • One or more layers.

By default the data source is configured to request images from the WMS server with a transparent background.

See Also:
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • newBuilder

      @NotNull public static WmsDataSource.Builder newBuilder()
      Returns the builder class for creation of the WMS data source.
      Returns:
      the builder class for creation of the WMS data source.
    • getUrl

      @NotNull public String getUrl()
      Returns the base URL of the WMS data source.
      Returns:
      the base URL of the WMS data source.
    • getLayers

      @NotNull public List<@NotNull WmsDataSource.Layer> getLayers()
      Returns the list of WMS layers to load.

      The layers are ordered from bottom to top.

      Returns:
      the list of WMS layers to load.
    • getFormat

      @Nullable public String getFormat()
      Returns the image format that should be used when decoding the WMS layer.

      A null return value indicates the format should be auto-detected.

      Returns:
      the image format that should be used when decoding the WMS layer. A null return value indicates the format should be auto-detected.
    • isTransparent

      public boolean isTransparent()
      Returns whether the WMS is requested to return an image with a transparent background.
      Returns:
      whether the WMS is requested to return an image with a transparent background.
    • getStyledLayerDescriptor

      @Nullable public String getStyledLayerDescriptor()
      Returns the Styled Layer Descriptor to use or null if not set.
      Returns:
      The Styled Layer Descriptor to use or null if not set.
    • getStyledLayerDescriptorUrl

      @Nullable public String getStyledLayerDescriptorUrl()
      Returns the Styled Layer Descriptor URL to use or null if not set.
      Returns:
      The Styled Layer Descriptor URL to use or null if not set.