Class WmsCapabilities

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

public final class WmsCapabilities extends Object implements AutoCloseable
Encapsulates the capabilities of a WMS source.

Remarks
See WmsCapabilities#getCapabilities for a way of obtaining such information.
See Also:
  • Method Details

    • finalize

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

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

      @NotNull public static WmsCapabilities getCapabilities(@NotNull String url) throws IOException
      Returns the capabilities of a given WMS url if it can be retrieved.
      Parameters:
      url - The source's base url from which capabilities have to be retrieved.
      Returns:
      capabilities parsed from the server.
      Throws:
      IOException - when retrieving or parsing the capabilities fails.
    • getCapabilities

      @NotNull public static WmsCapabilities getCapabilities(@NotNull String url, @NotNull WmsModelDecoderOptions options) throws IOException
      Returns the capabilities of a given WMS url if it can be retrieved.
      Parameters:
      url - The source's base url from which capabilities have to be retrieved.
      options - Options for decoding WMS data, e.g. an optional http client implementation to send HTTP requests when fetching WMS resources.
      Returns:
      capabilities parsed from the server.
      Throws:
      IOException - when retrieving or parsing the capabilities fails.
      Since:
      2023.0
    • getTopLevelLayer

      @Nullable public WmsLayer getTopLevelLayer()
      Returns the top layer if any.
      Returns:
      the top layer or null.
    • getServerUrl

      @NotNull public String getServerUrl()
      Returns the entry url for the server.
      Returns:
      the entry url for the server.
    • getMapFormats

      @NotNull public List<@NotNull String> getMapFormats()
      Returns the all available formats for a GetMap request.
      Returns:
      the available map formats.
    • getVersion

      @NotNull public String getVersion()
      Returns the capabilities specification version.

      The current supported version are "1.1.1" and "1.3.0".

      Returns:
      the capabilities specification version.