Class WmtsDataSource.Builder

java.lang.Object
com.luciad.formats.wmts.WmtsDataSource.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
WmtsDataSource

public static final class WmtsDataSource.Builder extends Object implements AutoCloseable
Builder for creating WmtsDataSource.
  • Constructor Details

  • Method Details

    • finalize

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

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

      @NotNull public WmtsDataSource.Builder layer(@NotNull String layer)
      Sets the layer to use within the WMTS data provided by the source.

      An empty layer name will link to the first layer described in the capabilities.

      Remarks
      An empty layer name will link to the first layer described in the capabilities.
      Parameters:
      layer - Layer to use within the WMTS data provided by the source.
    • style

      @NotNull public WmtsDataSource.Builder style(@NotNull String style)
      Sets the style to use within the WMTS data provided by the source.

      An empty style name will link to the default layer style.

      Remarks
      An empty style name will link to the default layer style.
      Parameters:
      style - Style to use within the WMTS data provided by the source.
    • format

      @NotNull public WmtsDataSource.Builder format(@NotNull String format)
      Sets the preferred format to request images.

      If specified and if the layer offers specified format, it will be selected as a preference when requesting images.

      Remarks
      If specified and if the layer offers specified format, it will be selected as a preference when requesting images.
      Parameters:
      format - Preferred format to request images.
    • url

      @NotNull public WmtsDataSource.Builder url(@NotNull String url)
      Sets the base URL of the WMTS data source.

      Calling this function is mandatory.

      Parameters:
      url - the base URL of the WMTS data source. Calling this function is mandatory.
      Returns:
      this builder.
    • build

      @NotNull public WmtsDataSource build() throws IllegalStateException
      Build the wmts data source.

      After calling this function, this builder should no longer be used.

      Returns:
      the wmts data source.
      Throws:
      IllegalStateException - If not all mandatory parameters are set.