Statistics
| Revision:

svn-gvsig-desktop / branches / v02_desarrollo / libraries / sld / temp / org.gvsig.sldsupport.lib.api / src / main / java / org / gvsig / sldsupport / style / SLDFeatureTypeStyle.java @ 40779

History | View | Annotate | Download (5.38 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.style;
42

    
43
import java.util.ArrayList;
44

    
45
import org.gvsig.sldsupport.feature.ISLDFeatures;
46
import org.gvsig.sldsupport.rule.SLDRule;
47
/**
48
 * Implements the FeatureTypeStyle element of an SLD implementation specification 
49
 * .<p>
50
 * The FeatureTypeStyle defines the styling that is to be applied to a single feature
51
 * type of a layer. This element may also be externally re-used outside of the WMSes
52
 * and layers.<p>
53
 * 
54
 * The FeatureTypeStyle element identifies that explicit separation between the
55
 * handling of features of specific feature types. The 'layer' concept is unique 
56
 * to WMS and SLD, but features are used more generally, such as in WFS and GML,
57
 * so this explicit separation is important.<p>
58
 * 
59
 * Like a UserStyle, a FeatureTypeStyle can have a Name, Title, and Abstract.
60
 * The Name element does not have an explicit use at present, though it conceivably
61
 * might be used to reference a feature style in some feature-style library. The Title
62
 * and Abstract are for human-readable information.<p>
63
 * 
64
 * The FeatureTypeName identifies the specific feature type that the feature-type 
65
 * style is for. It is allowed to be optional, but only if one feature type is 
66
 * in-context (in-layer) and that feature type must match the syntax and semantics 
67
 * of all feature-property references inside of the FeatureTypeStyle. Note that 
68
 * there is no restriction against a single UserStyle from including multiple 
69
 * FeatureTypeStyles that reference the same FeatureTypeName. This case does not 
70
 * create an exception in the rendering semantics,however, since a map styler is 
71
 * expected to process all FeatureTypeStyles in the order that they appear, 
72
 * regardless, plotting one instance over top of another.<p>
73
 * 
74
 * The SemanticTypeIdentifier is experimental and is intended to be used to identify
75
 * what the feature style is suitable to be used for using community-controlled 
76
 * name(s). For example, a single style may be suitable to use with many different
77
 * feature types. The syntax of the SemanticTypeIdentifier string is undefined, but
78
 * the strings �generic:line�, �generic:polygon�, �generic:point�, �generic:text�,
79
 * �generic:raster�, and �generic:any� are reserved to indicate that a FeatureTypeStyle
80
 * may be used with any feature type with the corresponding default geometry type
81
 * (i.e., no feature properties are referenced in the feature-type style).<p>
82
 * 
83
 * The FeatureTypeStyle contains one or more Rule elements that allow conditional
84
 * rendering. Rules are discussed in Section 10.
85
 * 
86
 * @see SLDRule
87
 * @see http://portal.opengeospatial.org/files/?artifact_id=1188
88
 * 
89
 * @author pepe vidal salvador - jose.vidal.salvador@iver.es
90
*/
91
public abstract class SLDFeatureTypeStyle implements ISLDFeatures {
92

    
93
        protected String name;
94
        protected String title;
95
        protected String ftsAbstract;
96
        protected String featureTypeName;
97
        protected ArrayList<String> semanticTypeIdentifier = new ArrayList<String>() ;
98
        protected ArrayList<SLDRule>rules = new ArrayList<SLDRule>();
99
        
100
        public String getName() {
101
                return name;
102
        }
103
        public void setName(String name) {
104
                this.name = name;
105
        }
106
        public String getTitle() {
107
                return title;
108
        }
109
        public void setTitle(String title) {
110
                this.title = title;
111
        }
112
        public String getFtsAbstract() {
113
                return ftsAbstract;
114
        }
115
        public void setFtsAbstract(String ftsAbstract) {
116
                this.ftsAbstract = ftsAbstract;
117
        }
118
        public String getFeatureTypeName() {
119
                return featureTypeName;
120
        }
121
        public void setFeatureTypeName(String featureTypeName) {
122
                this.featureTypeName = featureTypeName;
123
        }
124
        public ArrayList<String> getSemanticTypeIdentifier() {
125
                return semanticTypeIdentifier;
126
        }
127
        public void setSemanticTypeIdentifier(ArrayList<String> semanticTypeIdentifier) {
128
                this.semanticTypeIdentifier = semanticTypeIdentifier;
129
        }
130
        
131
        public void addSemanticTypeIdentifier(String cad) {
132
                this.semanticTypeIdentifier.add(cad);
133
        }
134
        
135
        public ArrayList<SLDRule> getRules() {
136
                return rules;
137
        }
138
        public void setRules(ArrayList<SLDRule> rules) {
139
                this.rules = rules;
140
        }
141

    
142
        public void addRule(SLDRule rule) {
143
                this.rules.add(rule);
144
        }
145
        
146
        
147
}