org.deegree_impl.services.wms
Class GetFeatureInfoHandler_Impl.ServiceInvoker

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.deegree_impl.services.wms.GetFeatureInfoHandler_Impl.ServiceInvoker
All Implemented Interfaces:
OGCWebServiceClient, java.lang.Runnable
Enclosing class:
GetFeatureInfoHandler_Impl

private class GetFeatureInfoHandler_Impl.ServiceInvoker
extends java.lang.Thread
implements OGCWebServiceClient

Inner class for accessing the data of one layer and creating a GML document from it. The class extends Thread and implements the run method, so that a parallel data accessing from several layers is possible.

Version:
$Revision: 1.1 $
Author:
Andreas Poth

Field Summary
private  int index
           
private  Layer layer
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) GetFeatureInfoHandler_Impl.ServiceInvoker(Layer layer, int index)
          Creates a new ServiceInvoker object.
 
Method Summary
private  GM_Envelope calcTargetArea(DataSource ds)
          calculates the target area for the getfeatureinfo request from the maps bounding box, the its size and the image coordinates of interest.
private  OGCWebServiceEvent createDescribeCoverageRequest(DataSource ds)
          creates a describe Coverage request The request will be encapsualted within a OGCWebServiceEvent.
private  OGCWebServiceEvent createGetFeatureInfo(DataSource ds)
          creates a GetFeatureInfo request for requesting a cascaded remote WMS The request will be encapsualted within a OGCWebServiceEvent.
private  OGCWebServiceEvent createGetFeatureRequest(DataSource ds)
          creates a getFeature request considering the getMap request and the filterconditions defined in the submitted DataSource object.
private  void handleDescribeCoverageResponse(WCSGetCoverageResponse response)
          handles the response of a WCS and calls a factory to create DisplayElement and a Theme from it
private  void handleGetFeatureInfoResponse(WMSGetMapResponse response)
          handles the response of a cascaded WMS and calls a factory to create DisplayElement and a Theme from it
private  void handleGetFeatureResponse(WFSGetFeatureResponse response)
          handles the response of a WFS and calls a factory to create DisplayElement and a Theme from it
 void run()
          overrides the run-method of the parent class Thread for enabling a multi-threaded access to the data.
 void write(java.lang.Object result)
          The method implements the OGCWebServiceClient interface.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

layer

private Layer layer

index

private int index
Constructor Detail

GetFeatureInfoHandler_Impl.ServiceInvoker

GetFeatureInfoHandler_Impl.ServiceInvoker(Layer layer,
                                          int index)
Creates a new ServiceInvoker object.

Parameters:
layer -
index - index of the requested layer
Method Detail

run

public void run()
overrides the run-method of the parent class Thread for enabling a multi-threaded access to the data.

Specified by:
run in interface java.lang.Runnable

createGetFeatureRequest

private OGCWebServiceEvent createGetFeatureRequest(DataSource ds)
                                            throws java.lang.Exception
creates a getFeature request considering the getMap request and the filterconditions defined in the submitted DataSource object. The request will be encapsualted within a OGCWebServiceEvent.

Returns:
envent object containing a GetFeature request
Throws:
java.lang.Exception

calcTargetArea

private GM_Envelope calcTargetArea(DataSource ds)
                            throws WebServiceException
calculates the target area for the getfeatureinfo request from the maps bounding box, the its size and the image coordinates of interest. An area is calculated instead of using a point because to consider uncertainties determining the point of interest

Parameters:
ds - DataSource of the layer that is requested for feature infos (each layer may be offered in its own crs)
Throws:
WebServiceException

createDescribeCoverageRequest

private OGCWebServiceEvent createDescribeCoverageRequest(DataSource ds)
creates a describe Coverage request The request will be encapsualted within a OGCWebServiceEvent.

Returns:
envent object containing a DescribeCoverage request

createGetFeatureInfo

private OGCWebServiceEvent createGetFeatureInfo(DataSource ds)
                                         throws XMLParsingException
creates a GetFeatureInfo request for requesting a cascaded remote WMS The request will be encapsualted within a OGCWebServiceEvent.

Returns:
envent object containing a GetFeatureInfo request
Throws:
XMLParsingException

write

public void write(java.lang.Object result)
The method implements the OGCWebServiceClient interface. So a deegree OWS implementation accessed by this class is able to return the result of a request by calling the write-method.

Specified by:
write in interface OGCWebServiceClient
Parameters:
result - to a GetXXX request

handleGetFeatureInfoResponse

private void handleGetFeatureInfoResponse(WMSGetMapResponse response)
                                   throws java.lang.Exception
handles the response of a cascaded WMS and calls a factory to create DisplayElement and a Theme from it

Throws:
java.lang.Exception

handleGetFeatureResponse

private void handleGetFeatureResponse(WFSGetFeatureResponse response)
                               throws java.lang.Exception
handles the response of a WFS and calls a factory to create DisplayElement and a Theme from it

Throws:
java.lang.Exception

handleDescribeCoverageResponse

private void handleDescribeCoverageResponse(WCSGetCoverageResponse response)
                                     throws java.lang.Exception
handles the response of a WCS and calls a factory to create DisplayElement and a Theme from it

Throws:
java.lang.Exception