changeset 935:353ddfa231a7

Introduced a new output 'floodmap' for the FloodMapState. flys-artifacts/trunk@2324 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 13 Jul 2011 10:29:32 +0000
parents d0f3fea20f01
children 759808931a2e
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/winfo.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java
diffstat 5 files changed, 77 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jul 12 08:05:54 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jul 13 10:29:32 2011 +0000
@@ -1,3 +1,17 @@
+2011-07-13  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/conf/artifacts/winfo.xml: The FloodMapState has a new Outputmode
+	  called "floodmap" now.
+
+	* src/main/java/de/intevation/flys/artifacts/model/WSPLGENFacet.java: New.
+	  This facet is used to generate WSPLGEN results.
+
+	* src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java: Added
+	  the WSPLGENFacet.
+
+	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java:
+	  This state will now generate WSPLGENFacets.
+
 2011-07-12  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/geom/Lines.java:
--- a/flys-artifacts/doc/conf/artifacts/winfo.xml	Tue Jul 12 08:05:54 2011 +0000
+++ b/flys-artifacts/doc/conf/artifacts/winfo.xml	Wed Jul 13 10:29:32 2011 +0000
@@ -43,7 +43,7 @@
             <data name="ld_locations" type="Double[]" />
 
             <outputmodes>
-                <outputmode name="discharge_curve" description="output.discharge_curve" mime-type="image/png">
+                <outputmode name="discharge_curve" description="output.discharge_curve" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="discharge_curve.curve" description="facet.discharge_curve.curve"/>
                     </facets>
@@ -58,7 +58,7 @@
             <data name="ld_step" type="Double" />
 
             <outputmodes>
-                <outputmode name="discharge_curve" description="output.discharge_curve" mime-type="image/png">
+                <outputmode name="discharge_curve" description="output.discharge_curve" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="discharge_curve.curve" description="facet.discharge_curve.curve"/>
                     </facets>
@@ -74,7 +74,7 @@
             <data name="ld_step" type="Double" />
 
             <outputmodes>
-                <outputmode name="discharge_curve" description="output.discharge_curve" mime-type="image/png">
+                <outputmode name="discharge_curve" description="output.discharge_curve" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="discharge_curve.curve" description="facet.discharge_curve.curve"/>
                     </facets>
@@ -124,18 +124,18 @@
 
         <state id="state.winfo.durationcurve" description="state.winfo.durationcurve" state="de.intevation.flys.artifacts.states.DurationCurveState">
             <outputmodes>
-                <outputmode name="duration_curve" description="output.duration_curve" mime-type="image/png">
+                <outputmode name="duration_curve" description="output.duration_curve" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="duration_curve.w" description="facet.duration_curve.w"/>
                         <facet name="duration_curve.q" description="facet.duration_curve.q"/>
                     </facets>
                 </outputmode>
-                <outputmode name="durationcurve_export" description="output.durationcurve_export" mime-type="text/plain">
+                <outputmode name="durationcurve_export" description="output.durationcurve_export" mime-type="text/plain" type="export">
                     <facets>
                         <facet name="csv" description="facet.durationcurve_export.csv" />
                     </facets>
                 </outputmode>
-                <outputmode name="durationcurve_report" description="output.durationcurve_report" mime-type="text/xml">
+                <outputmode name="durationcurve_report" description="output.durationcurve_report" mime-type="text/xml" type="report">
                     <facets>
                         <facet name="report" description="facet.durationcurve_export.report" />
                     </facets>
@@ -145,22 +145,22 @@
 
         <state id="state.winfo.computeddischargecurve" description="state.winfo.computeddischargecurve" state="de.intevation.flys.artifacts.states.ComputedDischargeCurveState">
             <outputmodes>
-                <outputmode name="computed_discharge_curve" description="output.computed_discharge_curve" mime-type="image/png">
+                <outputmode name="computed_discharge_curve" description="output.computed_discharge_curve" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="computed_discharge_curve.q" description="facet.computed_discharge_curve.q"/>
                     </facets>
                 </outputmode>
-                <outputmode name="computed_dischargecurve_export" description="output.computed_dischargecurve_export" mime-type="text/plain">
+                <outputmode name="computed_dischargecurve_export" description="output.computed_dischargecurve_export" mime-type="text/plain" type="export">
                     <facets>
                         <facet name="csv" description="facet.computed_dischargecurve_export.csv" />
                     </facets>
                 </outputmode>
-                <outputmode name="computed_dischargecurve_report" description="output.computed_dischargecurve_report" mime-type="text/xml">
+                <outputmode name="computed_dischargecurve_report" description="output.computed_dischargecurve_report" mime-type="text/xml" type="report">
                     <facets>
                         <facet name="report" description="facet.computed_dischargecurve_export.report"/>
                     </facets>
                 </outputmode>
-                <outputmode name="computed_dischargecurve_at_export" description="output.computed_dischargecurve_at_export" mime-type="text/plain">
+                <outputmode name="computed_dischargecurve_at_export" description="output.computed_dischargecurve_at_export" mime-type="text/plain" type="export">
                     <facets>
                         <facet name="at" description="facet.computed_dischargecurve_export.at"/>
                     </facets>
@@ -181,19 +181,19 @@
 
         <state id="state.winfo.waterlevel" description="state.winfo.waterlevel" state="de.intevation.flys.artifacts.states.WaterlevelState">
             <outputmodes>
