Statistics
| Revision:

gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.lib / org.gvsig.raster.lib.api / src / main / java / org / gvsig / fmap / dal / coverage / datastruct / TimeInfo.java @ 174

History | View | Annotate | Download (3.02 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.fmap.dal.coverage.datastruct;
23

    
24
import java.text.ParseException;
25
import java.util.ArrayList;
26

    
27
/**
28
 * Time information
29
 * @author Nacho Brodin (nachobrodin@gmail.com)
30
 */
31
public interface TimeInfo {
32
        public static final int    NUMERIC                    = 0;
33
        public static final int    DATE                       = 1;
34
        
35
        public static final int    SINGLE_VALUES              = 0;
36
        public static final int    RANGES                     = 1;
37
        
38
        /**
39
         * Gets the serial name
40
         * @return
41
         */
42
        public String getSerialName();
43

    
44
        /**
45
         * Sets the serial name
46
         * @param serialName
47
         */
48
        public void setSerialName(String serialName);
49

    
50
        /**
51
         * Gets the list of dates
52
         * @return
53
         */
54
        public ArrayList<?> getTime();
55

    
56
        /**
57
         * Sets the list of dates
58
         * @return
59
         */
60
        public void setTime(ArrayList<?> time);
61

    
62
        /**
63
         * Gets the time type
64
         * @return
65
         */
66
        public int getTimeType();
67

    
68
        /**
69
         * Sets the time type
70
         * @param timeType
71
         */
72
        public void setTimeType(int timeType);
73
        
74
        /**
75
         * Sets the time type
76
         * @param timeType
77
         */
78
        public void setTimeType(String timeType);
79
        
80
        /**
81
         * Gets the data type
82
         * @return
83
         */
84
        public int getDataType();
85

    
86
        /**
87
         * Sets the data type
88
         * @param timeType
89
         */
90
        public void setDataType(int dataType);
91
        
92
        /**
93
         * Adds a new time value in the array. The parameter should be a date.
94
         * @param value
95
         * @throws ParseException
96
         */
97
        public void addValue(String value) throws ParseException;
98
        
99
        /**
100
         * Adds a new time value in the array. The parameter should be a time instant.
101
         * @param value
102
         * @throws ParseException
103
         */
104
        public void addValue(double value);
105
        
106
        /**
107
         * Gets a string which represents a time information for that position.
108
         * Each position is or a single value or a part of a interval.
109
         * @param pos
110
         * @return
111
         */
112
        public String getTimeInfo(int pos);
113

    
114
        /**
115
         * Gets the description
116
         * @param description
117
         */
118
        public String getDescription();
119

    
120
        /**
121
         * Sets the description
122
         * @return
123
         */
124
        public void setDescription(String description);
125
        
126
        /**
127
         * Returns true if the range selected in the parameters is 
128
         * inside the current.
129
         * @param tInfo
130
         * @return
131
         */
132
        public boolean isInRange(TimeInfo tInfo);
133
}