001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/wms/configuration/WMSDeegreeParams.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.wms.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    
053    
054    /**
055     * 
056     *
057     * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a>
058     * @author <a href="mailto:mschneider@lat-lon.de">Markus Schneider</a>
059     * @version $Revision: 9345 $
060     */
061    public class WMSDeegreeParams extends DeegreeParams {
062        
063        private static final long serialVersionUID = -8725187234309726943L;
064    
065        private float mapQuality = 0.95f;
066        
067        private int maxLifeTime = 3600;
068        
069        private int maxMapWidth = 1000;
070        
071        private int maxMapHeight = 1000;   
072        
073        private String copyRight = "";
074        
075        private URL schemaLocation = null;
076        
077        private URL dtdLocation = null;
078        
079        private Proxy proxy = null;
080        
081        private boolean antiAliased = false;
082        
083        private int featureInfoRadius = 5;
084        
085        private List<String> supportedVersions;
086        
087        private URL featureSchemaLocation;
088        
089        private String featureSchemaNamespace;
090       
091    
092        /**
093         * 
094         * @param cacheSize
095         * @param maxLifeTime
096         * @param requestTimeLimit
097         * @param mapQuality
098         * @param defaultOnlineResource
099         * @param maxMapWidth
100         * @param maxMapHeight
101         * @param antiAliased
102         * @param featureInfoRadius (default = 5)
103         * @param copyRight
104         * @param schemaLocation
105         * @param dtdLocation
106         * @param proxy
107         * @param supportedVersions 
108         * @param featureSchemaLocation 
109         * @param featureSchemaNamespace
110         */
111        public WMSDeegreeParams( int cacheSize, int maxLifeTime, int requestTimeLimit, float mapQuality, 
112                          OnlineResource defaultOnlineResource, int maxMapWidth,
113                          int maxMapHeight, boolean antiAliased, int featureInfoRadius, String copyRight, 
114                          URL schemaLocation, URL dtdLocation, Proxy proxy, List<String> supportedVersions, 
115                          URL featureSchemaLocation, String featureSchemaNamespace ) {
116            super( defaultOnlineResource, cacheSize, requestTimeLimit);
117            this.maxLifeTime = maxLifeTime;
118            this.mapQuality = mapQuality;
119            this.maxMapHeight = maxMapHeight;
120            this.maxMapWidth = maxMapWidth;
121            this.antiAliased = antiAliased;
122            this.copyRight = copyRight;
123            this.schemaLocation = schemaLocation;
124            this.dtdLocation = dtdLocation;
125            this.proxy = proxy;
126            this.featureInfoRadius = featureInfoRadius;
127            this.supportedVersions = supportedVersions;
128            this.featureSchemaLocation = featureSchemaLocation;
129            this.featureSchemaNamespace = featureSchemaNamespace;
130        }
131    
132        /** 
133         * @return the maximum life time of the internal processes (Threads) of
134         * the deegree WMS. default is 3600 seconds. Datasources that are linked
135         * to WMS are not targeted by this value.
136         *
137         *
138         */
139        public int getMaxLifeTime() {
140            return maxLifeTime;
141        }
142        
143        /** 
144         * @return a copy right note to draw at the left side of the maps bottom
145         *
146         */
147        public String getCopyRight() {
148            return copyRight;
149        }
150        
151        /** 
152         * @return the quality of the map for none loss-less image formats. the
153         * value ranges from 0 (lowest quality) to 1 (best quality)
154         * <p>Default is 0.95
155         */
156        public float getMapQuality() {
157            return mapQuality;
158        }
159        
160        /** 
161         * @return the maximum map height that can be requested. If the GetMap-Parameter
162         * 'HEIGHT' extends max map width an exception shall be returned to the client.
163         * <p>Default is 1000 
164         */
165        public int getMaxMapHeight() {
166            return maxMapHeight;
167        }
168        
169        /** 
170         * @return the maximum map width that can be requested. If the GetMap-Parameter
171         * 'WIDTH' extends max map width an exception shall be returned to the client.
172         * <p>Default is 1000 
173         */
174        public int getMaxMapWidth() {
175            return maxMapWidth;
176        }
177        
178        /**
179         * @return the URL where the sxm schema definition of the response to an
180         * GetFeatureInfo request is located
181         */
182        public URL getSchemaLocation() {
183            return schemaLocation;
184        }  
185        
186        /**
187         * @return the URL where the DTD defining the OGC WMS capabilities is located
188         */
189        public URL getDTDLocation() {
190            return dtdLocation;
191        }
192        
193        /**
194         * @return the proxy used with the WMS. 
195         */
196        public Proxy getProxy() {
197            return proxy;
198        }    
199        
200        /**
201         * @return true if a map shall be rendered with antialising
202         */   
203        public boolean isAntiAliased() {
204            return antiAliased;
205        }
206         
207        /**
208         * @return the radius (pixel) of the area considered for a feature info request 
209         * (default = 5px) 
210         */
211        public int getFeatureInfoRadius() {
212            return featureInfoRadius;
213        }
214    
215        /**
216         * @return the supportedVersions.
217         */
218        public List<String> getSupportedVersions() {
219            return supportedVersions;
220        }
221    
222        /**
223         * @param maxMapHeight The maxMapHeight to set.
224         */
225        public void setMaxMapHeight( int maxMapHeight ) {
226            this.maxMapHeight = maxMapHeight;
227        }
228    
229        /**
230         * @param maxMapWidth The maxMapWidth to set.
231         */
232        public void setMaxMapWidth( int maxMapWidth ) {
233            this.maxMapWidth = maxMapWidth;
234        }
235    
236        /**
237         * @return Returns the featureSchemaLocation.
238         */
239        public URL getFeatureSchemaLocation() {
240            return featureSchemaLocation;
241        }
242    
243        /**
244         * @return Returns the featureSchemaNamespace.
245         */
246        public String getFeatureSchemaNamespace() {
247            return featureSchemaNamespace;
248        }
249    
250    }