Class WmsRequestBuilder

java.lang.Object
de.latlon.ets.wms13.core.util.request.WmsRequestBuilder

public final class WmsRequestBuilder extends Object
Creates WMS requests
Author:
Lyn Goltz
  • Method Details

    • buildGetFeatureInfoRequest

      public static WmsKvpRequest buildGetFeatureInfoRequest(Document wmsCapabilities, List<LayerInfo> layerInfos)
      Creates a GetFatureInfo request with random parameters from the WMS Capabilities.
      Parameters:
      wmsCapabilities - the capabilities of the WMS, never null
      layerInfos - the parsed layerInfos, never null
      Returns:
      a GetFeatureInfo request with random parameters, never null
    • buildGetFeatureInfoRequest

      public static WmsKvpRequest buildGetFeatureInfoRequest(Document wmsCapabilities, List<LayerInfo> layerInfos, String format)
      Creates a GetFatureInfo request with random parameters from the WMS Capabilities.
      Parameters:
      wmsCapabilities - the capabilities of the WMS, never null
      layerInfos - the parsed layerInfos, never null
      format - the format to use, never null, if the format is not supported by the WMS, the assertion fails
      Returns:
      a GetFeatureInfo request with random parameters, never null
    • buildGetMapRequest

      public static WmsKvpRequest buildGetMapRequest(Document wmsCapabilities, List<LayerInfo> layerInfos)
      Creates a GetMap request with random parameters from the WMS Capabilities.
      Parameters:
      wmsCapabilities - the capabilities of the WMS, never null
      layerInfos - the parsed layerInfos, never null
      Returns:
      a GetMap request with random parameters, never null
    • getSupportedFormat

      public static String getSupportedFormat(Document wmsCapabilities, String opName)
      Parameters:
      wmsCapabilities - the capabilities of the WMS, never null
      opName - /tegeoinfoGetMapTp-116 the name of the operation, never null
      Returns:
      one of the supported formats of the operation, null if no format is specified
    • getSupportedTransparentFormat

      public static String getSupportedTransparentFormat(Document wmsCapabilities, String opName)
      Parameters:
      wmsCapabilities - the capabilities of the WMS, never null
      opName - the name of the operation, never null
      Returns:
      one of the supported formats of the operation, supports transparency, null if no format is specified or no format supporting transparency is configured
    • findBoundingBox

      public static BoundingBox findBoundingBox(LayerInfo layerInfo)
      Parameters:
      layerInfo - to retrieve the bbox from, never null
      Returns:
      one if the BoundingBox of the layer, never null