Statistics
| Revision:

root / branches / v05 / extensions / extWMS / src / com / iver / cit / gvsig / fmap / layers / IFMapWMSDimension.java @ 4259

History | View | Annotate | Download (6.21 KB)

1
/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 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

    
42
/* CVS MESSAGES:
43
*
44
* $Id: IFMapWMSDimension.java 4259 2006-03-03 08:29:22Z jaume $
45
* $Log$
46
* Revision 1.2.2.6  2006-03-03 08:28:56  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.4  2006/02/28 15:25:14  jaume
50
* *** empty log message ***
51
*
52
* Revision 1.2.2.5  2006/02/23 10:36:30  jaume
53
* *** empty log message ***
54
*
55
* Revision 1.2.2.4  2006/02/10 13:22:35  jaume
56
* now analyzes dimensions on demand
57
*
58
* Revision 1.2.2.3  2006/01/31 16:25:24  jaume
59
* correcciones de bugs
60
*
61
* Revision 1.3  2006/01/26 16:07:14  jaume
62
* *** empty log message ***
63
*
64
* Revision 1.2.2.1  2006/01/26 12:59:32  jaume
65
* 0.5
66
*
67
* Revision 1.2  2006/01/24 14:36:33  jaume
68
* This is the new version
69
*
70
* Revision 1.1.2.8  2006/01/23 12:54:45  jaume
71
* *** empty log message ***
72
*
73
* Revision 1.1.2.7  2006/01/20 15:22:46  jaume
74
* *** empty log message ***
75
*
76
* Revision 1.1.2.6  2006/01/19 16:09:30  jaume
77
* *** empty log message ***
78
*
79
* Revision 1.1.2.5  2006/01/10 11:33:31  jaume
80
* Time dimension working against Jet Propulsion Laboratory's WMS server
81
*
82
* Revision 1.1.2.4  2006/01/05 23:15:53  jaume
83
* *** empty log message ***
84
*
85
* Revision 1.1.2.3  2006/01/04 18:09:02  jaume
86
* Time dimension
87
*
88
* Revision 1.1.2.2  2006/01/04 16:49:44  jaume
89
* Time dimensios
90
*
91
* Revision 1.1.2.1  2006/01/03 18:08:40  jaume
92
* *** empty log message ***
93
*
94
*
95
*/
96
/**
97
 * 
98
 */
99
package com.iver.cit.gvsig.fmap.layers;
100

    
101
/**
102
 * 
103
 * @author jaume
104
 *
105
 */
106
public interface IFMapWMSDimension {
107
        public static int SINGLE_VALUE = 0;
108
        public static int MULTIPLE_VALUE = 1;
109
        public static int INTERVAL = 2;
110
    /**
111
     * Return the dimension's name. This value is the value that will be used in
112
     * a GetMap request.
113
     * 
114
     * @return String containing the name of this dimension.
115
     */
116
    public String getName();
117
    /**
118
     * Return the unit used by this dimension.
119
     * @return
120
     */
121
    public String getUnit();
122
    /**
123
     * Returns the unit symbol (i.e. 'm', 's', or 'l' for meters, seconds, or liters respectively) 
124
     * @return
125
     */
126
    public String getUnitSymbol();
127
    
128
    
129
    /**
130
     * This method returns the <b>lowest</b> value of this dimension if this dimension is
131
     * specified as an interval or as a set of values, or the value specified if it
132
     * was a single value. 
133
     * @return String containing the coded value.
134
     */
135
    public String getLowLimit();
136

    
137
    /**
138
     * This method returns the <b>highest</b> value of this dimension if this dimension is
139
     * specified as an interval or as a set of values, or the value specified if it
140
     * was a single value. 
141
     * @return String containing the coded value.
142
     */
143
    public String getHighLimit();
144
    
145
    /**
146
     * This method returns the resolution supported by this dimension. This
147
     * means the step lenght between two consecutive points along the
148
     * dimension's axis. 
149
     * @return String containing the coded value, or null if no value for resolution.
150
     * @deprecated
151
     */
152
    public String getResolution();
153
    
154
    /**
155
     * Checks if the value represented as string is a valid value by checking
156
     * if the dimensions supports it. It should be true if one of the following is
157
     * true:
158
     * <p>
159
     * <ol> 
160
     * <li>
161
     *  The dimension <b>supports nearest values</b> and <b>the value is greather
162
     *  or  equal than the low limit</b> and <b>less or equal than the high limit</b>.  
163
     *  </li>
164
     *  <li>
165
     *  The value matches in one of the points defined by the low and high limits, and
166
     *  the resolution value.
167
     *  </li>
168
     * </ol>
169
     * </p>
170
     * @param value
171
     * @return
172
     */
173
    public boolean isValidValue(String value);
174
    
175
    /**
176
     * Return the value of the String passed in the dimension's unit-natural type.
177
     * @param value
178
     * @return
179
     */
180
    public Object valueOf(String value) throws IllegalArgumentException;
181
    
182
    /**
183
     * Returns the value that would be at the position passed as argument.
184
     * @param pos
185
     * @return
186
     * @throws ArrayIndexOutOfBoundsException
187
     */
188
    public String valueAt(int pos) throws ArrayIndexOutOfBoundsException;
189
    
190
    /**
191
     * The amount of positions that this dimension contains. 
192
     * @return -1 if the dimension is not recognized, the amount otherwise
193
     */
194
    public int valueCount();
195
    
196
    /**
197
     * Returns the expression describing this WMS Dimension
198
     */
199
    public String getExpression();
200
    
201
    /**
202
     * Sets the expression describing this WMS Dimension
203
     * @throws IllegalArgumentException
204
     */
205
    public void setExpression(String expr);
206
    
207
    /**
208
         * Returns the type of the dimension expression.<br>
209
         * Possible values are:
210
         * <ol>
211
         *         <li>
212
         *                 <b>IFMapWMSDimension.SINGLE_VALUE</b>
213
         *                 <b>IFMapWMSDimension.MULTIPLE_VALUE</b>
214
         *                 <b>IFMapWMSDimension.INTERVAL</b>
215
         *         </li>
216
         * </ol>
217
         * @return int
218
         */
219
    public int getType();
220
    
221
    /**
222
     * Analyzes and establishes the starting values for this dimension. No operation of this
223
     * dimension can be called before the dimension has been compiled.
224
     * 
225
     * @throws IllegalArgumentException
226
     */
227
    public void compile() throws IllegalArgumentException;
228
}