diff gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/DefaultTimeGap.java @ 217:3dcd2b0b456e

Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45 gnv-artifacts/trunk@275 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 29 Oct 2009 15:58:47 +0000
parents
children 3ddc22aab764
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/DefaultTimeGap.java	Thu Oct 29 15:58:47 2009 +0000
@@ -0,0 +1,64 @@
+/**
+ *
+ */
+package de.intevation.gnv.timeseries.gap;
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class DefaultTimeGap implements TimeGap{
+
+    /**
+     * The UNIT of the TimeGap
+     * See the Constants in de.intevation.gnv.timeseries.gap.TimeGap
+     */
+    private String unit;
+    
+    /**
+     * The Key of the TimeGap which must be äquivalent to the
+     * Key used in the DWH
+     */
+    private int key;
+    
+    /**
+     * The Value of the Gap.
+     * Use the Unit and the Time Constants to Calculate the
+     * value in Milliseconds
+     */
+    private int value;
+    
+    /**
+     * Constructor
+     * @param unit
+     * @param key
+     * @param value
+     */
+    public DefaultTimeGap(String unit, int key, int value) {
+        super();
+        this.unit = unit;
+        this.key = key;
+        this.value = value;
+    }
+
+    /**
+     * @see de.intevation.gnv.timeseries.gap.TimeGap#getUnit()
+     */
+    public String getUnit() {
+        return this.unit;
+    }
+
+    /**
+     * @see de.intevation.gnv.timeseries.gap.TimeGap#getKey()
+     */
+    public int getKey() {
+        return this.key;
+    }
+
+    /**
+     * @see de.intevation.gnv.timeseries.gap.TimeGap#getValue()
+     */
+    public int getValue() {
+        return this.value;
+    }
+
+}

http://dive4elements.wald.intevation.org