Statistics
| Revision:

svn-gvsig-desktop / branches / v05 / extensions / extWMS / src / com / iver / cit / gvsig / fmap / layers / IFMapWMSDimension.java @ 4187

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

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

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