Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libArcIMS_old / src / org / gvsig / remoteClient / arcims / styling / renderers / RangeValueMap.java @ 11865

History | View | Annotate | Download (4.04 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2006 Prodevelop 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
 *   Prodevelop Integraci?n de Tecnolog?as SL
34
 *   Conde Salvatierra de ?lava , 34-10
35
 *   46004 Valencia
36
 *   Spain
37
 *
38
 *   +34 963 510 612
39
 *   +34 963 510 968
40
 *   gis@prodevelop.es
41
 *   http://www.prodevelop.es
42
 */
43

    
44
/**
45
 *
46
 */
47
package org.gvsig.remoteClient.arcims.styling.renderers;
48

    
49
import org.gvsig.remoteClient.arcims.styling.symbols.IArcIMSSymbol;
50
import org.gvsig.remoteClient.arcims.styling.symbols.SymbolUtils;
51

    
52

    
53
/**
54
 * @author jsanz
55
 *
56
 */
57
public class RangeValueMap extends TypeValueMap {
58
    public static final String TAG = "RANGE";
59
    public static final String EQ_ALL = "all";
60
    public static final String EQ_UPPER = "upper";
61
    public static final String EQ_LOWER = "lower";
62
    public static final String EQ_NONE = "none";
63
    private String lower;
64
    private String upper;
65
    private String equality;
66

    
67
    /**
68
     * @param lower
69
     * @param upper
70
     * @param equality
71
     * @param label
72
     */
73
    public RangeValueMap(String lower, String upper) {
74
        super("");
75
        this.lower = lower;
76
        this.upper = upper;
77
        this.equality = EQ_LOWER;
78
    }
79

    
80
    /**
81
     * Generates an XML representation of the ValueMap type
82
     */
83
    public String toString() {
84
        String param = "";
85

    
86
        if (SymbolUtils.isVoid(lower)) {
87
            param += (" lower=\"" + lower + "\"");
88
        }
89

    
90
        if (SymbolUtils.isVoid(upper)) {
91
            param += (" upper=\"" + upper + "\"");
92
        }
93

    
94
        if (SymbolUtils.isVoid(equality)) {
95
            param += (" equality=\"" + equality + "\"");
96
        }
97

    
98
        if (SymbolUtils.isVoid(label)) {
99
            param += (" label=\"" + label + "\"");
100
        }
101

    
102
        return "<" + RangeValueMap.TAG + param + "\">\r\n" + symbol.toString() +
103
        "</" + RangeValueMap.TAG + ">\r\n";
104
    }
105

    
106
    /**
107
     * @return Returns the equality.
108
     */
109
    public String getEquality() {
110
        return equality;
111
    }
112

    
113
    /**
114
     * @param equality The equality to set.
115
     */
116
    public void setEquality(String equality) {
117
        this.equality = equality;
118
    }
119

    
120
    /**
121
     * @return Returns the label.
122
     */
123
    public String getLabel() {
124
        return label;
125
    }
126

    
127
    /**
128
     * @param label The label to set.
129
     */
130
    public void setLabel(String label) {
131
        this.label = label;
132
    }
133

    
134
    /**
135
     * @return Returns the lower.
136
     */
137
    public String getLower() {
138
        return lower;
139
    }
140

    
141
    /**
142
     * @param lower The lower to set.
143
     */
144
    public void setLower(String lower) {
145
        this.lower = lower;
146
    }
147

    
148
    /**
149
     * @return Returns the symbol.
150
     */
151
    public IArcIMSSymbol getSymbol() {
152
        return symbol;
153
    }
154

    
155
    /**
156
     * @param symbol The symbol to set.
157
     */
158
    public void setSymbol(IArcIMSSymbol symbol) {
159
        this.symbol = symbol;
160
    }
161

    
162
    /**
163
     * @return Returns the upper.
164
     */
165
    public String getUpper() {
166
        return upper;
167
    }
168

    
169
    /**
170
     * @param upper The upper to set.
171
     */
172
    public void setUpper(String upper) {
173
        this.upper = upper;
174
    }
175
}