-                <outputmode name="longitudinal_section" description="output.longitudinal_section" mime-type="image/png">
+                <outputmode name="longitudinal_section" description="output.longitudinal_section" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="longitudinal_section.w" description="facet.longitudinal_section.w"/>
                         <facet name="longitudinal_section.q" description="facet.longitudinal_section.q"/>
                     </facets>
                 </outputmode>
-                <outputmode name="waterlevel_export" description="output.waterlevel_export" mime-type="text/plain">
+                <outputmode name="waterlevel_export" description="output.waterlevel_export" mime-type="text/plain" type="export">
                     <facets>
                         <facet name="csv" description="facet.waterlevel_export.csv" />
                         <facet name="wst" description="facet.waterlevel_export.wst" />
                     </facets>
                 </outputmode>
-                <outputmode name="waterlevel_report" description="output.waterlevel_report" mime-type="text/xml">
+                <outputmode name="waterlevel_report" description="output.waterlevel_report" mime-type="text/xml" type="report">
                     <facets>
                         <facet name="report" description="facet.waterlevel_export.report"/>
                     </facets>
@@ -203,20 +203,20 @@
 
         <state id="state.winfo.discharge_longitudinal_section" description="state.winfo.discharge_longitudinal_section" state="de.intevation.flys.artifacts.states.DischargeLongitudinalSection">
             <outputmodes>
-                <outputmode name="discharge_longitudinal_section" description="output.discharge_longitudinal_section" mime-type="image/png">
+                <outputmode name="discharge_longitudinal_section" description="output.discharge_longitudinal_section" mime-type="image/png" type="chart">
                     <facets>
                         <facet name="discharge_longitudinal_section.w"/>
                         <facet name="discharge_longitudinal_section.q"/>
                         <facet name="discharge_longitudinal_section.c"/>
                     </facets>
                 </outputmode>
-                <outputmode name="discharge_longitudinal_section_export" description="output.discharge_longitudinal_section_export" mime-type="text/plain">
+                <outputmode name="discharge_longitudinal_section_export" description="output.discharge_longitudinal_section_export" mime-type="text/plain" type="export">
                     <facets>
                         <facet name="csv" description="facet.discharge_longitudinal_section_export.csv" />
                         <facet name="wst" description="facet.discharge_longitudinal_section_export.wst" />
                     </facets>
                 </outputmode>
-                <outputmode name="discharge_longitudinal_section_report" description="output.discharge_longitudinal_section_report" mime-type="text/xml">
+                <outputmode name="discharge_longitudinal_section_report" description="output.discharge_longitudinal_section_report" mime-type="text/xml" type="report">
                     <facets>
                         <facet name="report" description="facet.discharge_longitudinal_section_export.report"/>
                     </facets>
@@ -277,6 +277,13 @@
         </transition>
 
         <state id="state.winfo.uesk.uesk" description="state.winfo.uesk.uesk" state="de.intevation.flys.artifacts.states.FloodMapState">
+            <outputmodes>
+                <outputmode name="floodmap" description="output.uesk.map.description" type="map">
+                    <facets>
+                        <facet name="floodmap.wsplgen"/>
+                    </facets>
+                </outputmode>
+            </outputmodes>
         </state>
 
     </states>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java	Tue Jul 12 08:05:54 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java	Wed Jul 13 10:29:32 2011 +0000
@@ -2,6 +2,8 @@
 
 public interface FacetTypes {
 
+    String FLOODMAP_WSPLGEN = "floodmap.wsplgen";
+
     String DISCHARGE_LONGITUDINAL_W = "discharge_longitudinal_section.w";
     String DISCHARGE_LONGITUDINAL_Q = "discharge_longitudinal_section.q";
     String DISCHARGE_LONGITUDINAL_C = "discharge_longitudinal_section.c";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENFacet.java	Wed Jul 13 10:29:32 2011 +0000
@@ -0,0 +1,17 @@
+package de.intevation.flys.artifacts.model;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+
+import de.intevation.artifactdatabase.state.DefaultFacet;
+
+
+public class WSPLGENFacet extends DefaultFacet {
+
+    public WSPLGENFacet(int idx, String name, String description) {
+        super(idx, name, description);
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Tue Jul 12 08:05:54 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Wed Jul 13 10:29:32 2011 +0000
@@ -1,8 +1,16 @@
 package de.intevation.flys.artifacts.states;
 
+import java.util.List;
+
 import org.apache.log4j.Logger;
 
+import de.intevation.artifacts.CallContext;
+
+import de.intevation.artifactdatabase.state.Facet;
+
+import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.FacetTypes;
+import de.intevation.flys.artifacts.model.WSPLGENFacet;
 
 
 public class FloodMapState
@@ -12,5 +20,18 @@
     /** The logger that is used in this state.*/
     private static Logger logger = Logger.getLogger(FloodMapState.class);
 
+
+    @Override
+    public Object computeAdvance(
+        FLYSArtifact artifact,
+        String       hash,
+        CallContext  context,
+        List<Facet>  facets,
+        Object       old
+    ) {
+        facets.add(new WSPLGENFacet(0, FLOODMAP_WSPLGEN, "WSPLGEN"));
+
+        return null;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org