WmsUrlValidator (A library with several utility classes to work with geo-spatial data: WmsUrlValidator, GeoGetStyles, etc.. 1.0.0-SNAPSHOT API)
Date: 2016-01-29

org.gcube.spatial.data.geoutility.wms

## Class WmsUrlValidator

- java.lang.Object
- - org.gcube.spatial.data.geoutility.wms.WmsUrlValidator

-     public class WmsUrlValidator
      extends Object

  The Class WmsUrlValidator.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 25, 2016

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.apache.log4j.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WmsUrlValidator(String wmsRequest)` Instantiates a new wms url validator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getBaseWmsServiceUrl()` Gets the base wms service url.
    `Map<String,String>` | `getMapWmsNoStandardParams()` Gets the map wms no standard params.
    `HashMap<String,String>` | `getMapWmsParameters()` Gets the map wms parameters.
    `List<String>` | `getStylesAsList()` Gets the styles as list.
    `static String` | `getValueOfParameter(WmsParameters wmsParam, String wmsRequestParamaters)` Gets the value of parameter.
    `String` | `getValueOfParsedWMSParameter(WmsParameters parameter)` Gets the value of parsed wms parameter.
    `String` | `getWmsNoStandardParameters()` Gets the wms no standard parameters.
    `String` | `getWmsRequest()` Gets the wms request.
    `static void` | `main(String[] args)` The main method.
    `String` | `parseWmsRequest(boolean returnEmptyParameter, boolean fillEmptyParameterAsDefaultValue)` Parses the wms request.
    `static String` | `setValueOfParameter(WmsParameters wmsParam, String wmsRequestParameters, String newValue, boolean addIfNotExists)` Sets the value of parameter.
    `String` | `toString()`
    `static String` | `validateValueOfParameter(WmsParameters wmsParam, String valueOfParameter, boolean fillEmptyParameterAsDefaultValue)` Validate value of parameter.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### logger

          public static org.apache.log4j.Logger logger

  - ### Constructor Detail

    - #### WmsUrlValidator

          public WmsUrlValidator(String wmsRequest)

      Instantiates a new wms url validator.
      Parameters:
        `wmsRequest` - the wms request

  - ### Method Detail

    - #### parseWmsRequest

          public String parseWmsRequest(boolean returnEmptyParameter,
                               boolean fillEmptyParameterAsDefaultValue)
                                 throws Exception

      Parses the wms request.
      Parameters:
        `returnEmptyParameter` - the return empty parameter
        `fillEmptyParameterAsDefaultValue` - the fill empty parameter as default
      Returns:
        the wms request uri builded
      Throws:
        `Exception` - the exception

    - #### getMapWmsParameters

          public HashMap<String,String> getMapWmsParameters()

      Gets the map wms parameters.
      Returns:
        the map wms parameters

    - #### getWmsRequest

          public String getWmsRequest()

      Gets the wms request.
      Returns:
        the wmsRequest

    - #### getBaseWmsServiceUrl

          public String getBaseWmsServiceUrl()

      Gets the base wms service url.
      Returns:
        the baseWmsServiceUrl

    - #### getWmsNoStandardParameters

          public String getWmsNoStandardParameters()

      Gets the wms no standard parameters.
      Returns:
        the wms no standard parameters like a query string (param1=value1¶m2=value2&...)

    - #### getValueOfParsedWMSParameter

          public String getValueOfParsedWMSParameter(WmsParameters parameter)

      Gets the value of parsed wms parameter.
      Parameters:
        `parameter` - the parameter
      Returns:
        the value of parsed wms parameter parsed from wms request.

    - #### validateValueOfParameter

          public static String validateValueOfParameter(WmsParameters wmsParam,
                                        String valueOfParameter,
                                        boolean fillEmptyParameterAsDefaultValue)

      Validate value of parameter.
      Parameters:
        `wmsParam` - the wms param
        `valueOfParameter` - the value of parameter
        `fillEmptyParameterAsDefaultValue` - the fill empty parameter as default value
      Returns:
        the string

    - #### getValueOfParameter

          public static String getValueOfParameter(WmsParameters wmsParam,
                                   String wmsRequestParamaters)

      Gets the value of parameter.
      Parameters:
        `wmsParam` - the wms param
        `wmsRequestParamaters` - the url wms parameters
      Returns:
        the value of parameter or null if parameter not exists

    - #### setValueOfParameter

          public static String setValueOfParameter(WmsParameters wmsParam,
                                   String wmsRequestParameters,
                                   String newValue,
                                   boolean addIfNotExists)

      Sets the value of parameter.
      Parameters:
        `wmsParam` - the wms param
        `wmsRequestParameters` - the wms url parameters
        `newValue` - the new value
        `addIfNotExists` - add the parameter if not exists
      Returns:
        the string

    - #### getStylesAsList

          public List<String> getStylesAsList()

      Gets the styles as list.
      Returns:
        the styles as list

    - #### getMapWmsNoStandardParams

          public Map<String,String> getMapWmsNoStandardParams()

      Gets the map wms no standard params.
      Returns:
        an empty map if WMS no standard parameters don't exist

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### main

          public static void main(String[] args)

      The main method.
      Parameters:
        `args` - the arguments

Copyright © 2016. All Rights Reserved.