org.deegree_impl.services.gazetteer.protocol
Class WFSGProtocolFactory

java.lang.Object
  extended byorg.deegree_impl.services.gazetteer.protocol.WFSGProtocolFactory

public class WFSGProtocolFactory
extends java.lang.Object

Version:
$Revision: 1.6 $
Author:
AxxL, Andreas Poth

Field Summary
private static java.lang.String DESCRIBEFEATURE
           
private static java.lang.String GETCAPABILITIES
           
private static java.lang.String GETFEATURE
           
private static WFSNative NATIVE_
           
private static java.lang.String ogcNS
           
private static java.lang.String TRANSACTION
           
private static java.util.HashMap VENDORSPECIFICPARAMETER
           
private static java.lang.String WFS_VERSION
           
private static java.lang.String wfsNS
           
 
Constructor Summary
WFSGProtocolFactory()
           
 
Method Summary
static OGCWebServiceRequest createRequest(java.lang.String id, java.io.Reader reader)
          creates a WFS request from a reader that contains an XML encoded form of the request
static WFSGDescribeFeatureTypeRequest createWFSGDescribeFeatureTypeRequest(java.lang.String id, org.w3c.dom.Document doc)
           
static WFSGDescribeFeatureTypeRequest createWFSGDescribeFeatureTypeRequest(java.lang.String version, java.lang.String id, java.util.HashMap vendorSpecificParameter, WFSNative native_, java.lang.String outputFormat, java.lang.String[] typeNames)
          creates a WFSDescribeFeatureTypeRequest object.
static WFSGGetCapabilitiesRequest createWFSGGetCapabilitiesRequest(java.lang.String id)
           
static WFSGGetCapabilitiesResponse createWFSGGetCapabilitiesResponse(WFSGGetCapabilitiesRequest request, org.w3c.dom.Document exception)
           
static WFSGGetCapabilitiesResponse createWFSGGetCapabilitiesResponse(WFSGGetCapabilitiesRequest request, WFSGCapabilities capa)
           
static WFSGGetFeatureRequest createWFSGGetFeatureRequest(java.lang.String id, org.w3c.dom.Document doc)
           
static WFSGGetFeatureResponse createWFSGGetFeatureResponse(OGCWebServiceRequest request, java.lang.String[] affectedFeatureTypes, OGCWebServiceException exception, java.lang.Object response)
          creates a WFSGetFeatureResponse object
static Filter getFilter(org.w3c.dom.Element element)
          returns the filter that limits the query
static WFSNative getNative(org.w3c.dom.Element element)
          The element is intended to allow access to vendor specific capabilities of any particular web feature server or datastore.
private static java.lang.String[] getPropertyNames(org.w3c.dom.Element element)
          The property names is used to enumerate the feature properties or attributes that should be selected.
private static WFSQuery[] getQuery(org.w3c.dom.Element element)
          The query defines which feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wfsNS

private static final java.lang.String wfsNS
See Also:
Constant Field Values

ogcNS

private static final java.lang.String ogcNS
See Also:
Constant Field Values

GETCAPABILITIES

private static final java.lang.String GETCAPABILITIES
See Also:
Constant Field Values

DESCRIBEFEATURE

private static final java.lang.String DESCRIBEFEATURE
See Also:
Constant Field Values

GETFEATURE

private static final java.lang.String GETFEATURE
See Also:
Constant Field Values

TRANSACTION

private static final java.lang.String TRANSACTION
See Also:
Constant Field Values

WFS_VERSION

private static final java.lang.String WFS_VERSION
See Also:
Constant Field Values

VENDORSPECIFICPARAMETER

private static final java.util.HashMap VENDORSPECIFICPARAMETER

NATIVE_

private static final WFSNative NATIVE_
Constructor Detail

WFSGProtocolFactory

public WFSGProtocolFactory()
Method Detail

createRequest

