org.deegree.services.wms.controller
Class WMSController

java.lang.Object
  extended by org.deegree.services.controller.AbstractOWS
      extended by org.deegree.services.wms.controller.WMSController
All Implemented Interfaces:
Resource, OWS

public class WMSController
extends AbstractOWS

WMSController handles the protocol and map service globally.

Version:
$Revision: 31882 $, $Date: 2011-09-15 02:05:04 +0200 (Thu, 15 Sep 2011) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Nested Class Summary
static interface WMSController.Controller
          Controller
 
Field Summary
protected  TreeMap<Version,WMSControllerBase> controllers
           
protected  ServiceIdentification identification
           
protected  ServiceProvider provider
           
protected  MapService service
           
 LinkedHashMap<String,String> supportedFeatureInfoFormats
          The list of supported info formats.
 LinkedList<String> supportedImageFormats
          The list of supported image formats.
 
Fields inherited from class org.deegree.services.controller.AbstractOWS
mainControllerConf, mainMetadataConf, offeredVersions, serviceInfo, workspace
 
Constructor Summary
WMSController(URL configURL, ImplementationMetadata<?> serviceInfo)
           
 
Method Summary
 void destroy()
          Usually called by the ResourceManager upon workspace shutdown.
 void doKVP(Map<String,String> map, javax.servlet.http.HttpServletRequest request, HttpResponseBuffer response, List<org.apache.commons.fileupload.FileItem> multiParts)
          Called by the OGCFrontController to allow this OWS to handle an OGC-KVP request.
 void doXML(XMLStreamReader xmlStream, javax.servlet.http.HttpServletRequest request, HttpResponseBuffer response, List<org.apache.commons.fileupload.FileItem> multiParts)
          Called by the OGCFrontController to allow this OWS to handle an OGC-XML request.
protected  void getCapabilities(Map<String,String> map, HttpResponseBuffer response)
           
 Pair<XMLExceptionSerializer<OWSException>,String> getExceptionSerializer(Version requestVersion)
          Returns the ExceptionSerializer and mime-type suitable for the given request version.
 List<Element> getExtendedCapabilities()
           
protected  void getMap(Map<String,String> map, HttpResponseBuffer response, Version version)
           
 MapService getMapService()
           
 String getMetadataURLTemplate()
           
 void init(DeegreeServicesMetadataType serviceMetadata, DeegreeServiceControllerType mainConfig, ImplementationMetadata<?> md, XMLAdapter controllerConf)
          Initializes the AbstractOWS instance.
 void sendImage(BufferedImage img, HttpResponseBuffer response, String format)
           
 
Methods inherited from class org.deegree.services.controller.AbstractOWS
beginSOAPResponse, checkConfigVersion, checkVersion, doSOAP, endSOAPResponse, getHandledNamespaces, getHandledRequests, getImplementationMetadata, getOfferedVersions, getOfferedVersionsString, init, negotiateVersion, sendException, sendException, sendSOAPException, synchronizeServiceIdentificationWithMainController, synchronizeServiceProviderWithMainControllerConf, unmarshallConfig, unmarshallConfig, validateAndSetOfferedVersions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

supportedImageFormats

public final LinkedList<String> supportedImageFormats
The list of supported image formats.


supportedFeatureInfoFormats

public final LinkedHashMap<String,String> supportedFeatureInfoFormats
The list of supported info formats.


service

protected MapService service

identification

protected ServiceIdentification identification

provider

protected ServiceProvider provider

controllers

protected TreeMap<Version,WMSControllerBase> controllers
Constructor Detail

WMSController

public WMSController(URL configURL,
                     ImplementationMetadata<?> serviceInfo)
Method Detail

getMapService

public MapService getMapService()
Returns:
the underlying map service

init

public void init(DeegreeServicesMetadataType serviceMetadata,
                 DeegreeServiceControllerType mainConfig,
                 ImplementationMetadata<?> md,
                 XMLAdapter controllerConf)
          throws ResourceInitException
Description copied from class: AbstractOWS
Initializes the AbstractOWS instance.

Overrides:
init in class AbstractOWS
controllerConf - controller configuration, must not be null
Throws:
ResourceInitException

destroy

public void destroy()
Description copied from interface: Resource
Usually called by the ResourceManager upon workspace shutdown.


doKVP

public void doKVP(Map<String,String> map,
                  javax.servlet.http.HttpServletRequest request,
                  HttpResponseBuffer response,
                  List<org.apache.commons.fileupload.FileItem> multiParts)
           throws javax.servlet.ServletException,
                  IOException,
                  SecurityException
Description copied from interface: OWS
Called by the OGCFrontController to allow this OWS to handle an OGC-KVP request.

Parameters:
map - request parameters (keys are uppercased), never null
request - provides access to all information of the original HTTP request (NOTE: may be GET or POST), never null
response - response that is sent to the client, never null
multiParts - A list of multiparts contained in the request. If the request was not a multipart request the list will be null. If multiparts were found, the requestDoc will be the first (xml-lized) FileItem in the list.
Throws:
javax.servlet.ServletException
IOException
SecurityException

getMap

protected void getMap(Map<String,String> map,
                      HttpResponseBuffer response,
                      Version version)
               throws OWSException,
                      IOException,
                      WMSException.MissingDimensionValue,
                      WMSException.InvalidDimensionValue,
                      OWSException
Throws:
OWSException
IOException
WMSException.MissingDimensionValue
WMSException.InvalidDimensionValue

getCapabilities

protected void getCapabilities(Map<String,String> map,
                               HttpResponseBuffer response)
                        throws OWSException,
                               IOException
Throws:
OWSException
IOException

doXML

public void doXML(XMLStreamReader xmlStream,
                  javax.servlet.http.HttpServletRequest request,
                  HttpResponseBuffer response,
                  List<org.apache.commons.fileupload.FileItem> multiParts)
           throws javax.servlet.ServletException,
                  IOException
Description copied from interface: OWS
Called by the OGCFrontController to allow this OWS to handle an OGC-XML request.

Parameters:
xmlStream - provides access to the XML request, cursor points to the START_ELEMENT event of the root element, never null
request - provides access to all information of the original HTTP request (NOTE: may be GET or POST), never null
response - response that is sent to the client, never null
multiParts - A list of multiparts contained in the request. If the request was not a multipart request the list will be null. If multiparts were found, the xmlStream will provide access to the first (xml-lized) FileItem in the list of multi parts
Throws:
javax.servlet.ServletException
IOException

sendImage

public void sendImage(BufferedImage img,
                      HttpResponseBuffer response,
                      String format)
               throws OWSException,
                      IOException
Parameters:
img -
response -
format -
Throws:
OWSException
IOException

getExceptionSerializer

public Pair<XMLExceptionSerializer<OWSException>,String> getExceptionSerializer(Version requestVersion)
Description copied from class: AbstractOWS
Returns the ExceptionSerializer and mime-type suitable for the given request version.

Specified by:
getExceptionSerializer in interface OWS
Overrides:
getExceptionSerializer in class AbstractOWS
Parameters:
requestVersion - version of the request for which the exception has to be produced, may be null (implies that the serializer and mime type for the highest supported version shall be returned)
Returns:
an OWSCommon 1.1.0 XML adapter by default, never null

getExtendedCapabilities

public List<Element> getExtendedCapabilities()

getMetadataURLTemplate

public String getMetadataURLTemplate()


Copyright © 2011. All Rights Reserved.