org.deegree_impl.services.wcs
Class WCService_Impl

java.lang.Object
  extended byorg.deegree_impl.services.OGCWebService_Impl
      extended byorg.deegree_impl.services.wcs.WCService_Impl
All Implemented Interfaces:
java.util.EventListener, Handler, OGCWebService

public class WCService_Impl
extends OGCWebService_Impl
implements Handler

This is the basic implementation for a OGC conform web coverage service within the deegree framework. A WCSService extends the OGCWebService interface to act like a OGC web service. This means that a WCS is callable through the doService-method inherited from OGCWebService.

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

Version:
$Revision: 1.24 $ $Date: 2004/05/10 08:40:58 $

Author:
Andreas Poth

Field Summary
private  java.util.HashMap descriptors
           
 
Fields inherited from class org.deegree_impl.services.OGCWebService_Impl
capabilities
 
Constructor Summary
WCService_Impl(CVDescriptor[] descriptors)
          Creates a new WCService_Impl object.
WCService_Impl(WCSCapabilities capabilities)
          Creates a new WCService_Impl object.
 
Method Summary
 java.lang.Object clone()
          returns a copy of the WCService_Impl using the same capabilities reference
private  WCSGetCoverageResponse createErrorResponse(OGCWebServiceRequest request, java.lang.Exception ex, java.lang.String location)
          returns a response object that contains an error message
 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  java.lang.Object getSerializedImage(java.lang.Object image, java.lang.String format)
          serializes the submitted image to a byte array. the format of the serialization depends on the also submitted format. at the moment gif, jpeg, tiff, png and bmp are supported.
private  WCSGetCoverageResponse handleGetCoverageRequest(OGCWebServiceEvent event)
          handles a GetCoverage request
 void handleRequest(OGCWebServiceEvent event)
          handles a request against an OGC web service
 void handleResponse(OGCWebServiceEvent response)
          handles the response of an OGC web service
 boolean isInterested(OGCWebServiceEvent event)
          returns true if the handler is interested in a event
 void registerHandler(Handler handler)
          registers a Handler so this Handler is able to act as a proxy to the registered handler
 void removeHandler(Handler handler)
           
 
Methods inherited from class org.deegree_impl.services.OGCWebService_Impl
getCapabilities
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

descriptors

private java.util.HashMap descriptors
Constructor Detail

WCService_Impl

public WCService_Impl(WCSCapabilities capabilities)
               throws XMLParsingException
Creates a new WCService_Impl object.

Parameters:
capabilities - capabilites of the WCS
Throws:
XMLParsingException

WCService_Impl

public WCService_Impl(CVDescriptor[] descriptors)
Creates a new WCService_Impl object.

Parameters:
descriptors -
Method Detail

clone

public java.lang.Object clone()
returns a copy of the WCService_Impl using the same capabilities reference

Returns:

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

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

handleRequest

public void handleRequest(OGCWebServiceEvent event)
handles a request against an OGC web service

Specified by:
handleRequest in interface Handler

handleGetCoverageRequest

private WCSGetCoverageResponse handleGetCoverageRequest(OGCWebServiceEvent event)
handles a GetCoverage request


createErrorResponse

private WCSGetCoverageResponse createErrorResponse(OGCWebServiceRequest request,
                                                   java.lang.Exception ex,
                                                   java.lang.String location)
returns a response object that contains an error message


getSerializedImage

private java.lang.Object getSerializedImage(java.lang.Object image,
                                            java.lang.String format)
                                     throws NotSupportedFormatException,
                                            java.lang.Exception
serializes the submitted image to a byte array. the format of the serialization depends on the also submitted format. at the moment gif, jpeg, tiff, png and bmp are supported.

Throws:
NotSupportedFormatException
java.lang.Exception

handleResponse

public void handleResponse(OGCWebServiceEvent response)
handles the response of an OGC web service

Specified by:
handleResponse in interface Handler

isInterested

public boolean isInterested(OGCWebServiceEvent event)
returns true if the handler is interested in a event

Specified by:
isInterested in interface Handler

registerHandler

public void registerHandler(Handler handler)
registers a Handler so this Handler is able to act as a proxy to the registered handler

Specified by:
registerHandler in interface Handler

removeHandler

public void removeHandler(Handler handler)
Specified by:
removeHandler in interface Handler
See Also:
registerHandler(Handler)