|
deegree 2.2 (2008/12/22 11:33 build-3038-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.ogcwebservices.AbstractOGCWebServiceRequest
public abstract class AbstractOGCWebServiceRequest
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.
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 |
---|
protected AbstractOGCWebServiceRequest(String version, String id, Map<String,String> vendorSpecificParameter)
AbstractOGCWebServiceRequest
.
version
- id
- vendorSpecificParameter
- Method Detail |
---|
public String getId()
getId
in interface OGCWebServiceRequest
public String getVersion()
getVersion
in interface OGCWebServiceRequest
public Map<String,String> getVendorSpecificParameters()
getVendorSpecificParameters
in interface OGCWebServiceRequest
public String getVendorSpecificParameter(String name)
getVendorSpecificParameter
in interface OGCWebServiceRequest
name
- the "key" of a vsp
public String getRequestParameter() throws OGCWebServiceException
getRequestParameter
in interface OGCWebServiceRequest
OGCWebServiceException
protected static String getParam(String name, Map<String,String> kvp, String defaultValue)
String
parameter value from the given parameter map. If the given
parameter does not exist, the also submitted default value is returned.
name
- name of the parameter to be looked upkvp
- must contain Strings as keys and Strings as valuesdefaultValue
- default value to be used if parameter is missing
protected static String[] getParamValues(String name, Map<String,String> kvp, String defaultValue)
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.
name
- name of the parameter to be looked upkvp
- must contain Strings as keys and Strings as valuesdefaultValue
- default value to be used if parameter is missing
protected static String getRequiredParam(String name, Map<String,String> kvp) throws MissingParameterValueException
String
parameter value from the given parameter map. Generates
exceptions with descriptive messages, if the parameter does not exist in the Map
.
name
- name of the parameter to be looked upkvp
- must contain Strings as keys and Strings as values
MissingParameterValueException
protected static int getParamAsInt(String name, Map<String,String> kvp, int defaultValue) throws InvalidParameterValueException
int
parameter value from the given parameter map. If the given
parameter does not exist, the also submitted default value is returned.
name
- name of the parameter to be looked upkvp
- must contain Strings as keys and Strings as valuesdefaultValue
- default value to be used if parameter is missing
InvalidParameterValueException
public String toString()
toString
in class Object
|
deegree 2.2 (2008/12/22 11:33 build-3038-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://deegree.sourceforge.net