Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.ogcwebservices
Class AbstractOGCWebServiceRequest

    java.lang.Object
      org.deegree.ogcwebservices.AbstractOGCWebServiceRequest

All Implemented Interfaces:
  Serializable, OGCWebServiceRequest

Direct Known Subclasses:
  AbstractCSWRequest, AbstractRequest, AbstractWFSRequest, DescribePlatformRequest, DescribeSensorRequest, DescribeUser, Get3DFeatureInfo, GetCapabilities, GetObservationRequest, Harvest, Transaction, WCSRequestBase, WCTSRequestBase, WMPSRequestBase, WMSRequestBase, WPSRequestBaseType, WPVSRequestBase

    public abstract class AbstractOGCWebServiceRequest

extends Object
implements OGCWebServiceRequest, Serializable

This is the abstract base class for all requests to OGC Web Services (OWS).

Contains utility methods to ease the extraction of values from KVP parameter maps.

Version:
  $Revision: 26212 $, $Date: 2010-08-27 14:00:42 +0200 (Fr, 27. Aug 2010) $
Author:
  Katharina Lupp , last edited by: $Author: apoth $
See Also:
  Serialized Form

Constructor Summary
`protected` | `AbstractOGCWebServiceRequest(String version, String id, Map<String,String> vendorSpecificParameter)` Creates a new instance of `AbstractOGCWebServiceRequest`.

Method Summary
`String` | `getId()` returns the ID of a request
`protected static String` | `getParam(String name, Map<String,String> kvp, String defaultValue)` Extracts a `String` parameter value from the given parameter map.
`protected static int` | `getParamAsInt(String name, Map<String,String> kvp, int defaultValue)` Extracts an `int` parameter value from the given parameter map.
`protected static String[]` | `getParamValues(String name, Map<String,String> kvp, String defaultValue)` Extracts a `String` list from the given parameter map.
`String` | `getRequestParameter()` returns the URI of a HTTP GET request.
`protected static String` | `getRequiredParam(String name, Map<String,String> kvp)` Extracts a `String` parameter value from the given parameter map.
`String` | `getVendorSpecificParameter(String name)` Finally, the requests allow for optional vendor-specific parameters (VSPs) that will enhance the results of a request.
`Map<String,String>` | `getVendorSpecificParameters()` Finally, the requests allow for optional vendor-specific parameters (VSPs) that will enhance the results of a request.
`String` | `getVersion()` returns the requested service version
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.deegree.ogcwebservices.OGCWebServiceRequest
`getServiceName`

Constructor Detail

### AbstractOGCWebServiceRequest

    protected AbstractOGCWebServiceRequest(String version,
                                           String id,
                                           Map<String,String> vendorSpecificParameter)

  Creates a new instance of `AbstractOGCWebServiceRequest`.

  Parameters:
    `version` -
    `id` -
    `vendorSpecificParameter` -

Method Detail

### getId

    public String getId()

  returns the ID of a request

  Specified by:
    `getId` in interface `OGCWebServiceRequest`
  Returns:
    the ID of a request

### getVersion

    public String getVersion()

  returns the requested service version

  Specified by:
    `getVersion` in interface `OGCWebServiceRequest`
  Returns:
    the requested service version

### getVendorSpecificParameters

    public Map<String,String> getVendorSpecificParameters()

  Finally, the requests allow for optional vendor-specific parameters (VSPs) that will enhance the results of a request. Typically, these are used for private testing of non-standard functionality prior to possible standardization. A generic client is not required or expected to make use of these VSPs.

  Specified by:
    `getVendorSpecificParameters` in interface `OGCWebServiceRequest`
  Returns:
    the vendor specific parameters

### getVendorSpecificParameter

    public String getVendorSpecificParameter(String name)

  Finally, the requests allow for optional vendor-specific parameters (VSPs) that will enhance the results of a request. Typically, these are used for private testing of non-standard functionality prior to possible standardization. A generic client is not required or expected to make use of these VSPs.

  Specified by:
    `getVendorSpecificParameter` in interface `OGCWebServiceRequest`
  Parameters:
    `name` - the "key" of a vsp
  Returns:
    the value requested by the key

### getRequestParameter

    public String getRequestParameter()
                               throws OGCWebServiceException

  returns the URI of a HTTP GET request. If the request doesn't support HTTP GET a `WebServiceException` will be thrown

  Specified by:
    `getRequestParameter` in interface `OGCWebServiceRequest`
  Returns:
    the URI of a HTTP GET request. If the request doesn't support HTTP GET a `WebServiceException` will be thrown
  Throws:
    `OGCWebServiceException`

### getParam

    protected static String getParam(String name,
                                     Map<String,String> kvp,
                                     String defaultValue)

  Extracts a `String` parameter value from the given parameter map. If the given parameter does not exist, the also submitted default value is returned.

  Parameters:
    `name` - name of the parameter to be looked up
    `kvp` - must contain Strings as keys and Strings as values
    `defaultValue` - default value to be used if parameter is missing
  Returns:
    parameter value

### getParamValues

    protected static String[] getParamValues(String name,
                                             Map<String,String> kvp,
                                             String defaultValue)

  Extracts a `String` list from the given parameter map. The single values are separated by commas. If the given parameter does not exist, the also submitted default value is returned.

  Parameters:
    `name` - name of the parameter to be looked up
    `kvp` - must contain Strings as keys and Strings as values
    `defaultValue` - default value to be used if parameter is missing
  Returns:
    parameter value

### getRequiredParam

    protected static String getRequiredParam(String name,
                                             Map<String,String> kvp)
                                      throws MissingParameterValueException

  Extracts a `String` parameter value from the given parameter map. Generates exceptions with descriptive messages, if the parameter does not exist in the `Map`.

  Parameters:
    `name` - name of the parameter to be looked up
    `kvp` - must contain Strings as keys and Strings as values
  Returns:
    parameter value
  Throws:
    `MissingParameterValueException`

### getParamAsInt

    protected static int getParamAsInt(String name,
                                       Map<String,String> kvp,
                                       int defaultValue)
                                throws InvalidParameterValueException

  Extracts an `int` parameter value from the given parameter map. If the given parameter does not exist, the also submitted default value is returned.

  Parameters:
    `name` - name of the parameter to be looked up
    `kvp` - must contain Strings as keys and Strings as values
    `defaultValue` - default value to be used if parameter is missing
  Returns:
    parameter value
  Throws:
    `InvalidParameterValueException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org