001 //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/portal/context/GeneralExtension.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.portal.context; 037 038 import java.net.URL; 039 040 /** 041 * this class encapsulates the deegree specific extensions of the general section of a web map context document. this is 042 * a description of the GUI including the used modules (<tt>Frontend</tt>) and the parameters to control the map view ( 043 * <tt>Marshallable</tt>). 044 * 045 * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a> 046 * @author last edited by: $Author: apoth $ 047 * 048 * @version $Revision: 21693 $, $Date: 2010-01-03 15:07:54 +0100 (So, 03 Jan 2010) $ 049 */ 050 public class GeneralExtension { 051 private Frontend frontend; 052 053 private MapParameter mapParameter; 054 055 private IOSettings iOSettings; 056 057 private AuthentificationSettings authSettings; 058 059 private boolean transparent = true; 060 061 private String bgColor = "0xFFFFFF"; 062 063 private String mode; 064 065 private Node layerTreeRoot; 066 067 private MapModel mapModel; 068 069 private URL xslt; 070 071 /** 072 * Creates a new GeneralExtension object. 073 * 074 * @param iOSettings 075 * 076 * @param frontend 077 * @param mapParameter 078 * @param authSettings 079 * @param mode 080 * @param layerTreeRoot 081 */ 082 public GeneralExtension( IOSettings iOSettings, Frontend frontend, MapParameter mapParameter, 083 AuthentificationSettings authSettings, String mode, Node layerTreeRoot ) { 084 setFrontend( frontend ); 085 setMapParameter( mapParameter ); 086 setIOSettings( iOSettings ); 087 setAuthentificationSettings( authSettings ); 088 setLayerTreeRoot( layerTreeRoot ); 089 this.mode = mode; 090 091 } 092 093 /** 094 * Creates a new GeneralExtension object. 095 * 096 * @param iOSettings 097 * 098 * @param frontend 099 * @param mapParameter 100 * @param authSettings 101 * @param mode 102 * @param layerTreeRoot 103 * @param mapModel 104 * @param xslt 105 */ 106 public GeneralExtension( IOSettings iOSettings, Frontend frontend, MapParameter mapParameter, 107 AuthentificationSettings authSettings, String mode, Node layerTreeRoot, MapModel mapModel, 108 URL xslt ) { 109 this( iOSettings, frontend, mapParameter, authSettings, mode, layerTreeRoot ); 110 this.mapModel = mapModel; 111 this.xslt = xslt; 112 } 113 114 /** 115 * @return the xslt 116 */ 117 public URL getXslt() { 118 return xslt; 119 } 120 121 /** 122 * @param xslt 123 * the xslt to set 124 */ 125 public void setXslt( URL xslt ) { 126 this.xslt = xslt; 127 } 128 129 /** 130 * @return the mapModel 131 */ 132 public MapModel getMapModel() { 133 return mapModel; 134 } 135 136 /** 137 * @param mapModel 138 * the mapModel to set 139 */ 140 public void setMapModel( MapModel mapModel ) { 141 this.mapModel = mapModel; 142 } 143 144 /** 145 * returns true if the maps background should be transparent 146 * 147 * @return <code>true</code> if the maps background should be transparent 148 */ 149 public boolean isTransparent() { 150 return transparent; 151 } 152 153 /** 154 * @see #isTransparent() 155 * @param transparent 156 */ 157 public void setTransparent( boolean transparent ) { 158 this.transparent = transparent; 159 } 160 161 /** 162 * returns the desired background color of the map 163 * 164 * @return the desired background color of the map 165 */ 166 public String getBgColor() { 167 return bgColor; 168 } 169 170 /** 171 * @see #getBgColor() 172 * @param bgColor 173 */ 174 public void setBgColor( String bgColor ) { 175 this.bgColor = bgColor; 176 } 177 178 /** 179 * returns the frontend (GUI) description encapsulating objekt 180 * 181 * @return the frontend (GUI) description encapsulating objekt 182 */ 183 public Frontend getFrontend() { 184 return frontend; 185 } 186 187 /** 188 * sets the frontend (GUI) description encapsulating objekt 189 * 190 * @param frontend 191 * <tt>Frontend</tt> 192 */ 193 public void setFrontend( Frontend frontend ) { 194 this.frontend = frontend; 195 } 196 197 /** 198 * returns the parameters describing the control options for the map 199 * 200 * @return <tt>MapParameter</tt> encapsulating several control params 201 */ 202 public MapParameter getMapParameter() { 203 return mapParameter; 204 } 205 206 /** 207 * sets the parameters describing the control options for the map 208 * 209 * @param mapParameter 210 * <tt>MapParameter</tt> encapsulating several control params 211 */ 212 public void setMapParameter( MapParameter mapParameter ) { 213 this.mapParameter = mapParameter; 214 } 215 216 /** 217 * @return Returns the iOSettings. 218 */ 219 public IOSettings getIOSettings() { 220 return iOSettings; 221 } 222 223 /** 224 * @param settings 225 * The iOSettings to set. 226 */ 227 public void setIOSettings( IOSettings settings ) { 228 iOSettings = settings; 229 } 230 231 /** 232 * @return the authenication settings 233 */ 234 public AuthentificationSettings getAuthentificationSettings() { 235 return authSettings; 236 } 237 238 /** 239 * @param authSettings 240 * the new authentication settings. 241 */ 242 public void setAuthentificationSettings( AuthentificationSettings authSettings ) { 243 this.authSettings = authSettings; 244 } 245 246 /** 247 * returns the current mode of a map client using a WMC. A mode defines the action that occurs if a user performs a 248 * mouse action on the map 249 * 250 * @return the current mode of a map client using a WMC. A mode defines the action that occurs if a user performs a 251 * mouse action on the map 252 */ 253 public String getMode() { 254 return mode; 255 } 256 257 /** 258 * @see #getMode() 259 * @param mode 260 */ 261 public void setMode( String mode ) { 262 this.mode = mode; 263 } 264 265 /** 266 * @param layerTreeRoot 267 * to set 268 */ 269 public void setLayerTreeRoot( Node layerTreeRoot ) { 270 this.layerTreeRoot = layerTreeRoot; 271 } 272 273 /** 274 * @return the xml-element containing the layer tree root. 275 */ 276 public Node getLayerTreeRoot() { 277 return layerTreeRoot; 278 } 279 280 }