001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/graphics/sld/AbstractSymbolizer.java $
002 /*---------------- FILE HEADER ------------------------------------------
003
004 This file is part of deegree.
005 Copyright (C) 2001-2006 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.graphics.sld;
045
046 /**
047 * This is the basis of all symbolizers. It defines the method <tt>getGeometry</tt> that's common
048 * to all symbolizers.
049 * <p>
050 * ----------------------------------------------------------------------
051 * </p>
052 *
053 * @author <a href="mailto:k.lupp@web.de">Katharina Lupp</a>
054 * @version $Revision: 6259 $ $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
055 */
056
057 public abstract class AbstractSymbolizer implements Symbolizer {
058 protected double maxDenominator = 9E99;
059
060 protected double minDenominator = 0;
061
062 protected Geometry geometry = null;
063
064 protected String responsibleClass = null;
065
066 /**
067 * default constructor
068 */
069 AbstractSymbolizer() {
070 }
071
072 /**
073 * constructor initializing the class with the <Symbolizer>
074 */
075 AbstractSymbolizer( Geometry geometry ) {
076 setGeometry( geometry );
077 }
078
079 /**
080 * constructor initializing the class with the <Symbolizer>
081 */
082 AbstractSymbolizer( Geometry geometry, String resonsibleClass ) {
083 setGeometry( geometry );
084 setResponsibleClass( resonsibleClass );
085 }
086
087 /**
088 * The Geometry element is optional and if it is absent then the default geometry property of
089 * the feature type that is used in the containing FeatureStyleType is used. The precise meaning
090 * of default geometry property is system-dependent. Most frequently, feature types will have
091 * only a single geometry property.
092 *
093 * @return the geometry of the symbolizer
094 *
095 */
096 public Geometry getGeometry() {
097 return geometry;
098 }
099
100 /**
101 * sets the <Geometry>
102 *
103 * @param geometry
104 * the geometry of the symbolizer
105 *
106 */
107 public void setGeometry( Geometry geometry ) {
108 this.geometry = geometry;
109 }
110
111 /**
112 * @return the MinScaleDenominator
113 */
114 public double getMinScaleDenominator() {
115 return minDenominator;
116 }
117
118 /**
119 * @param minDenominator
120 * the MinScaleDenominator
121 */
122 public void setMinScaleDenominator( double minDenominator ) {
123 this.minDenominator = minDenominator;
124 }
125
126 /**
127 * @return the MaxScaleDenominator
128 */
129 public double getMaxScaleDenominator() {
130 return maxDenominator;
131 }
132
133 /**
134 * @param maxDenominator
135 * the MaxScaleDenominator
136 */
137 public void setMaxScaleDenominator( double maxDenominator ) {
138 this.maxDenominator = maxDenominator;
139 }
140
141 /**
142 * returns the name of a class that will be used for rendering the current symbolizer. This
143 * enables a user to define his own rendering class (DisplayElement) for a symbolizer to realize
144 * styles/renderings that can't be defined using SLD at the moment.<BR>
145 * The returned class must extend
146 * org.deegree_impl.graphics.displayelements.GeometryDisplayElement_Impl<BR>
147 * For default the method returns the deegree default class name for rendering the current
148 * symbolizer.
149 *
150 * @return the name of a class that will be used for rendering the current symbolizer.
151 *
152 */
153 public String getResponsibleClass() {
154 return responsibleClass;
155 }
156
157 /**
158 * sets a class that will be used for rendering the current symbolizer. This enables a user to
159 * define his own rendering class (DisplayElement) for a symbolizer to realize styles/renderings
160 * that can't be defined using SLD at the moment.<BR>
161 * The passed class must extend
162 * org.deegree_impl.graphics.displayelements.GeometryDisplayElement_Impl
163 *
164 * @param responsibleClass
165 *
166 */
167 public void setResponsibleClass( String responsibleClass ) {
168 this.responsibleClass = responsibleClass;
169 }
170
171 }
172 /***************************************************************************************************
173 * <code>
174 Changes to this class. What the people have been up to:
175
176 $Log$
177 Revision 1.8 2007/01/26 14:10:30 wanhoff
178 fixed Javadoc @return tag and footer
179
180 Revision 1.7 2006/07/12 14:46:14 poth
181 comment footer added
182
183 </code>
184 **************************************************************************************************/