deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.ogcwebservices.wfs.operation
Class AbstractWFSRequest

java.lang.Object
  extended by org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
      extended by org.deegree.ogcwebservices.wfs.operation.AbstractWFSRequest
All Implemented Interfaces:
Serializable, OGCWebServiceRequest
Direct Known Subclasses:
DescribeFeatureType, GetFeature, GetGmlObject, LockFeature, Transaction

public class AbstractWFSRequest
extends AbstractOGCWebServiceRequest

Abstract base class for requests to web feature services.

Version:
$Revision: 18323 $, $Date: 2009-07-06 14:25:03 +0200 (Mo, 06. Jul 2009) $
Author:
Andreas Poth , Markus Schneider , last edited by: $Author: aschmitz $
See Also:
Serialized Form

Field Summary
static String FORMAT_GML2
          GML2 format *
static String FORMAT_GML2_WFS100
          GML2 format (WFS 1.00 style) *
static String FORMAT_GML3
          GML3 format *
static String FORMAT_XML
          Generic XML format *
 
Constructor Summary
protected AbstractWFSRequest(String version, String id, String handle, Map<String,String> vendorSpecificParameter)
          Creates a new AbstractWFSRequest instance.
 
Method Summary
protected static void checkServiceParameter(Map<String,String> model)
          Checks that the "SERVICE" parameter value equals the name of the service.
protected static String checkVersionParameter(Map<String,String> model)
          Checks that the "VERSION" parameter value equals a supported version.
protected static Filter extractBBOXFilter(Map<String,String> model)
          Extracts a Filter from the BBOX parameter.
protected static Map<QualifiedName,Filter> extractFilters(Map<String,String> kvp, QualifiedName[] typeNames)
          Extracts the FILTER parameter and assigns them to the requested type names.
protected static NamespaceContext extractNamespaceParameter(Map<String,String> model)
          Extracts the namespace bindings from the NAMESPACE parameter.
protected static QualifiedName[] extractTypeNames(Map<String,String> kvp)
          Extracts the qualified type names from the TYPENAME parameter.
 String getHandle()
          Returns the value of the handle attribute.
 String getServiceName()
          Returns the value of the service attribute (WFS).
 
Methods inherited from class org.deegree.ogcwebservices.AbstractOGCWebServiceRequest
getId, getParam, getParamAsInt, getParamValues, getRequestParameter, getRequiredParam, getVendorSpecificParameter, getVendorSpecificParameters, getVersion, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_GML2

public static String FORMAT_GML2
GML2 format *


FORMAT_GML2_WFS100

public static String FORMAT_GML2_WFS100
GML2 format (WFS 1.00 style) *


FORMAT_GML3

public static String FORMAT_GML3
GML3 format *


FORMAT_XML

public static String FORMAT_XML
Generic XML format *

Constructor Detail

AbstractWFSRequest

protected AbstractWFSRequest(String version,
                             String id,
                             String handle,
                             Map<String,String> vendorSpecificParameter)
Creates a new AbstractWFSRequest instance.

Parameters:
version -
id -
handle -
vendorSpecificParameter -
Method Detail

getServiceName

public String getServiceName()
Returns the value of the service attribute (WFS).

Returns:
the value of the service attribute (WFS)

getHandle

public String getHandle()
Returns the value of the handle attribute.

The purpose of the handle attribute is to allow a client application to associate a mnemonic name with a request for error handling purposes. If a handle is specified, and an exception is encountered, a Web Feature Service may use the handle to identify the offending element.

Returns:
the value of the handle attribute

checkVersionParameter

protected static String checkVersionParameter(Map<String,String> model)
                                       throws InvalidParameterValueException,
                                              MissingParameterValueException
Checks that the "VERSION" parameter value equals a supported version.

Parameters:
model - contains the parameters of the request
Returns:
value for "VERSION" parameter, never null
Throws:
InvalidParameterValueException
MissingParameterValueException

checkServiceParameter

protected static void checkServiceParameter(Map<String,String> model)
                                     throws InconsistentRequestException,
                                            MissingParameterValueException
Checks that the "SERVICE" parameter value equals the name of the service. TODO move this to AbstractOGCWebServiceRequest

Parameters:
model - contains the parameters of the request
Throws:
InconsistentRequestException - if parameter is not present or does not the service name
MissingParameterValueException

extractTypeNames

protected static QualifiedName[] extractTypeNames(Map<String,String> kvp)
                                           throws InvalidParameterValueException
Extracts the qualified type names from the TYPENAME parameter.

Parameters:
kvp -
Returns:
qualified type names (empty array if TYPENAME parameter is not present)
Throws:
InvalidParameterValueException

extractNamespaceParameter

protected static NamespaceContext extractNamespaceParameter(Map<String,String> model)
                                                     throws InvalidParameterValueException
Extracts the namespace bindings from the NAMESPACE parameter.

Example:

The default namespace may also be bound (two variants are supported):

Parameters:
model - the parameters of the request
Returns:
namespace context
Throws:
InvalidParameterValueException

extractBBOXFilter

protected static Filter extractBBOXFilter(Map<String,String> model)
                                   throws InvalidParameterValueException
Extracts a Filter from the BBOX parameter. TODO handle other dimension count and crs

Parameters:
model -
Returns:
filter representing the BBOX parameter (null, if no BBOX parameter specified)
Throws:
InvalidParameterValueException

extractFilters

protected static Map<QualifiedName,Filter> extractFilters(Map<String,String> kvp,
                                                          QualifiedName[] typeNames)
                                                   throws InvalidParameterValueException
Extracts the FILTER parameter and assigns them to the requested type names.

This is necessary, because it is allowed to specify a filter for each requested feature type.

Parameters:
kvp -
typeNames -
Returns:
map with the assignments of type names to filters
Throws:
InvalidParameterValueException

deegree 2.3 (2010/04/09 10:10 build-4-official)

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