001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/ogcwebservices/wmps/configuration/WMPSDeegreeParams.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.wmps.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    import org.deegree.ogcwebservices.wms.capabilities.GazetteerParam;
045    
046    /**
047     * WMPS specific deegree parameters container class.
048     *
049     * @author <a href="mailto:deshmukh@lat-lon.de">Anup Deshmukh</a>
050     * @version 2.0
051     */
052    public class WMPSDeegreeParams extends DeegreeParams {
053    
054        private static final long serialVersionUID = 6954454089387042783L;
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 = "deegree (c)";
065    
066        private GazetteerParam gazetteer;
067    
068        private URL schemaLocation;
069    
070        private URL dtdLocation;
071    
072        private Proxy proxy;
073    
074        private boolean antiAliased;
075    
076        private List<String> synchList;
077    
078        private CacheDatabase cacheDatabase;
079    
080        private PrintMapParam printMapParam;
081    
082        /**
083         * Create a new WMPSDeegreeParams instance.
084         *
085         * @param cacheSize
086         * @param maxLifeTime
087         * @param requestTimeLimit
088         * @param mapQuality
089         * @param defaultOnlineResource
090         * @param maxMapWidth
091         * @param maxMapHeight
092         * @param antiAliased
093         * @param copyRight
094         * @param gazetteer
095         * @param schemaLocation
096         * @param dtdLocation
097         * @param proxy
098         * @param synchList
099         * @param printMapParam
100         * @param cacheDatabase
101         */
102        public WMPSDeegreeParams( int cacheSize, int maxLifeTime, int requestTimeLimit,
103                                 float mapQuality, OnlineResource defaultOnlineResource,
104                                 int maxMapWidth, int maxMapHeight, boolean antiAliased,
105                                 String copyRight, GazetteerParam gazetteer,
106                                 URL schemaLocation, URL dtdLocation, Proxy proxy,
107                                 List<String> synchList, CacheDatabase cacheDatabase,
108                                 PrintMapParam printMapParam ) {
109    
110            super( defaultOnlineResource, cacheSize, requestTimeLimit );
111            this.maxLifeTime = maxLifeTime;
112            this.mapQuality = mapQuality;
113            this.maxMapHeight = maxMapHeight;
114            this.maxMapWidth = maxMapWidth;
115            this.antiAliased = antiAliased;
116            this.copyright = copyRight;
117            this.gazetteer = gazetteer;
118            this.schemaLocation = schemaLocation;
119            this.dtdLocation = dtdLocation;
120            this.proxy = proxy;
121            this.synchList = synchList;
122            this.cacheDatabase = cacheDatabase;
123            this.printMapParam = printMapParam;
124        }
125    
126        /**
127         * returns the maximum life time of the internal processes (Threads) of the deegree WMS. default
128         * is 3600 seconds. Datasources that are linked to WMS are not targeted by this value.
129         *
130         * @return int
131         */
132        public int getMaxLifeTime() {
133            return this.maxLifeTime;
134        }
135    
136        /**
137         * returns a copy right note to draw at the left side of the maps bottom
138         *
139         * @return String
140         */
141        public String getCopyright() {
142            return this.copyright;
143        }
144    
145        /**
146         * returns the quality of the map for none loss-less image formats. the value ranges from 0
147         * (lowest quality) to 1 (best quality)
148         * <p>
149         * Default is 0.95
150         *
151         * @return float
152         */
153        public float getMapQuality() {
154            return this.mapQuality;
155        }
156    
157        /**
158         * returns the maximum map height that can be requested. If the PrintMap-Parameter 'HEIGHT'
159         * extends max map width an exception shall be returned to the client.
160         * <p>
161         * Default is 1000
162         *
163         * @return int
164         */
165        public int getMaxMapHeight() {
166            return this.maxMapHeight;
167        }
168    
169        /**
170         * returns the maximum map width that can be requested. If the PrintMap-Parameter 'WIDTH'
171         * extends max map width an exception shall be returned to the client.
172         * <p>
173         * Default is 1000
174         *
175         * @return int
176         */
177        public int getMaxMapWidth() {
178            return this.maxMapWidth;
179        }
180    
181        /**
182         * returns the URL where to access the gazetteer service associated with the WMS
183         *
184         * @return GazetteerParam
185         */
186        public GazetteerParam getGazetteer() {
187            return this.gazetteer;
188        }
189    
190        /**
191         * returns the URL where the sxm schema definition of the response to an GetFeatureInfo request
192         * is located
193         *
194         * @return URL
195         */
196        public URL getSchemaLocation() {
197            return this.schemaLocation;
198        }
199    
200        /**
201         * returns the URL where the DTD defining the OGC WMS capabilities is located
202         *
203         * @return URL
204         */
205        public URL getDTDLocation() {
206            return this.dtdLocation;
207        }
208    
209        /**
210         * returns the proxy used with the WMS.
211         *
212         * @return Proxy
213         */
214        public Proxy getProxy() {
215            return this.proxy;
216        }
217    
218        /**
219         * returns true if a map shall be rendered with antialising
220         *
221         * @return boolean
222         */
223        public boolean isAntiAliased() {
224            return this.antiAliased;
225        }
226    
227    
228        /**
229         * returns a list of templated for which PrintMap requests shall be handled synchronously
230         *
231         * @return List
232         */
233        public List<String> getSynchronousTemplates() {
234            return this.synchList;
235        }
236    
237        /**
238         * @return Returns the cacheDatabase.
239         */
240        public CacheDatabase getCacheDatabase() {
241            return this.cacheDatabase;
242        }
243    
244        /**
245         * @return Returns the printMapParam.
246         */
247        public PrintMapParam getPrintMapParam() {
248            return this.printMapParam;
249        }
250    
251    
252    
253    
254    
255    }