deegree 2.5 (2011/06/29 09:44 build-8-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:
java.io.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 java.lang.String FORMAT_GML2
          GML2 format *
static java.lang.String FORMAT_GML2_WFS100
          GML2 format (WFS 1.00 style) *
static java.lang.String FORMAT_GML3
          GML3 format *
static java.lang.String FORMAT_XML
          Generic XML format *
 
Constructor Summary
protected AbstractWFSRequest(java.lang.String version, java.lang.String id, java.lang.String handle, java.util.Map<java.lang.String,java.lang.String> vendorSpecificParameter)
          Creates a new AbstractWFSRequest instance.
 
Method Summary
protected static void checkServiceParameter(java.util.Map<java.lang.String,java.lang.String> model)
          Checks that the "SERVICE" parameter value equals the name of the service.
protected static java.lang.String checkVersionParameter(java.util.Map<java.lang.String,java.lang.String> model)
          Checks that the "VERSION" parameter value equals a supported version.
protected static Filter extractBBOXFilter(java.util.Map<java.lang.String,java.lang.String> model)
          Extracts a Filter from the BBOX parameter.
protected static java.util.Map<QualifiedName,Filter> extractFilters(java.util.Map<java.lang.String,java.lang.String> kvp, QualifiedName[] typeNames)
          Extracts the FILTER parameter and assigns them to the requested type names.
protected static NamespaceContext extractNamespaceParameter(java.util.Map<java.lang.String,java.lang.String> model)
          Extracts the namespace bindings from the NAMESPACE parameter.
protected static QualifiedName[] extractTypeNames(java.util.Map<java.lang.String,java.lang.String> kvp)
          Extracts the qualified type names from the TYPENAME parameter.
 java.lang.String getHandle()
          Returns the value of the handle attribute.
 java.lang.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 java.lang.String FORMAT_GML2
GML2 format *


FORMAT_GML2_WFS100

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


FORMAT_GML3

public static java.lang.String FORMAT_GML3
GML3 format *


FORMAT_XML

public static java.lang.String FORMAT_XML
Generic XML format *

Constructor Detail

AbstractWFSRequest

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

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

getServiceName

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

Returns:
the value of the service attribute (WFS)

getHandle

public java.lang.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 java.lang.String checkVersionParameter(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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 java.util.Map<QualifiedName,Filter> extractFilters(java.util.Map<java.lang.String,java.lang.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.5 (2011/06/29 09:44 build-8-official)

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