001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/wmps/configuration/WMPSDeegreeParams.java $
002 /*---------------- FILE HEADER ------------------------------------------
003
004 This file is part of deegree.
005 Copyright (C) 2001-2008 by:
006 EXSE, Department of Geography, University of Bonn
007 http://www.giub.uni-bonn.de/deegree/
008 lat/lon GmbH
009 http://www.lat-lon.de
010
011 This library is free software; you can redistribute it and/or
012 modify it under the terms of the GNU Lesser General Public
013 License as published by the Free Software Foundation; either
014 version 2.1 of the License, or (at your option) any later version.
015
016 This library is distributed in the hope that it will be useful,
017 but WITHOUT ANY WARRANTY; without even the implied warranty of
018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019 Lesser General Public License for more details.
020
021 You should have received a copy of the GNU Lesser General Public
022 License along with this library; if not, write to the Free Software
023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024
025 Contact:
026
027 Andreas Poth
028 lat/lon GmbH
029 Aennchenstr. 19
030 53115 Bonn
031 Germany
032 E-Mail: poth@lat-lon.de
033
034 Prof. Dr. Klaus Greve
035 Department of Geography
036 University of Bonn
037 Meckenheimer Allee 166
038 53115 Bonn
039 Germany
040 E-Mail: greve@giub.uni-bonn.de
041
042
043 ---------------------------------------------------------------------------*/
044 package org.deegree.ogcwebservices.wmps.configuration;
045
046 import java.net.URL;
047 import java.util.List;
048
049 import org.deegree.enterprise.DeegreeParams;
050 import org.deegree.enterprise.Proxy;
051 import org.deegree.model.metadata.iso19115.OnlineResource;
052 import org.deegree.ogcwebservices.wms.capabilities.GazetteerParam;
053
054 /**
055 * WMPS specific deegree parameters container class.
056 *
057 * @author <a href="mailto:deshmukh@lat-lon.de">Anup Deshmukh</a>
058 * @version 2.0
059 */
060 public class WMPSDeegreeParams extends DeegreeParams {
061
062 private static final long serialVersionUID = 6954454089387042783L;
063
064 private float mapQuality = 0.95f;
065
066 private int maxLifeTime = 3600;
067
068 private int maxMapWidth = 1000;
069
070 private int maxMapHeight = 1000;
071
072 private String copyright = "deegree (c)";
073
074 private GazetteerParam gazetteer;
075
076 private URL schemaLocation;
077
078 private URL dtdLocation;
079
080 private Proxy proxy;
081
082 private boolean antiAliased;
083
084 private int featureInfoRadius = 5;
085
086 private List<String> synchList;
087
088 private CacheDatabase cacheDatabase;
089
090 private PrintMapParam printMapParam;
091
092 /**
093 * Create a new WMPSDeegreeParams instance.
094 *
095 * @param cacheSize
096 * @param maxLifeTime
097 * @param requestTimeLimit
098 * @param mapQuality
099 * @param defaultOnlineResource
100 * @param maxMapWidth
101 * @param maxMapHeight
102 * @param antiAliased
103 * @param featureInfoRadius
104 * (default = 5)
105 * @param copyRight
106 * @param gazetteer
107 * @param schemaLocation
108 * @param dtdLocation
109 * @param proxy
110 * @param synchList
111 * @param printMapParam
112 * @param cacheDatabase
113 */
114 public WMPSDeegreeParams( int cacheSize, int maxLifeTime, int requestTimeLimit,
115 float mapQuality, OnlineResource defaultOnlineResource,
116 int maxMapWidth, int maxMapHeight, boolean antiAliased,
117 int featureInfoRadius, String copyRight, GazetteerParam gazetteer,
118 URL schemaLocation, URL dtdLocation, Proxy proxy,
119 List<String> synchList, CacheDatabase cacheDatabase,
120 PrintMapParam printMapParam ) {
121
122 super( defaultOnlineResource, cacheSize, requestTimeLimit );
123 this.maxLifeTime = maxLifeTime;
124 this.mapQuality = mapQuality;
125 this.maxMapHeight = maxMapHeight;
126 this.maxMapWidth = maxMapWidth;
127 this.antiAliased = antiAliased;
128 this.copyright = copyRight;
129 this.gazetteer = gazetteer;
130 this.schemaLocation = schemaLocation;
131 this.dtdLocation = dtdLocation;
132 this.proxy = proxy;
133 this.featureInfoRadius = featureInfoRadius;
134 this.synchList = synchList;
135 this.cacheDatabase = cacheDatabase;
136 this.printMapParam = printMapParam;
137 }
138
139 /**
140 * returns the maximum life time of the internal processes (Threads) of the deegree WMS. default
141 * is 3600 seconds. Datasources that are linked to WMS are not targeted by this value.
142 *
143 * @return int
144 */
145 public int getMaxLifeTime() {
146 return this.maxLifeTime;
147 }
148
149 /**
150 * returns a copy right note to draw at the left side of the maps bottom
151 *
152 * @return String
153 */
154 public String getCopyright() {
155 return this.copyright;
156 }
157
158 /**
159 * returns the quality of the map for none loss-less image formats. the value ranges from 0
160 * (lowest quality) to 1 (best quality)
161 * <p>
162 * Default is 0.95
163 *
164 * @return float
165 */
166 public float getMapQuality() {
167 return this.mapQuality;
168 }
169
170 /**
171 * returns the maximum map height that can be requested. If the PrintMap-Parameter 'HEIGHT'
172 * extends max map width an exception shall be returned to the client.
173 * <p>
174 * Default is 1000
175 *
176 * @return int
177 */
178 public int getMaxMapHeight() {
179 return this.maxMapHeight;
180 }
181
182 /**
183 * returns the maximum map width that can be requested. If the PrintMap-Parameter 'WIDTH'
184 * extends max map width an exception shall be returned to the client.
185 * <p>
186 * Default is 1000
187 *
188 * @return int
189 */
190 public int getMaxMapWidth() {
191 return this.maxMapWidth;
192 }
193
194 /**
195 * returns the URL where to access the gazetteer service associated with the WMS
196 *
197 * @return GazetteerParam
198 */
199 public GazetteerParam getGazetteer() {
200 return this.gazetteer;
201 }
202
203 /**
204 * returns the URL where the sxm schema definition of the response to an GetFeatureInfo request
205 * is located
206 *
207 * @return URL
208 */
209 public URL getSchemaLocation() {
210 return this.schemaLocation;
211 }
212
213 /**
214 * returns the URL where the DTD defining the OGC WMS capabilities is located
215 *
216 * @return URL
217 */
218 public URL getDTDLocation() {
219 return this.dtdLocation;
220 }
221
222 /**
223 * returns the proxy used with the WMS.
224 *
225 * @return Proxy
226 */
227 public Proxy getProxy() {
228 return this.proxy;
229 }
230
231 /**
232 * returns true if a map shall be rendered with antialising
233 *
234 * @return boolean
235 */
236 public boolean isAntiAliased() {
237 return this.antiAliased;
238 }
239
240 /**
241 * returns the radius (pixel) of the area considered for a feature info request (default = 5px)
242 *
243 * @return int
244 */
245 public int getFeatureInfoRadius() {
246 return this.featureInfoRadius;
247 }
248
249 /**
250 * returns a list of templated for which PrintMap requests shall be handled synchronously
251 *
252 * @return List
253 */
254 public List<String> getSynchronousTemplates() {
255 return this.synchList;
256 }
257
258 /**
259 * @return Returns the cacheDatabase.
260 */
261 public CacheDatabase getCacheDatabase() {
262 return this.cacheDatabase;
263 }
264
265 /**
266 * @return Returns the printMapParam.
267 */
268 public PrintMapParam getPrintMapParam() {
269 return this.printMapParam;
270 }
271
272
273
274
275
276 }