Statistics
| Revision:

gvsig-raster / org.gvsig.raster.wms / trunk / org.gvsig.raster.wms / org.gvsig.raster.wms.io / src / main / java / org / gvsig / raster / wms / io / time / RemoteTimeDimension.java @ 2484

History | View | Annotate | Download (4.72 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.raster.wms.io.time;
23

    
24
import org.gvsig.tools.persistence.Persistent;
25

    
26

    
27
/**
28
 * 
29
 * @author jaume
30
 *
31
 */
32
public interface RemoteTimeDimension extends Persistent {
33
        public static int SINGLE_VALUE = 0;
34
        public static int MULTIPLE_VALUE = 1;
35
        public static int INTERVAL = 2;
36
    /**
37
     * Return the dimension's name. This value is the value that will be used in
38
     * a GetMap request.
39
     * 
40
     * @return String containing the name of this dimension.
41
     */
42
    public String getName();
43
    /**
44
     * Return the unit used by this dimension.
45
     * @return
46
     */
47
    public String getUnit();
48
    /**
49
     * Returns the unit symbol (i.e. 'm', 's', or 'l' for meters, seconds, or liters respectively) 
50
     * @return
51
     */
52
    public String getUnitSymbol();
53
    
54
    
55
    /**
56
     * This method returns the <b>lowest</b> value of this dimension if this dimension is
57
     * specified as an interval or as a set of values, or the value specified if it
58
     * was a single value. 
59
     * @return String containing the coded value.
60
     */
61
    public String getLowLimit();
62

    
63
    /**
64
     * This method returns the <b>highest</b> value of this dimension if this dimension is
65
     * specified as an interval or as a set of values, or the value specified if it
66
     * was a single value. 
67
     * @return String containing the coded value.
68
     */
69
    public String getHighLimit();
70
    
71
    /**
72
     * This method returns the resolution supported by this dimension. This
73
     * means the step lenght between two consecutive points along the
74
     * dimension's axis. 
75
     * @return String containing the coded value, or null if no value for resolution.
76
     * @deprecated
77
     */
78
    public String getResolution();
79
    
80
    /**
81
     * Checks if the value represented as string is a valid value by checking
82
     * if the dimensions supports it. It should be true if one of the following is
83
     * true:
84
     * <p>
85
     * <ol> 
86
     * <li>
87
     *  The dimension <b>supports nearest values</b> and <b>the value is greather
88
     *  or  equal than the low limit</b> and <b>less or equal than the high limit</b>.  
89
     *  </li>
90
     *  <li>
91
     *  The value matches in one of the points defined by the low and high limits, and
92
     *  the resolution value.
93
     *  </li>
94
     * </ol>
95
     * </p>
96
     * @param value
97
     * @return
98
     */
99
    public boolean isValidValue(String value);
100
    
101
    /**
102
     * Return the value of the String passed in the dimension's unit-natural type.
103
     * @param value
104
     * @return
105
     */
106
    public Object valueOf(String value) throws IllegalArgumentException;
107
    
108
    /**
109
     * Returns the value that would be at the position passed as argument.
110
     * @param pos
111
     * @return
112
     * @throws ArrayIndexOutOfBoundsException
113
     */
114
    public String valueAt(int pos) throws ArrayIndexOutOfBoundsException;
115
    
116
    /**
117
     * The amount of positions that this dimension contains. 
118
     * @return -1 if the dimension is not recognized, the amount otherwise
119
     */
120
    public int valueCount();
121
    
122
    /**
123
     * Returns the expression describing this WMS Dimension
124
     */
125
    public String getExpression();
126
    
127
    /**
128
     * Sets the expression describing this WMS Dimension
129
     * @throws IllegalArgumentException
130
     */
131
    public void setExpression(String expr);
132
    
133
    /**
134
         * Returns the type of the dimension expression.<br>
135
         * Possible values are:
136
         * <ol>
137
         *         <li>
138
         *                 <b>IFMapWMSDimension.SINGLE_VALUE</b>
139
         *                 <b>IFMapWMSDimension.MULTIPLE_VALUE</b>
140
         *                 <b>IFMapWMSDimension.INTERVAL</b>
141
         *         </li>
142
         * </ol>
143
         * @return int
144
         */
145
    public int getType();
146
    
147
    /**
148
     * Analyzes and establishes the starting values for this dimension. No operation of this
149
     * dimension can be called before the dimension has been compiled.
150
     * 
151
     * @throws IllegalArgumentException
152
     */
153
    public void compile() throws IllegalArgumentException;
154
}