diff gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/TimeGap.java @ 540:80630520e25a

merged gnv-artifacts/0.4
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:13:49 +0200
parents 3dcd2b0b456e
children 9a828e5a2390
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/TimeGap.java	Fri Sep 28 12:13:49 2012 +0200
@@ -0,0 +1,35 @@
+package de.intevation.gnv.timeseries.gap;
+public interface TimeGap {
+    
+    public final static String TIME_UNIT_MINUTE = "m";
+    public final static String TIME_UNIT_HOUR = "h";
+    public final static String TIME_UNIT_DAY = "D";
+    public final static String TIME_UNIT_WEEK = "W";
+    public final static String TIME_UNIT_MONTH = "M";
+    public final static String TIME_UNIT_YEAR = "Y";
+    
+    public final static long  MINUTE_IN_MILLIS = 60 * 1000;
+    public final static long  HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
+    public final static long  DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS;
+    public final static long  WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS;
+    
+    
+    /**
+     * Returns the Lookup-Key for the TimeGap
+     * @return
+     */
+    int getKey();
+    
+    /**
+     * Returns the Value of the TimeValue in the Unit which is also given.
+     * @return
+     */
+    int getValue();
+    
+    /**
+     * Returns the Unit of the Timegap (e.g. Minutes, Hours, Days, Weeks, Months, Years)
+     * @return
+     */
+    String getUnit();
+
+}

http://dive4elements.wald.intevation.org