001    //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/ogcwebservices/wms/capabilities/UserDefinedSymbolization.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.capabilities;
037    
038    
039    
040    /**
041     * The interface defines the access to optional user-defined symbolization
042     * that are only used by SLD-enabled WMSes.
043     * <p>----------------------------------------------------------------------</p>
044     *
045     * @author <a href="mailto:k.lupp@web.de">Katharina Lupp</a>
046     * @author <a href="mailto:mschneider@lat-lon.de">Markus Schneider</a>
047     * @version $Revision: 18195 $
048     */
049    public class UserDefinedSymbolization {
050        private boolean remoteWFS = false;
051        private boolean sldSupported = false;
052        private boolean userLayer = false;
053        private boolean userStyle = false;
054    
055    
056        /**
057        * constructor initializing the class with the <UserDefinedSymbolization>
058         * @param sldSupported
059         * @param userLayer
060         * @param remoteWFSEnabled
061         * @param userStyle
062        */
063        public UserDefinedSymbolization( boolean sldSupported, boolean userLayer,
064                                  boolean remoteWFSEnabled, boolean userStyle ) {
065            setSldSupported( sldSupported );
066            setUserLayerSupported( userLayer );
067            setRemoteWFSSupported( remoteWFSEnabled );
068            setUserStyleSupported( userStyle );
069        }
070    
071        /**
072         * @return true if layer and/or style definition conform to SLD
073         * are supported.
074         */
075        public boolean isSldSupported() {
076            return sldSupported;
077        }
078    
079        /**
080        * sets true if layer and/or style definition conform to SLD
081        * are supported.
082         * @param sldSupported
083        */
084        public void setSldSupported( boolean sldSupported ) {
085            this.sldSupported = sldSupported;
086        }
087    
088        /**
089         * @return true if the WMS has user defined layers.
090         */
091        public boolean isUserLayerSupported() {
092            return userLayer;
093        }
094    
095        /**
096        * sets true if the WMS has user defined layers.
097         * @param userLayer
098        */
099        public void setUserLayerSupported( boolean userLayer ) {
100            this.userLayer = userLayer;
101        }
102    
103        /**
104         * @return true if the WMS has user defined styles.
105         */
106        public boolean isUserStyleSupported() {
107            return userStyle;
108        }
109    
110        /**
111        * sets true if the WMS has user defined styles.
112         * @param userStyle
113        */
114        public void setUserStyleSupported( boolean userStyle ) {
115            this.userStyle = userStyle;
116        }
117    
118        /**
119         * @return true if the WMS enables the use of a remote (user defined)
120         * WFS.
121         */
122        public boolean isRemoteWFSSupported() {
123            return remoteWFS;
124        }
125    
126        /**
127        * sets true if the WMS enables the use of a remote (user defined)
128        * WFS.
129         * @param remoteWFSEnabled
130        */
131        public void setRemoteWFSSupported( boolean remoteWFSEnabled ) {
132            this.remoteWFS = remoteWFSEnabled;
133        }
134    
135        @Override
136        public String toString() {
137            String ret = null;
138            ret = "sldSupported = " + sldSupported + "\n";
139            ret += ( "userLayer = " + userLayer + "\n" );
140            ret += ( "remoteWFSEnabled = " + remoteWFS + "\n" );
141            ret += ( "userStyle = " + userStyle + "\n" );
142            return ret;
143        }
144    
145    }