001 // $HeadURL: 002 // /cvsroot/deegree/src/org/deegree/ogcwebservices/wms/protocol/WMPSProtocolFactory.java,v 003 // 1.7 2004/07/12 06:12:11 ap Exp $ 004 /*---------------- FILE HEADER ------------------------------------------ 005 006 This file is part of deegree. 007 Copyright (C) 2001-2008 by: 008 EXSE, Department of Geography, University of Bonn 009 http://www.giub.uni-bonn.de/deegree/ 010 lat/lon GmbH 011 http://www.lat-lon.de 012 013 This library is free software; you can redistribute it and/or 014 modify it under the terms of the GNU Lesser General Public 015 License as published by the Free Software Foundation; either 016 version 2.1 of the License, or (at your option) any later version. 017 018 This library is distributed in the hope that it will be useful, 019 but WITHOUT ANY WARRANTY; without even the implied warranty of 020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 021 Lesser General Public License for more details. 022 023 You should have received a copy of the GNU Lesser General Public 024 License along with this library; if not, write to the Free Software 025 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 027 Contact: 028 029 Andreas Poth 030 lat/lon GmbH 031 Aennchenstr. 19 032 53115 Bonn 033 Germany 034 E-Mail: poth@lat-lon.de 035 036 Prof. Dr. Klaus Greve 037 Department of Geography 038 University of Bonn 039 Meckenheimer Allee 166 040 53115 Bonn 041 Germany 042 E-Mail: greve@giub.uni-bonn.de 043 044 045 ---------------------------------------------------------------------------*/ 046 package org.deegree.ogcwebservices.wmps.operation; 047 048 import org.deegree.framework.log.ILogger; 049 import org.deegree.framework.log.LoggerFactory; 050 import org.deegree.ogcwebservices.OGCWebServiceException; 051 import org.deegree.ogcwebservices.OGCWebServiceRequest; 052 import org.deegree.ogcwebservices.wmps.capabilities.WMPSCapabilities; 053 054 /** 055 * Factory that builds the different types of WMPS-Requests & Responses. 056 * 057 * @author <a href="mailto:deshmukh@lat-lon.de">Anup Deshmukh </a> 058 * 059 * @version 2.0 060 */ 061 public class WMPSProtocolFactory { 062 063 /** 064 * creates an instance of a <tt>WMPSGetCapabilitiesResult</tt> object 065 * 066 * @param request 067 * request that lead to the response 068 * @param exception 069 * exception if one occuered 070 * @param capabilities 071 * WMS capabilities 072 * 073 * @return <tt>WMPSGetCapabilitiesResult</tt> 074 */ 075 public static WMPSGetCapabilitiesResult createGetCapabilitiesResult( OGCWebServiceRequest request, 076 OGCWebServiceException exception, 077 WMPSCapabilities capabilities ) { 078 079 WMPSGetCapabilitiesResult res = null; 080 if ( exception == null ) { 081 res = new WMPSGetCapabilitiesResult( request, capabilities ); 082 } else { 083 res = new WMPSGetCapabilitiesResult( request, exception ); 084 } 085 086 return res; 087 } 088 089 }