Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/TimeGap.java @ 1129:ccfa07b88476
merged geo-backend
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:01 +0200 |
parents | f953c9a559d8 |
children |
rev | line source |
---|---|
1115
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
1 /* |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
3 * |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
7 */ |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
836
diff
changeset
|
8 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 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
|
10 |
781
5dd94448538d
Added timegap definitions as attribute to each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
779
diff
changeset
|
11 import java.io.Serializable; |
5dd94448538d
Added timegap definitions as attribute to each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
779
diff
changeset
|
12 |
810
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
13 /** |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
14 * A class representing a timegap. <code>TimeGap</code>s are used in timeseries |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
15 * charts to identify gaps taking account for the resolution of the x-axis |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
16 * range. |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
17 * |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
18 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
19 */ |
781
5dd94448538d
Added timegap definitions as attribute to each state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
779
diff
changeset
|
20 public interface TimeGap extends Serializable { |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
21 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 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
|
23 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
|
24 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
|
25 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
|
26 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
|
27 public final static String TIME_UNIT_YEAR = "Y"; |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
28 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 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
|
30 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
|
31 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
|
32 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
|
33 |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
34 |
217
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 * Returns the Lookup-Key for the TimeGap |
810
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
37 * |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
38 * @return the timegap key. |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 */ |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 int getKey(); |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
41 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 /** |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 * Returns the Value of the TimeValue in the Unit which is also given. |
810
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
44 * |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
45 * @return the timegap value. |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 */ |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 int getValue(); |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
217
diff
changeset
|
48 |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 /** |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 * Returns the Unit of the Timegap (e.g. Minutes, Hours, Days, Weeks, Months, Years) |
810
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
51 * |
991e13c3d504
Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
781
diff
changeset
|
52 * @return the timegap unit. |
217
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 */ |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 String getUnit(); |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 |
3dcd2b0b456e
Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 } |
836
05bf8534a35a
Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
810
diff
changeset
|
57 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |