org.deegree.services.wms.controller
Class WMSController

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

public class WMSController
extends AbstractOGCServiceController

WMSController handles the protocol and map service globally.

Version:
$Revision: 28323 $, $Date: 2010-11-22 10:43:31 +0100 (Mo, 22. Nov 2010) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $

Nested Class Summary
static interface WMSController.Controller
          Controller
 
Field Summary
protected  java.util.TreeMap<org.deegree.commons.tom.ows.Version,WMSControllerBase> controllers
           
protected  ServiceIdentificationType identification
           
protected  ServiceProviderType provider
           
protected  MapService service
           
 java.util.LinkedHashMap<java.lang.String,java.lang.String> supportedFeatureInfoFormats
          The list of supported info formats.
 java.util.LinkedList<java.lang.String> supportedImageFormats
          The list of supported image formats.
 
Fields inherited from class org.deegree.services.controller.AbstractOGCServiceController
mainControllerConf, mainMetadataConf, offeredVersions
 
Constructor Summary
WMSController()
           
 
Method Summary
 void destroy()
          Called by the OGCFrontController to indicate to this OWS that it is being taken out of service.
 void doKVP(java.util.Map<java.lang.String,java.lang.String> map, javax.servlet.http.HttpServletRequest request, HttpResponseBuffer response, java.util.List<org.apache.commons.fileupload.FileItem> multiParts)
          Called by the OGCFrontController to allow this OWS to handle an OGC-KVP request.
 void doXML(javax.xml.stream.XMLStreamReader xmlStream, javax.servlet.http.HttpServletRequest request, HttpResponseBuffer response, java.util.List<org.apache.commons.fileupload.FileItem> multiParts)
          Called by the OGCFrontController to allow this OWS to handle an OGC-XML request.
protected  void getCapabilities(java.util.Map<java.lang.String,java.lang.String> map, HttpResponseBuffer response)
           
 org.deegree.commons.utils.Pair<XMLExceptionSerializer<OWSException>,java.lang.String> getExceptionSerializer(org.deegree.commons.tom.ows.Version requestVersion)
          Returns the ExceptionSerializer and mime-type suitable for the given request version.
protected  void getMap(java.util.Map<java.lang.String,java.lang.String> map, HttpResponseBuffer response, org.deegree.commons.tom.ows.Version version)
           
 MapService getMapService()
           
 void init(org.deegree.commons.xml.XMLAdapter controllerConf, DeegreeServicesMetadataType serviceMetadata, DeegreeServiceControllerType mainConfig)
          Called by the OGCFrontController to indicate to this OWS that it is being taken into service.
 void sendImage(java.awt.image.BufferedImage img, HttpResponseBuffer response, java.lang.String format)
           
 
Methods inherited from class org.deegree.services.controller.AbstractOGCServiceController
beginSOAPResponse, checkConfigVersion, checkOrCreateDCPGetURL, checkOrCreateDCPPostURL, checkVersion, doSOAP, endSOAPResponse, getHandledNamespaces, getHandledRequests, getOfferedVersions, getOfferedVersionsString, init, negotiateVersion, 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 java.util.LinkedList<java.lang.String> supportedImageFormats
The list of supported image formats.


supportedFeatureInfoFormats

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


service

protected MapService service

identification

protected ServiceIdentificationType identification

provider

protected ServiceProviderType provider

controllers

protected java.util.TreeMap<org.deegree.commons.tom.ows.Version,WMSControllerBase> controllers
Constructor Detail

WMSController

public WMSController()
Method Detail

getMapService

public MapService getMapService()
Returns:
the underlying map service

init

public void init(org.deegree.commons.xml.XMLAdapter controllerConf,
                 DeegreeServicesMetadataType serviceMetadata,
                 DeegreeServiceControllerType mainConfig)
          throws ControllerInitException
Description copied from interface: OWS
Called by the OGCFrontController to indicate to this OWS that it is being taken into service.

Parameters:
controllerConf - provides access to the (always xml-based) configuration of the controller
serviceMetadata - services metadata from the main service configuration for all services
mainConfig - from the main.xml
Throws:
ControllerInitException - indicates that the initialization failed

destroy

public void destroy()
Description copied from interface: OWS
Called by the OGCFrontController to indicate to this OWS that it is being taken out of service.


doKVP

public void doKVP(java.util.Map<java.lang.String,java.lang.String> map,
                  javax.servlet.http.HttpServletRequest request,
                  HttpResponseBuffer response,
                  java.util.List<org.apache.commons.fileupload.FileItem> multiParts)
           throws javax.servlet.ServletException,
                  java.io.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
java.io.IOException
SecurityException

getMap

protected void getMap(java.util.Map<java.lang.String,java.lang.String> map,
                      HttpResponseBuffer response,
                      org.deegree.commons.tom.ows.Version version)
               throws OWSException,
                      java.io.IOException,
                      WMSException.MissingDimensionValue,
                      WMSException.InvalidDimensionValue
Throws:
OWSException
java.io.IOException
WMSException.MissingDimensionValue
WMSException.InvalidDimensionValue

getCapabilities

protected void getCapabilities(java.util.Map<java.lang.String,java.lang.String> map,
                               HttpResponseBuffer response)
                        throws OWSException,
                               java.io.IOException
Throws:
OWSException
java.io.IOException

doXML

public void doXML(javax.xml.stream.XMLStreamReader xmlStream,
                  javax.servlet.http.HttpServletRequest request,
                  HttpResponseBuffer response,
                  java.util.List<org.apache.commons.fileupload.FileItem> multiParts)
           throws javax.servlet.ServletException,
                  java.io.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
java.io.IOException

sendImage

public void sendImage(java.awt.image.BufferedImage img,
                      HttpResponseBuffer response,
                      java.lang.String format)
               throws OWSException,
                      java.io.IOException
Parameters:
img -
response -
format -
Throws:
OWSException
java.io.IOException

getExceptionSerializer

public org.deegree.commons.utils.Pair<XMLExceptionSerializer<OWSException>,java.lang.String> getExceptionSerializer(org.deegree.commons.tom.ows.Version requestVersion)
Description copied from class: AbstractOGCServiceController
Returns the ExceptionSerializer and mime-type suitable for the given request version.

Overrides:
getExceptionSerializer in class AbstractOGCServiceController
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


Copyright © 2011. All Rights Reserved.