svn-gvsig-desktop / branches / v02_desarrollo / libraries / sld / using-sld-model / org.gvsig.sldsupport / org.gvsig.sldsupport.lib / org.gvsig.sldsupport.lib.api / src / main / java / org / gvsig / sldsupport / rule / SLDRule.java @ 40758
History | View | Annotate | Download (5.77 KB)
1 |
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib��ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package org.gvsig.sldsupport.rule; |
42 |
|
43 |
import java.util.ArrayList; |
44 |
import java.util.HashSet; |
45 |
import java.util.Set; |
46 |
|
47 |
import org.gvsig.sldsupport.feature.ISLDFeatures; |
48 |
import org.gvsig.sldsupport.filterencoding.Filter; |
49 |
import org.gvsig.sldsupport.graphic.SLDLegendGraphic; |
50 |
import org.gvsig.sldsupport.symbolizer.ISLDSymbolizer; |
51 |
import org.gvsig.sldsupport.symbolizer.SLDLineSymbolizer; |
52 |
import org.gvsig.sldsupport.symbolizer.SLDPointSymbolizer; |
53 |
import org.gvsig.sldsupport.symbolizer.SLDPolygonSymbolizer; |
54 |
|
55 |
|
56 |
/**
|
57 |
* Implements the Rule element of an SLD specification.<br>
|
58 |
*
|
59 |
* Rules are used to group rendering instructions by feature-property
|
60 |
* conditions and map scales.Rule definitions are placed inmediatelly inside
|
61 |
* of feature-style definitions.
|
62 |
*
|
63 |
* @see http://portal.opengeospatial.org/files/?artifact_id=1188
|
64 |
* @author Pepe Vidal Salvador - jose.vidal.salvador@iver.es
|
65 |
*/
|
66 |
public abstract class SLDRule implements ISLDFeatures { |
67 |
|
68 |
protected String name; |
69 |
protected String title; |
70 |
protected String ruleAbstract; |
71 |
protected SLDLegendGraphic legendGraphic;
|
72 |
protected double minScaleDenominator; |
73 |
protected double maxScaleDenominator; |
74 |
protected Filter filter; |
75 |
protected Filter elseFilter; |
76 |
protected ArrayList<ISLDSymbolizer>lineSymbolizers = new ArrayList<ISLDSymbolizer>(); |
77 |
protected ArrayList<ISLDSymbolizer>pointSymbolizers = new ArrayList<ISLDSymbolizer>(); |
78 |
protected ArrayList<ISLDSymbolizer>polygonSymbolizers = new ArrayList<ISLDSymbolizer>(); |
79 |
protected ArrayList<ISLDSymbolizer>textSymbolizers = new ArrayList<ISLDSymbolizer>(); |
80 |
protected ArrayList<ISLDSymbolizer>rasterSymbolizers = new ArrayList<ISLDSymbolizer>(); |
81 |
Set <String> fieldNames = new HashSet <String>(); |
82 |
|
83 |
|
84 |
public String getName() { |
85 |
return name;
|
86 |
} |
87 |
public void setName(String name) { |
88 |
this.name = name;
|
89 |
} |
90 |
public String getTitle() { |
91 |
return title;
|
92 |
} |
93 |
public void setTitle(String title) { |
94 |
this.title = title;
|
95 |
} |
96 |
public String getRuleAbstract() { |
97 |
return ruleAbstract;
|
98 |
} |
99 |
public void setRuleAbstract(String ruleAbstract) { |
100 |
this.ruleAbstract = ruleAbstract;
|
101 |
} |
102 |
public SLDLegendGraphic getLegendGraphic() {
|
103 |
return legendGraphic;
|
104 |
} |
105 |
public void setLegendGraphic(SLDLegendGraphic legendGraphic) { |
106 |
this.legendGraphic = legendGraphic;
|
107 |
} |
108 |
public double getMinScaleDenominator() { |
109 |
return minScaleDenominator;
|
110 |
} |
111 |
public void setMinScaleDenominator(double minScaleDenominator) { |
112 |
this.minScaleDenominator = minScaleDenominator;
|
113 |
} |
114 |
public double getMaxScaleDenominator() { |
115 |
return maxScaleDenominator;
|
116 |
} |
117 |
public void setMaxScaleDenominator(double maxScaleDenominator) { |
118 |
this.maxScaleDenominator = maxScaleDenominator;
|
119 |
} |
120 |
public Filter getFilter() { |
121 |
return filter;
|
122 |
} |
123 |
public void setFilter(Filter filter) { |
124 |
this.filter = filter;
|
125 |
} |
126 |
public Filter getElseFilter() { |
127 |
return elseFilter;
|
128 |
} |
129 |
public void setElseFilter(Filter elseFilter) { |
130 |
this.elseFilter = elseFilter;
|
131 |
} |
132 |
public ArrayList<ISLDSymbolizer> getLineSymbolizers() { |
133 |
return lineSymbolizers;
|
134 |
} |
135 |
public void setLineSymbolizers(ArrayList<ISLDSymbolizer> lineSymbolizers) { |
136 |
this.lineSymbolizers = lineSymbolizers;
|
137 |
} |
138 |
|
139 |
public ArrayList<ISLDSymbolizer> getPointSymbolizers() { |
140 |
return pointSymbolizers;
|
141 |
} |
142 |
public void setPointSymbolizers(ArrayList<ISLDSymbolizer> pointSymbolizers) { |
143 |
this.pointSymbolizers = pointSymbolizers;
|
144 |
} |
145 |
public ArrayList<ISLDSymbolizer> getPolygonSymbolizers() { |
146 |
return polygonSymbolizers;
|
147 |
} |
148 |
public void setPolygonSymbolizers(ArrayList<ISLDSymbolizer> polygonSymbolizers) { |
149 |
this.polygonSymbolizers = polygonSymbolizers;
|
150 |
} |
151 |
public ArrayList<ISLDSymbolizer> getTextSymbolizers() { |
152 |
return textSymbolizers;
|
153 |
} |
154 |
public void setTextSymbolizers(ArrayList<ISLDSymbolizer> textSymbolizers) { |
155 |
this.textSymbolizers = textSymbolizers;
|
156 |
} |
157 |
public ArrayList<ISLDSymbolizer> getRasterSymbolizers() { |
158 |
return rasterSymbolizers;
|
159 |
} |
160 |
public void setRasterSymbolizers(ArrayList<ISLDSymbolizer> rasterSymbolizers) { |
161 |
this.rasterSymbolizers = rasterSymbolizers;
|
162 |
} |
163 |
public Set<String> getFieldNames() { |
164 |
return fieldNames;
|
165 |
} |
166 |
public void setFieldNames(Set<String> fieldNames) { |
167 |
this.fieldNames = fieldNames;
|
168 |
} |
169 |
|
170 |
|
171 |
public void addLineSymbolizer(SLDLineSymbolizer sldLine) { |
172 |
this.lineSymbolizers.add(sldLine);
|
173 |
|
174 |
} |
175 |
|
176 |
|
177 |
public void addPolygonSymbolizer(SLDPolygonSymbolizer sldPolygon) { |
178 |
this.polygonSymbolizers.add(sldPolygon);
|
179 |
|
180 |
} |
181 |
|
182 |
|
183 |
public void addPointSymbolizer(SLDPointSymbolizer sldPoint) { |
184 |
this.pointSymbolizers.add(sldPoint);
|
185 |
|
186 |
} |
187 |
public abstract boolean hasFilter(); |
188 |
|
189 |
} |