Class WmsDetailedConfig

java.lang.Object
thredds.server.wms.config.WmsDetailedConfig

public class WmsDetailedConfig extends Object
Parse and provide interface to wmsConfig.xml wmsConfig.xml allows a TDS Admin a way to set default values to be used for generating images from the wms service. The following properties can be set in the global defaults section:
  • allowFeatureInfo
  • defaultColorScaleRange
  • defaultAboveMaxColor
  • defaultBelowMinColor
  • defaultNoDataColor
  • defaultOpacity
  • defaultPaletteName
  • defaultNumColorBands
  • logScaling
  • intervalTime
The global default settings, except for allowFeatureInfo, can be overridden by matching standard_name attribute of a variable. All settings can be overridden by matching on TDS URL path. Finally, with the exception of allowFeatureInfo, settings can be overridden by matching on the variable name. The order of precedence on which settings are determined is as follows: default < standard_name match < url path match < variable name match
  • Method Details

    • fromLocation

      @Nullable public static WmsDetailedConfig fromLocation(String wmsConfigFileLocation)
      Parses the XML file from the given location on disk.
      Returns:
      a new WmsDetailedConfig object, if and only if parsing was successful.
    • loadFromStream

      public static WmsDetailedConfig loadFromStream(InputStream in)
      Load wmsConfig.xml from its InputStream
      Parameters:
      in - InputStream of the wmsConfig.xml file
      Returns:
      A new WmdDetailedConfig object. May be empty if there is an issue parsing wmsConfig.xml
    • getSettings

      public LayerSettings getSettings(ThreddsWmsCatalogue layer, uk.ac.rdg.resc.edal.metadata.VariableMetadata variableMetadata)
      Gets the settings for the given ThreddsWmsCatalogue. None of the fields will be null in the returned object.
      Parameters:
      layer - WMS catalog associated with the layer
      variableMetadata - metadata associated with the layer
      Returns:
      Visualization settings associated with the layer