diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeWQFacet.java @ 4241:49cb65d5932d

Improved the historical discharge calculation. The calculation now creates new HistoricalWQKms (new subclass of WQKms). Those WQKms are used to create new facets from (new) type 'HistoricalDischargeCurveFacet'. The chart generator is improved to support those facets.
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 24 Oct 2012 14:34:35 +0200
parents
children e4a415773b0a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeWQFacet.java	Wed Oct 24 14:34:35 2012 +0200
@@ -0,0 +1,36 @@
+package de.intevation.flys.artifacts.model;
+
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+
+
+/**
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class HistoricalDischargeWQFacet extends DataFacet {
+
+    private double value;
+
+    public HistoricalDischargeWQFacet() {
+    }
+
+    public HistoricalDischargeWQFacet(String name, String desc, double value) {
+        super(name, desc);
+        this.value = value;
+    }
+
+    @Override
+    public Facet deepCopy() {
+        HistoricalDischargeWQFacet copy = new HistoricalDischargeWQFacet();
+        copy.set(this);
+        copy.value = value;
+        return copy;
+    }
+
+    @Override
+    public Object getData(Artifact artifact, CallContext context) {
+        return value;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org