org.deegree_impl.services.wts.protocol
Class WTSProtocolFactory

java.lang.Object
  extended byorg.deegree_impl.services.wts.protocol.WTSProtocolFactory

public class WTSProtocolFactory
extends java.lang.Object

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

Version:
2002-03-01
Author:
Andreas Poth

Constructor Summary
WTSProtocolFactory()
           
 
Method Summary
static WTSGetViewRequest createGetViewRequest(java.lang.String id, java.util.HashMap model)
          creates a WTSGetViewRequest from a HashMap that contains the request parameters as key-value-pairs.
static WTSGetViewRequest createGetViewRequest(java.lang.String version, java.lang.String id, java.util.HashMap vendorSpecificParameter, java.lang.String format, WTSGetViewRequest.Layer[] layers, java.lang.String crs, int width, int height, java.awt.Color bgColor, double aov, double distance, double pitch, GM_Position poi, double yaw, java.lang.String exceptions, java.util.Calendar date, double scale, java.lang.Object background, java.lang.String[] dem, WTSGetViewRequest.Layer[] ftCollections)
          creates a WTSGetViewRequest from a set of parameters
static WTSGetViewResponse createGetViewResponse(org.w3c.dom.Document exception, OGCWebServiceRequest request)
          creates a responseobject to a getViewRequest with a submitted error
static WTSGetViewResponse createGetViewResponse(java.lang.Object view, OGCWebServiceRequest request)
          creates a responseobject to a getViewRequest
static OGCWebServiceRequest createRequest(java.lang.String id, java.util.HashMap model)
          creates a request object from a model (key-value-pair encoding) of a WTS request and a unique ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTSProtocolFactory

public WTSProtocolFactory()
Method Detail

createRequest

public static OGCWebServiceRequest createRequest(java.lang.String id,
                                                 java.util.HashMap model)
                                          throws WTSProtocolException
creates a request object from a model (key-value-pair encoding) of a WTS request and a unique ID.

Parameters:
id - ID of the request
model - key-value-pair encoding of the request
Returns:
Throws:
WTSProtocolException

createGetViewRequest

public static WTSGetViewRequest createGetViewRequest(java.lang.String id,
                                                     java.util.HashMap model)
                                              throws WTSProtocolException
creates a WTSGetViewRequest from a HashMap that contains the request parameters as key-value-pairs. Keys are expected to be in upper case notation.

Parameters:
model - HashMap containing the request parameters
Returns:
an instance of WTSGetViewRequest
Throws:
WTSProtocolException - will be thrown if mandatory parameter are missing or parameters don't contain valid values

createGetViewRequest

public static WTSGetViewRequest createGetViewRequest(java.lang.String version,
                                                     java.lang.String id,
                                                     java.util.HashMap vendorSpecificParameter,
                                                     java.lang.String format,
                                                     WTSGetViewRequest.Layer[] layers,
                                                     java.lang.String crs,
                                                     int width,
                                                     int height,
                                                     java.awt.Color bgColor,
                                                     double aov,
                                                     double distance,
                                                     double pitch,
                                                     GM_Position poi,
                                                     double yaw,
                                                     java.lang.String exceptions,
                                                     java.util.Calendar date,
                                                     double scale,
                                                     java.lang.Object background,
                                                     java.lang.String[] dem,
                                                     WTSGetViewRequest.Layer[] ftCollections)
creates a WTSGetViewRequest from a set of parameters

Parameters:
id - request id
vendorSpecificParameter - vendorSpecificParameter parameter(s)
format - format the result of the request shall be returned
layers - layers that are requested
crs - coordinate reference system that scene's data are requested at
width - width scene in pixel
height - height scene in pixel
bgColor - background color of the scene
aov - viewers angle of view
distance - distance between viewer and target on an imaginery horizontal ground in height of the target
pitch - -
poi - target where the viewer is looking to
yaw - -
exceptions - format how to return exceptions
date - month, day and hour for which he scene shall be created (light-conditions)
scale - vertical scale of the dem and the objects in the scene (default = 1)
background - background used for scene (cloud images form example)
dem - name of the dem that shall be used
ftCollections - named feature collections that shall be superimposed on the dem
Returns:
an instance of WTSGetViewRequest

createGetViewResponse

public static WTSGetViewResponse createGetViewResponse(java.lang.Object view,
                                                       OGCWebServiceRequest request)
creates a responseobject to a getViewRequest

Parameters:
view - created scene
request - request from which the scene was created
Returns:
response object

createGetViewResponse

public static WTSGetViewResponse createGetViewResponse(org.w3c.dom.Document exception,
                                                       OGCWebServiceRequest request)
creates a responseobject to a getViewRequest with a submitted error

Parameters:
exception - exception that has been raised performing the request
request - request that has been performed when exception raised
Returns:
response object