001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/ogcwebservices/wms/configuration/WMSConfiguration_1_3_0.java $
002 /*---------------- FILE HEADER ------------------------------------------
003 This file is part of deegree.
004 Copyright (C) 2001-2006 by:
005 Department of Geography, University of Bonn
006 http://www.giub.uni-bonn.de/deegree/
007 lat/lon GmbH
008 http://www.lat-lon.de
009 This library is free software; you can redistribute it and/or
010 modify it under the terms of the GNU Lesser General Public
011 License as published by the Free Software Foundation; either
012 version 2.1 of the License, or (at your option) any later version.
013 This library is distributed in the hope that it will be useful,
014 but WITHOUT ANY WARRANTY; without even the implied warranty of
015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
016 Lesser General Public License for more details.
017 You should have received a copy of the GNU Lesser General Public
018 License along with this library; if not, write to the Free Software
019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020 Contact:
021 Andreas Poth
022 lat/lon GmbH
023 Aennchenstrasse 19
024 53177 Bonn
025 Germany
026 E-Mail: poth@lat-lon.de
027 Jens Fitzke
028 lat/lon GmbH
029 Aennchenstrasse 19
030 53177 Bonn
031 Germany
032 E-Mail: jens.fitzke@uni-bonn.de
033 ---------------------------------------------------------------------------*/
034 package org.deegree.ogcwebservices.wms.configuration;
035
036 import java.net.URL;
037
038 import org.deegree.ogcwebservices.wms.capabilities.Layer;
039 import org.deegree.ogcwebservices.wms.capabilities.WMSCapabilities_1_3_0;
040 import org.deegree.owscommon_new.OperationsMetadata;
041 import org.deegree.owscommon_new.ServiceIdentification;
042 import org.deegree.owscommon_new.ServiceProvider;
043
044 /**
045 * <code>WMSConfiguration_1_3_0</code> is an implementation of the
046 * <code>WMSConfigurationType</code> interface, encapsulating the data
047 * required to configure a WMS 1.3.0.
048 *
049 * @author <a href="mailto:schmitz@lat-lon.de">Andreas Schmitz</a>
050 * @author last edited by: $Author: bezema $
051 *
052 * @version 2.0, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
053 *
054 * @since 2.0
055 */
056
057 public class WMSConfiguration_1_3_0 extends WMSCapabilities_1_3_0 implements WMSConfigurationType {
058
059 private static final long serialVersionUID = -1145058631134066271L;
060
061 private URL baseURL;
062
063 private WMSDeegreeParams deegreeParams;
064
065 /**
066 * Generates a new <code>WFSConfiguration</code> instance from the given parameters.
067 *
068 * @param version
069 * @param updateSequence
070 * @param serviceIdentification
071 * @param serviceProvider
072 * @param metadata
073 * @param layer
074 * @param deegreeParams
075 * @param baseURL
076 * @param layerLimit
077 */
078 public WMSConfiguration_1_3_0( String version, String updateSequence,
079 ServiceIdentification serviceIdentification,
080 ServiceProvider serviceProvider,
081 OperationsMetadata metadata, Layer layer,
082 WMSDeegreeParams deegreeParams, URL baseURL,
083 int layerLimit ) {
084 super( version, updateSequence, serviceIdentification, serviceProvider,
085 metadata, layer, layerLimit, deegreeParams.getMaxMapWidth(),
086 deegreeParams.getMaxMapHeight() );
087 this.deegreeParams = deegreeParams;
088 this.baseURL = baseURL;
089 }
090
091 /**
092 * @return Returns the deegreeParams.
093 */
094 public WMSDeegreeParams getDeegreeParams() {
095 return deegreeParams;
096 }
097
098 /**
099 * @param deegreeParams
100 * The deegreeParams to set.
101 */
102 public void setDeegreeParams( WMSDeegreeParams deegreeParams ) {
103 this.deegreeParams = deegreeParams;
104 }
105
106 /**
107 * @return Gets the base URL which is used to resolve file resource (XSL sheets).
108 */
109 public URL getBaseURL() {
110 return this.baseURL;
111 }
112
113 /* (non-Javadoc)
114 * @see org.deegree.ogcwebservices.wms.configuration.WMSConfigurationType#calculateVersion(java.lang.String)
115 */
116 public String calculateVersion( String version ) {
117 if( version == null ) return "1.3.0";
118
119 if( "1.3.0".compareTo( version ) <= 0 ) return "1.3.0";
120
121 return "1.1.1";
122 }
123
124 }
125
126
127 /* ********************************************************************
128 Changes to this class. What the people have been up to:
129 $Log$
130 Revision 1.1 2006/09/08 08:42:01 schmitz
131 Updated the WMS to be 1.1.1 conformant once again.
132 Cleaned up the WMS code.
133 Added cite WMS test data.
134
135
136
137 ********************************************************************** */