org.deegree_impl.services.wfs
Class WFSRequestController

java.lang.Object
  extended byorg.deegree_impl.services.wfs.WFSRequestController
All Implemented Interfaces:
RequestController

public final class WFSRequestController
extends java.lang.Object
implements RequestController

the class administers all request that are in progress by the WFS (Dispatcher)

--------------------------------------------------------

Version:
$Revision: 1.13 $ $Date: 2004/03/05 07:42:15 $
Author:
Andreas Poth

Field Summary
private  java.util.Map handler
           
private  OGCWebServiceRequest request
           
 
Constructor Summary
WFSRequestController(OGCWebServiceRequest request)
          Creates a new WFSRequestController object.
 
Method Summary
 void addRequestPart(java.lang.Object obj)
          Adds a part of the whole request to the controller.
 void addResponse(OGCWebServiceResponse response)
          adds a response to the request controlled by this class or a part of it.
private  OGCWebServiceResponse createCapabilitiesResponse()
          creates a complete response object from the partial responses of different data store to a GetFeature Request
private  WFSDescribeFeatureTypeResponse createDescribeFeatureTypeResponse()
          creates a complete response object from the partial responses of different data store to a DescribFeatureType Request
private  OGCWebServiceResponse createGetFeatureResponse()
          creates a complete response object from the partial responses of different data store to a GetFeature Request
private  OGCWebServiceResponse createTransactionResponse()
           
private  FeatureCollection formatFC(FeatureCollection fc, WFSGetFeatureResponse response)
          formats the result of a GetFeature request as Features and adds them to the submitted FeatureCollection
private  GMLFeatureCollection formatGMLFC(GMLFeatureCollection gmlfc, WFSGetFeatureResponse response)
          formats the result of a GetFeature request to GML and adds it to the submitted GMLFeatureCollection
private  org.w3c.dom.Document formatXML(org.w3c.dom.Document doc, WFSGetFeatureResponse response)
          formats the result of a GetFeature request as Elements and adds them to the submitted Document
private  java.lang.String[] getAffectedFeatureTypes()
          returns all feature types affected by the current request
private  java.lang.String[] getAffectedFeatureTypes(WFSOperation[] operations)
          returns the list of feature types that are affected by a Transaction
private  double[] getFCBoundingBox(GMLFeatureCollection fc)
           
 OGCWebServiceRequest getRequest()
          return the request handled by the class
 OGCWebServiceResponse getResponse()
          creates a resonse object merging all independed responses that has been resulted from perfoming the request
 boolean requestFinished()
          returns true if all operations of the request are performed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handler

private java.util.Map handler

request

private OGCWebServiceRequest request
Constructor Detail

WFSRequestController

public WFSRequestController(OGCWebServiceRequest request)
Creates a new WFSRequestController object.

Parameters:
request -
Method Detail

getAffectedFeatureTypes

private java.lang.String[] getAffectedFeatureTypes()
returns all feature types affected by the current request


getAffectedFeatureTypes

private java.lang.String[] getAffectedFeatureTypes(WFSOperation[] operations)
returns the list of feature types that are affected by a Transaction


addRequestPart

public void addRequestPart(java.lang.Object obj)
Adds a part of the whole request to the controller. The parameter identifies the listener that's responsible for performing this part of the request.

Specified by:
addRequestPart in interface RequestController

getRequest

public OGCWebServiceRequest getRequest()
return the request handled by the class

Specified by:
getRequest in interface RequestController

requestFinished

public boolean requestFinished()
returns true if all operations of the request are performed

Specified by:
requestFinished in interface RequestController

addResponse

public void addResponse(OGCWebServiceResponse response)
adds a response to the request controlled by this class or a part of it.

Specified by:
addResponse in interface RequestController

getResponse

public OGCWebServiceResponse getResponse()
                                  throws java.lang.Exception
creates a resonse object merging all independed responses that has been resulted from perfoming the request

Specified by:
getResponse in interface RequestController
Throws:
java.lang.Exception

createDescribeFeatureTypeResponse

private WFSDescribeFeatureTypeResponse createDescribeFeatureTypeResponse()
                                                                  throws DispatcherException
creates a complete response object from the partial responses of different data store to a DescribFeatureType Request

Throws:
DispatcherException

createGetFeatureResponse

private OGCWebServiceResponse createGetFeatureResponse()
creates a complete response object from the partial responses of different data store to a GetFeature Request


formatGMLFC

private GMLFeatureCollection formatGMLFC(GMLFeatureCollection gmlfc,
                                         WFSGetFeatureResponse response)
formats the result of a GetFeature request to GML and adds it to the submitted GMLFeatureCollection


getFCBoundingBox

private double[] getFCBoundingBox(GMLFeatureCollection fc)
Parameters:
fc -
Returns:

formatFC

private FeatureCollection formatFC(FeatureCollection fc,
                                   WFSGetFeatureResponse response)
formats the result of a GetFeature request as Features and adds them to the submitted FeatureCollection


formatXML

private org.w3c.dom.Document formatXML(org.w3c.dom.Document doc,
                                       WFSGetFeatureResponse response)
formats the result of a GetFeature request as Elements and adds them to the submitted Document


createCapabilitiesResponse

private OGCWebServiceResponse createCapabilitiesResponse()
creates a complete response object from the partial responses of different data store to a GetFeature Request


createTransactionResponse

private OGCWebServiceResponse createTransactionResponse()