changeset 3459:7485338aedff

Also add Q-facets for fixrealization. flys-artifacts/trunk@5125 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 25 Jul 2012 12:10:55 +0000
parents 676f87e173f7
children d625f4d06b6a
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java
diffstat 2 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jul 25 10:20:15 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jul 25 12:10:55 2012 +0000
@@ -1,3 +1,8 @@
+2012-07-25	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java:
+	  Also add Q-Facet.
+
 2012-07-25	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java	Wed Jul 25 10:20:15 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java	Wed Jul 25 12:10:55 2012 +0000
@@ -11,6 +11,7 @@
 import de.intevation.flys.artifacts.model.CalculationResult;
 import de.intevation.flys.artifacts.model.FacetTypes;
 import de.intevation.flys.artifacts.model.ReportFacet;
+import de.intevation.flys.artifacts.model.WQKms;
 import de.intevation.flys.artifacts.model.WaterlevelFacet;
 
 import de.intevation.flys.artifacts.model.fixings.FixRealizingCalculation;
@@ -71,12 +72,23 @@
         // TODO: Add more facets.
         FixRealizingResult fr = (FixRealizingResult) res.getData();
 
+        /*
+        facets.add(
+            new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
+        */
+
         // WaterlevelFacet
         // Also: DataFacet and WQstuff
         // TODO naming, i18n.
         String nameW = "waterlevel";
-        facets.add(new WaterlevelFacet(
-                           0, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, id, hash));
+        String nameQ = "discharge";
+        WQKms[] wqkms = fr.getWQKms();
+        for (int i = 0; i < wqkms.length; i++) {
+            facets.add(new WaterlevelFacet(
+                               i, LONGITUDINAL_W, nameW, ComputeType.ADVANCE, id, hash));
+            facets.add(new WaterlevelFacet(
+                               i, LONGITUDINAL_Q, nameQ, ComputeType.ADVANCE, id, hash));
+        }
 
         return res;
     }

http://dive4elements.wald.intevation.org