Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/TimeGap.java @ 784:7b81d563c8c0
Improved date input validation. A given date needs to be in a specific range (issue212).
gnv-artifacts/trunk@866 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 30 Mar 2010 09:17:53 +0000 |
parents | 5dd94448538d |
children | 991e13c3d504 |
rev | line source |
---|---|
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.timeseries.gap; |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
2 |
781
5dd94448538d
Added timegap definitions as attribute to each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
779
diff
changeset
|
3 import java.io.Serializable; |
5dd94448538d
Added timegap definitions as attribute to each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
779
diff
changeset
|
4 |
5dd94448538d
Added timegap definitions as attribute to each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
779
diff
changeset
|
5 public interface TimeGap extends Serializable { |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
6 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 public final static String TIME_UNIT_MINUTE = "m"; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 public final static String TIME_UNIT_HOUR = "h"; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 public final static String TIME_UNIT_DAY = "D"; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 public final static String TIME_UNIT_WEEK = "W"; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 public final static String TIME_UNIT_MONTH = "M"; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 public final static String TIME_UNIT_YEAR = "Y"; |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
13 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 public final static long MINUTE_IN_MILLIS = 60 * 1000; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 public final static long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 public final static long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS; |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 public final static long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS; |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
18 |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
19 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 /** |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 * Returns the Lookup-Key for the TimeGap |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 * @return |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 */ |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 int getKey(); |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
25 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 /** |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 * Returns the Value of the TimeValue in the Unit which is also given. |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 * @return |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 */ |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 int getValue(); |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
31 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 /** |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 * Returns the Unit of the Timegap (e.g. Minutes, Hours, Days, Weeks, Months, Years) |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 * @return |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 */ |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 String getUnit(); |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 } |