Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/TimeGap.java @ 1119:7c4f81f74c47
merged gnv-artifacts
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:00 +0200 |
parents | f953c9a559d8 |
children |
comparison
equal
deleted
inserted
replaced
1027:fca4b5eb8d2f | 1119:7c4f81f74c47 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.gnv.timeseries.gap; | |
10 | |
11 import java.io.Serializable; | |
12 | |
13 /** | |
14 * A class representing a timegap. <code>TimeGap</code>s are used in timeseries | |
15 * charts to identify gaps taking account for the resolution of the x-axis | |
16 * range. | |
17 * | |
18 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | |
19 */ | |
20 public interface TimeGap extends Serializable { | |
21 | |
22 public final static String TIME_UNIT_MINUTE = "m"; | |
23 public final static String TIME_UNIT_HOUR = "h"; | |
24 public final static String TIME_UNIT_DAY = "D"; | |
25 public final static String TIME_UNIT_WEEK = "W"; | |
26 public final static String TIME_UNIT_MONTH = "M"; | |
27 public final static String TIME_UNIT_YEAR = "Y"; | |
28 | |
29 public final static long MINUTE_IN_MILLIS = 60 * 1000; | |
30 public final static long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS; | |
31 public final static long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS; | |
32 public final static long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS; | |
33 | |
34 | |
35 /** | |
36 * Returns the Lookup-Key for the TimeGap | |
37 * | |
38 * @return the timegap key. | |
39 */ | |
40 int getKey(); | |
41 | |
42 /** | |
43 * Returns the Value of the TimeValue in the Unit which is also given. | |
44 * | |
45 * @return the timegap value. | |
46 */ | |
47 int getValue(); | |
48 | |
49 /** | |
50 * Returns the Unit of the Timegap (e.g. Minutes, Hours, Days, Weeks, Months, Years) | |
51 * | |
52 * @return the timegap unit. | |
53 */ | |
54 String getUnit(); | |
55 | |
56 } | |
57 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |