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