Source Code Cross Referenced for Rule.java in  » GIS » GeoTools-2.4.1 » org » geotools » styling » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.styling 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2002-2006, GeoTools Project Managment Committee (PMC)
005:         *    (C) 2002, Centre for Computational Geography
006:         *
007:         *    This library is free software; you can redistribute it and/or
008:         *    modify it under the terms of the GNU Lesser General Public
009:         *    License as published by the Free Software Foundation;
010:         *    version 2.1 of the License.
011:         *
012:         *    This library is distributed in the hope that it will be useful,
013:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015:         *    Lesser General Public License for more details.
016:         */
017:        package org.geotools.styling;
018:
019:        import org.opengis.filter.Filter;
020:        import org.geotools.event.GTComponent;
021:
022:        /**
023:         * A rule is used to attach a condition to, and group, the individual
024:         * symbolizers used for rendering.  The Title and Abstract describe the rule
025:         * and may be used to generate a legend, as may the LegendGraphic. The Filter,
026:         * ElseFilter, MinScale and MaxScale elements allow the selection of features
027:         * and rendering scales for a rule.  The scale selection works as follows.
028:         * When a map is to be rendered, the scale denominator is computed and all
029:         * rules in all UserStyles that have a scale outside of the request range are
030:         * dropped.  (This also includes Rules that have an ElseFilter.)  An
031:         * ElseFilter is simply an ELSE condition to the conditions (Filters) of all
032:         * other rules in the same UserStyle. The exact meaning of the ElseFilter is
033:         * determined after Rules have been eliminated for not fitting the rendering
034:         * scale.  This definition of the behaviour of ElseFilters may seem a little
035:         * strange, but it allows for scale-dependent and scale-independent ELSE
036:         * conditions.  For the Filter, only SqlExpression is available for
037:         * specification, but this is a hack and should be replaced with Filter as
038:         * defined in WFS. A missing Filter element means "always true".  If a set of
039:         * Rules has no ElseFilters, then some features may not be rendered (which is
040:         * presumably the desired behavior).  The Scales are actually scale
041:         * denominators (as double floats), so "10e6" would be interpreted as 1:10M. A
042:         * missing MinScale means there is no lower bound to the scale-denominator
043:         * range (lim[x->0+](x)), and a missing MaxScale means there is no upper bound
044:         * (infinity).  0.28mm
045:         *
046:         * <p>
047:         * The details of this object are taken from the <a
048:         * href="https://portal.opengeospatial.org/files/?artifact_id=1188"> OGC
049:         * Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.</a>:
050:         * <pre><code>
051:         * &lt;xsd:element name="Rule"&gt;
052:         *   &lt;xsd:annotation&gt;
053:         *     &lt;xsd:documentation&gt;
054:         *       A Rule is used to attach property/scale conditions to and group
055:         *       the individual symbolizers used for rendering.
056:         *     &lt;/xsd:documentation&gt;
057:         *   &lt;/xsd:annotation&gt;
058:         *   &lt;xsd:complexType&gt;
059:         *     &lt;xsd:sequence&gt;
060:         *       &lt;xsd:element ref="sld:Name" minOccurs="0"/&gt;
061:         *       &lt;xsd:element ref="sld:Title" minOccurs="0"/&gt;
062:         *       &lt;xsd:element ref="sld:Abstract" minOccurs="0"/&gt;
063:         *       &lt;xsd:element ref="sld:LegendGraphic" minOccurs="0"/&gt;
064:         *       &lt;xsd:choice minOccurs="0"&gt;
065:         *         &lt;xsd:element ref="ogc:Filter"/&gt;
066:         *         &lt;xsd:element ref="sld:ElseFilter"/&gt;
067:         *       &lt;/xsd:choice&gt;
068:         *       &lt;xsd:element ref="sld:MinScaleDenominator" minOccurs="0"/&gt;
069:         *       &lt;xsd:element ref="sld:MaxScaleDenominator" minOccurs="0"/&gt;
070:         *       &lt;xsd:element ref="sld:Symbolizer" maxOccurs="unbounded"/&gt;
071:         *     &lt;/xsd:sequence&gt;
072:         *   &lt;/xsd:complexType&gt;
073:         * &lt;/xsd:element&gt;
074:         * </code></pre>
075:         * </p>
076:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/styling/Rule.java $
077:         */
078:        public interface Rule extends GTComponent {
079:            /**
080:             * Gets the name of the rule.
081:             *
082:             * @return The name of the rule.  This provides a way to identify a rule.
083:             */
084:            String getName();
085:
086:            /**
087:             * Sets the name of the rule.
088:             *
089:             * @param name The name of the rule.  This provides a way to identify a
090:             *        rule.
091:             */
092:            void setName(String name);
093:
094:            /**
095:             * Gets the title.
096:             *
097:             * @return The title of the rule.  This is a brief, human readable,
098:             *         description of the rule.
099:             */
100:            String getTitle();
101:
102:            /**
103:             * Sets the title.
104:             *
105:             * @param title The title of the rule.  This is a brief, human readable,
106:             *        description of the rule.
107:             */
108:            void setTitle(String title);
109:
110:            /**
111:             * Gets the abstract text for the rule.
112:             *
113:             * @return The abstract text, a more detailed description of the rule.
114:             */
115:            String getAbstract();
116:
117:            /**
118:             * Sets the abstract text for the rule.
119:             *
120:             * @param abstractStr The abstract text, a more detailed description of the
121:             *        rule.
122:             */
123:            void setAbstract(String abstractStr);
124:
125:            /**
126:             * The smallest value for scale denominator at which symbolizers contained
127:             * by this rule should be applied.
128:             *
129:             * @return The smallest (inclusive) denominator value that this rule will
130:             *         be active for.
131:             */
132:            double getMinScaleDenominator();
133:
134:            /**
135:             * The smallest value for scale denominator at which symbolizers contained
136:             * by this rule should be applied.
137:             *
138:             * @param scale The smallest (inclusive) denominator value that this rule
139:             *        will be active for.
140:             */
141:            void setMinScaleDenominator(double scale);
142:
143:            /**
144:             * The largest value for scale denominator at which symbolizers contained
145:             * by this rule should be applied.
146:             *
147:             * @return The largest (exclusive) denominator value that this rule will be
148:             *         active for.
149:             */
150:            double getMaxScaleDenominator();
151:
152:            /**
153:             * The largest value for scale denominator at which symbolizers contained
154:             * by this rule should be applied.
155:             *
156:             * @param scale The largest (exclusive) denominator value that this rule
157:             *        will be active for.
158:             */
159:            void setMaxScaleDenominator(double scale);
160:
161:            Filter getFilter();
162:
163:            void setFilter(Filter filter);
164:
165:            boolean hasElseFilter();
166:
167:            void setIsElseFilter(boolean defaultb);
168:
169:            /**
170:             * A set of equivalent Graphics in different formats which can be used as a
171:             * legend against features stylized by the symbolizers in this rule.
172:             *
173:             * @return An array of Graphic objects, any of which can be used as the
174:             *         legend.
175:             */
176:            Graphic[] getLegendGraphic();
177:
178:            /**
179:             * A set of equivalent Graphics in different formats which can be used as a
180:             * legend against features stylized by the symbolizers in this rule.
181:             *
182:             * @param graphics An array of Graphic objects, any of which can be used as
183:             *        the legend.
184:             */
185:            void setLegendGraphic(Graphic[] graphics);
186:
187:            /**
188:             * The symbolizers contain the actual styling information for different
189:             * geometry types.  A single feature may be rendered by more than one of
190:             * the symbolizers returned by this method.  It is important that the
191:             * symbolizers be applied in the order in which they are returned if the
192:             * end result is to be as intended. All symbolizers should be applied to
193:             * all features which make it through the filters in this rule regardless
194:             * of the features' geometry. For example, a polygon symbolizer should be
195:             * applied to line geometries and even points.  If this is not the desired
196:             * beaviour, ensure that either the filters block inappropriate features
197:             * or that the FeatureTypeStyler which contains this rule has its
198:             * FeatureTypeName or SemanticTypeIdentifier set appropriately.
199:             *
200:             * @return An array of symbolizers to be applied, in sequence, to all of
201:             *         the features addressed by the FeatureTypeStyler which contains
202:             *         this rule.
203:             */
204:            Symbolizer[] getSymbolizers();
205:
206:            /**
207:             * The symbolizers contain the actual styling information for different
208:             * geometry types.  A single feature may be rendered by more than one of
209:             * the symbolizers returned by this method.  It is important that the
210:             * symbolizers be applied in the order in which they are returned if the
211:             * end result is to be as intended. All symbolizers should be applied to
212:             * all features which make it through the filters in this rule regardless
213:             * of the features' geometry. For example, a polygon symbolizer should be
214:             * applied to line geometries and even points.  If this is not the desired
215:             * beaviour, ensure that either the filters block inappropriate features
216:             * or that the FeatureTypeStyler which contains this rule has its
217:             * FeatureTypeName or SemanticTypeIdentifier set appropriately.
218:             *
219:             * @param symbolizers An array of symbolizers to be applied, in sequence,
220:             *        to all of the features addressed by the FeatureTypeStyler which
221:             *        contains this rule.
222:             */
223:            void setSymbolizers(Symbolizer[] symbolizers);
224:
225:            void accept(StyleVisitor visitor);
226:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.