Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extWMS / src / com / iver / cit / gvsig / fmap / layers / IFMapWMSDimension.java @ 9075

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

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

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