changeset 3462:13855a555d3b

Added new Output WaterlevelExport (CSV, WST and PDF) to FixRealizingCompute State. flys-artifacts/trunk@5130 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 26 Jul 2012 09:26:47 +0000 (2012-07-26)
parents 1481322efc02
children 7198f04e4221
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/fixanalysis.xml flys-artifacts/doc/conf/conf.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java
diffstat 5 files changed, 31 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jul 25 15:07:14 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Jul 26 09:26:47 2012 +0000
@@ -1,3 +1,17 @@
+2012-07-26  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/conf/artifacts/fixanalysis.xml: Registered new Output
+	  'fix_waterlevel_export' for FixRealizingCompute State.
+
+	* doc/conf/conf.xml: Registered new WaterlevelExport Generator for
+	  'fix_waterlevel_export'.
+
+	* src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java:
+	  Create proper CSV, WST and PDF Facets with hash and State id.
+
+	* src/main/java/de/intevation/flys/exports/WaterlevelExporter.java: Made
+	  WaterlevelExporter support FixRealizingResult objects.
+
 2012-07-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/FixWaterlevelFacet.java:
--- a/flys-artifacts/doc/conf/artifacts/fixanalysis.xml	Wed Jul 25 15:07:14 2012 +0000
+++ b/flys-artifacts/doc/conf/artifacts/fixanalysis.xml	Thu Jul 26 09:26:47 2012 +0000
@@ -230,6 +230,13 @@
                     	<facet name="longitudinal_section.q" description="facet.longitudinal_section.q"/>
                     </facets>
                 </outputmode>
+                <outputmode name="fix_waterlevel_export" description="output.fix_waterlevel_export" mine-type="text/plain" type="export">
+                    <facets>
+                        <facet name="csv" description="facet.waterlevel_export.csv" />
+                        <facet name="wst" description="facet.waterlevel_export.wst" />
+                        <facet name="pdf" description="facet.waterlevel_export.pdf" />
+                    </facets>
+                </outputmode>
             </outputmodes>
         </state>
     </states>
--- a/flys-artifacts/doc/conf/conf.xml	Wed Jul 25 15:07:14 2012 +0000
+++ b/flys-artifacts/doc/conf/conf.xml	Thu Jul 26 09:26:47 2012 +0000
@@ -278,6 +278,7 @@
         <output-generator name="fix_longitudinal_section_curve_chartinfo">de.intevation.flys.exports.fixings.FixLongitudinalSectionInfoGenerator</output-generator>
         <output-generator name="fix_derivate_curve">de.intevation.flys.exports.fixings.FixDerivedCurveGenerator</output-generator>
         <output-generator name="fix_derivate_curve_chartinfo">de.intevation.flys.exports.fixings.FixDerivedCurveInfoGenerator</output-generator>
+        <output-generator name="fix_waterlevel_export">de.intevation.flys.exports.WaterlevelExporter</output-generator>
         <!-- Error report generators. -->
         <output-generator name="discharge_longitudinal_section_report">de.intevation.flys.exports.ReportGenerator</output-generator>
         <output-generator name="waterlevel_report">de.intevation.flys.exports.ReportGenerator</output-generator>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java	Wed Jul 25 15:07:14 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/FixRealizingCompute.java	Thu Jul 26 09:26:47 2012 +0000
@@ -49,6 +49,8 @@
     ) {
         logger.debug("FixRealizingCompute.computeAdvance");
 
+        String id = getID();
+
         CalculationResult res;
 
         FixRealizingAccess access =
@@ -108,8 +110,9 @@
         }
 
         if (wqkms.length > 0) {
-            facets.add(new DataFacet(CSV, "CSV data"));
-            facets.add(new DataFacet(WST, "WST data"));
+            facets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
+            facets.add(new DataFacet(WST, "WST data", ComputeType.ADVANCE, hash, id));
+            facets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id));
         }
 
         return res;
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java	Wed Jul 25 15:07:14 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java	Thu Jul 26 09:26:47 2012 +0000
@@ -36,6 +36,7 @@
 import de.intevation.flys.artifacts.model.WQCKms;
 import de.intevation.flys.artifacts.model.WQKms;
 import de.intevation.flys.artifacts.model.WKmsJRDataSource;
+import de.intevation.flys.artifacts.model.fixings.FixRealizingResult;
 import de.intevation.flys.artifacts.resources.Resources;
 
 import de.intevation.flys.utils.FLYSUtils;
@@ -162,6 +163,9 @@
             if (d instanceof WQKms []) {
                 data.add((WQKms [])d);
             }
+            else if (d instanceof FixRealizingResult) {
+                data.add(((FixRealizingResult) d).getWQKms());
+            }
         }
     }
 

http://dive4elements.wald.intevation.org