public static OGCWebServiceRequest createRequest(java.lang.String id,
                                                 java.io.Reader reader)
                                          throws InconsistentRequestException,
                                                 GazetteerException,
                                                 java.io.IOException,
                                                 org.xml.sax.SAXException
creates a WFS request from a reader that contains an XML encoded form of the request

Parameters:
id -
reader -
Returns:
Throws:
InconsistentRequestException
GazetteerException
java.io.IOException
org.xml.sax.SAXException

createWFSGGetCapabilitiesRequest

public static WFSGGetCapabilitiesRequest createWFSGGetCapabilitiesRequest(java.lang.String id)
Parameters:
id -
Returns:

createWFSGGetCapabilitiesResponse

public static WFSGGetCapabilitiesResponse createWFSGGetCapabilitiesResponse(WFSGGetCapabilitiesRequest request,
                                                                            WFSGCapabilities capa)
Parameters:
request -
capa -
Returns:

createWFSGGetCapabilitiesResponse

public static WFSGGetCapabilitiesResponse createWFSGGetCapabilitiesResponse(WFSGGetCapabilitiesRequest request,
                                                                            org.w3c.dom.Document exception)
Parameters:
request -
exception -
Returns:

createWFSGDescribeFeatureTypeRequest

public static WFSGDescribeFeatureTypeRequest createWFSGDescribeFeatureTypeRequest(java.lang.String id,
                                                                                  org.w3c.dom.Document doc)
Parameters:
id -
Returns:

createWFSGDescribeFeatureTypeRequest

public static WFSGDescribeFeatureTypeRequest createWFSGDescribeFeatureTypeRequest(java.lang.String version,
                                                                                  java.lang.String id,
                                                                                  java.util.HashMap vendorSpecificParameter,
                                                                                  WFSNative native_,
                                                                                  java.lang.String outputFormat,
                                                                                  java.lang.String[] typeNames)
creates a WFSDescribeFeatureTypeRequest object.

Parameters:
id - id of the request
vendorSpecificParameter - none standadized parameters as name-value pairs
native_ - is intended to allow access to vendor specific capabilities
outputFormat - indicates the format the result shall be formated
typeNames - names of the feature types that shalle be described

createWFSGGetFeatureRequest

public static WFSGGetFeatureRequest createWFSGGetFeatureRequest(java.lang.String id,
                                                                org.w3c.dom.Document doc)
                                                         throws InconsistentRequestException,
                                                                GazetteerException
Parameters:
id -
doc -
Returns:
Throws:
InconsistentRequestException
GazetteerException

getQuery

private static WFSQuery[] getQuery(org.w3c.dom.Element element)
                            throws GazetteerException
The query defines which feature type to query, what properties to retrieve and what constraints (spatial and non-spatial) to apply to those properties.

only used for xml-coded requests

Parameters:
element -
Returns:
Throws:
GazetteerException

getFilter

public static Filter getFilter(org.w3c.dom.Element element)
                        throws FilterConstructionException
returns the filter that limits the query

Throws:
FilterConstructionException

getNative

public static WFSNative getNative(org.w3c.dom.Element element)
The element is intended to allow access to vendor specific capabilities of any particular web feature server or datastore. The tag simply delimits the vendor specific command or operation.


getPropertyNames

private static java.lang.String[] getPropertyNames(org.w3c.dom.Element element)
The property names is used to enumerate the feature properties or attributes that should be selected. If no property names are specified then all properties should be fetched.


createWFSGGetFeatureResponse

public static WFSGGetFeatureResponse createWFSGGetFeatureResponse(OGCWebServiceRequest request,
                                                                  java.lang.String[] affectedFeatureTypes,
                                                                  OGCWebServiceException exception,
                                                                  java.lang.Object response)
creates a WFSGetFeatureResponse object

Parameters:
request - a copy of the request that leads to this response
exception - a describtion of an excetion (only if raised)
affectedFeatureTypes - names of the feature types affected by the response
response - the response to the request