org.deegree_impl.services.wts
Class WTService_Impl

java.lang.Object
  extended byorg.deegree_impl.services.OGCWebService_Impl
      extended byorg.deegree_impl.services.wts.WTService_Impl
All Implemented Interfaces:
OGCWebService, OGCWebServiceClient

public class WTService_Impl
extends OGCWebService_Impl
implements OGCWebServiceClient

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

Version:
$Revision: 1.29 $ $Date: 2004/04/27 15:40:39 $
Author:
Andreas Poth

Field Summary
protected  GM_Surface[][] boxes
           
private  WTSCapabilities capabilities
           
private  OGCWebServiceClient client
           
private  int count
           
private  java.lang.Object[][] demTiles
           
private  java.util.ArrayList feature
           
private  OffScreenWTSRenderer renderer
           
private  OGCWebServiceRequest request
           
private  java.lang.Object[][][] textureTiles
           
 
Constructor Summary
WTService_Impl()
           
 
Method Summary
private  Appearance createAppearance(java.awt.image.BufferedImage image)
          creates the appearence for the scenes material/dem
private static ViewPoint createViewPoint(WTSGetViewRequest request)
          creates a ViewPoint from a WTSGetViewRequest
 void doService(OGCWebServiceEvent event)
          the implementation of this method performs the handling of the passed OGCWebServiceEvent in an new own Thread.
 OGCWebServiceResponse doService(OGCWebServiceRequest request)
          the method performs the handling of the passed OGCWebServiceEvent directly and returns the result to the calling class/method
private  void forceGetViewResponseToClient()
          creates a response object and calls the write-method of the OGCWebServiceClient that is registered as receiver of the WTS-request.
(package private)  GM_Surface[][] getBoxes()
          returns the boxes the requested area has been splitted up to
private  int[] getIndexFromId(java.lang.String id)
           
protected  void handleException(org.w3c.dom.Document error)
          handles the case when the result returned to the WTService through the write-method contains a error message DOM object
protected  void handleException(java.lang.String error)
          handles the case when the result returned to the WTService through the write-method contains a error message string
private  void handleGetCapabilities(WTSGetCapabilitiesRequest request)
          performs a get capabilities request by writing an XML representation of the capabilities to the receiver (destination) of the response of the request.
private  void handleGetView(WTSGetViewRequest request)
          performs a get view request by initializing a WTSScene, forcing an offscreen rendering of the scene and writing the resulting image encapsulated into a GetViewResponse object to the receiver of the response.
private  void handleWCSResponse(WCSGetCoverageResponse response)
          handles the response(s) from a WCS
private  void handleWFSEntities(GMLFeatureCollection gmlFc, double scale)
          handles the response to a WFS GetFeature request containing buildings
private  void handleWFSResponse(WFSGetFeatureResponse response)
          handles the response(s) from a WFS
private  void handleWFSTINs(FeatureCollection fc, double scale, int[] index)
          handles the response to a WFS GetFeature request containing DEM as TINs
private  void handleWMSResponse(WMSGetMapResponse response)
          handles the response(s) from a WMS
(package private)  void setDEMTile(java.lang.Object tile, int x, int y)
           
 void write(java.lang.Object result)
          receives the results from the service calls and fills the texture and tiles matrices
 
Methods inherited from class org.deegree_impl.services.OGCWebService_Impl
getCapabilities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boxes

protected GM_Surface[][] boxes

feature

private java.util.ArrayList feature

client

private OGCWebServiceClient client

request

private OGCWebServiceRequest request

renderer

private OffScreenWTSRenderer renderer

capabilities

private WTSCapabilities capabilities

demTiles

private java.lang.Object[][] demTiles

textureTiles

private java.lang.Object[][][] textureTiles

count

private int count
Constructor Detail

WTService_Impl

public WTService_Impl()
Method Detail

doService

public void doService(OGCWebServiceEvent event)
               throws WebServiceException
Description copied from interface: OGCWebService
the implementation of this method performs the handling of the passed OGCWebServiceEvent in an new own Thread. The receiver of the response to the request must implement the OGCWebServiceClient interface

Specified by:
doService in interface OGCWebService
Parameters:
event -
Throws:
WebServiceException

getBoxes

GM_Surface[][] getBoxes()
returns the boxes the requested area has been splitted up to


setDEMTile

void setDEMTile(java.lang.Object tile,
                int x,
                int y)

doService

public OGCWebServiceResponse doService(OGCWebServiceRequest request)
                                throws WebServiceException
the method performs the handling of the passed OGCWebServiceEvent directly and returns the result to the calling class/method

Specified by:
doService in interface OGCWebService
Parameters:
request - request (WMS, WCS, WFS, WCAS, WCTS, WTS, Gazetter) to perform
Throws:
WebServiceException

handleGetCapabilities

private void handleGetCapabilities(WTSGetCapabilitiesRequest request)
performs a get capabilities request by writing an XML representation of the capabilities to the receiver (destination) of the response of the request.


handleGetView

private void handleGetView(WTSGetViewRequest request)
                    throws java.lang.Exception
performs a get view request by initializing a WTSScene, forcing an offscreen rendering of the scene and writing the resulting image encapsulated into a GetViewResponse object to the receiver of the response.

Throws:
java.lang.Exception

createViewPoint

private static ViewPoint createViewPoint(WTSGetViewRequest request)
creates a ViewPoint from a WTSGetViewRequest


write

public void write(java.lang.Object result)
receives the results from the service calls and fills the texture and tiles matrices

Specified by:
write in interface OGCWebServiceClient
Parameters:
result - result of a service call

handleException

protected void handleException(java.lang.String error)
handles the case when the result returned to the WTService through the write-method contains a error message string

Parameters:
error - error message

handleException

protected void handleException(org.w3c.dom.Document error)
handles the case when the result returned to the WTService through the write-method contains a error message DOM object

Parameters:
error - error message containing Document

handleWCSResponse

private void handleWCSResponse(WCSGetCoverageResponse response)
                        throws java.lang.Exception
handles the response(s) from a WCS

Parameters:
response - response to a GetCoverage request
Throws:
java.lang.Exception

handleWFSResponse

private void handleWFSResponse(WFSGetFeatureResponse response)
                        throws java.lang.Exception
handles the response(s) from a WFS

Parameters:
response - response to a GetFeature request
Throws:
java.lang.Exception

handleWFSEntities

private void handleWFSEntities(GMLFeatureCollection gmlFc,
                               double scale)
                        throws ConfigurationException
handles the response to a WFS GetFeature request containing buildings

Parameters:
gmlFc - feature collection; each feature represents a building
scale - scale of the buildings (1 = original scale)
Throws:
ConfigurationException

handleWFSTINs

private void handleWFSTINs(FeatureCollection fc,
                           double scale,
                           int[] index)
                    throws ConfigurationException,
                           GM_Exception
handles the response to a WFS GetFeature request containing DEM as TINs

Parameters:
fc - feature collection containing the TINs
scale - scale of the TINs (1 = original scale)
index - index of the tiles the result will be assigned to
Throws:
ConfigurationException
GM_Exception

handleWMSResponse

private void handleWMSResponse(WMSGetMapResponse response)
handles the response(s) from a WMS

Parameters:
response - response to a GetMap request

getIndexFromId

private int[] getIndexFromId(java.lang.String id)
Parameters:
id -
Returns:

forceGetViewResponseToClient

private void forceGetViewResponseToClient()
creates a response object and calls the write-method of the OGCWebServiceClient that is registered as receiver of the WTS-request.


createAppearance

private Appearance createAppearance(java.awt.image.BufferedImage image)
creates the appearence for the scenes material/dem