changeset 357:37b320bb292b

Added a further state that is reached if the waterlevel calculation mode has been chosen. flys-artifacts/trunk@1764 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 28 Apr 2011 11:32:41 +0000
parents 22e9574c8b1b
children f530114182d2
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/winfo.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelState.java
diffstat 3 files changed, 52 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Apr 28 11:22:45 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu Apr 28 11:32:41 2011 +0000
@@ -1,3 +1,14 @@
+2011-04-28  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/WaterlevelState.java: New.
+	  This state should be reached if the 'calc.surface.curve' calculation
+	  method has been chosen.
+
+	* doc/conf/artifacts/winfo.xml: Modified a transition and added the
+	  WaterlevelState. This state is reached if the 'calc.surface.curve'
+	  calculation method has been chosen. It currently has 1 output - a
+	  longitudinal section that is not implemented yet!
+
 2011-04-28  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/transitions/ValueCompareTransition.java:
--- a/flys-artifacts/doc/conf/artifacts/winfo.xml	Thu Apr 28 11:22:45 2011 +0000
+++ b/flys-artifacts/doc/conf/artifacts/winfo.xml	Thu Apr 28 11:32:41 2011 +0000
@@ -48,12 +48,21 @@
             <data name="wq_step" type="Double" />
         </state>
 
-        <transition transition="de.intevation.flys.artifacts.transitions.DefaultTransition">
+        <transition transition="de.intevation.flys.artifacts.transitions.ValueCompareTransition">
             <from state="state.winfo.wq"/>
-            <to state="state.winfo.calculation"/>
+            <to state="state.winfo.waterlevel"/>
+            <condition data="calculation_mode" value="calc.surface.curve" operator="equal"/>
         </transition>
 
-        <state id="state.winfo.calculation" description="state.winfo.wq" state="de.intevation.flys.artifacts.states.WINFOOutputState">
+        <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">
+                    <facets>
+                        <facet name="longitudinal_section.w" description="facet.longitudinal_section.w"/>
+                        <facet name="longitudinal_section.q" description="facet.longitudinal_section.q"/>
+                    </facets>
+                </outputmode>
+            </outputmodes>
         </state>
 
     </states>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelState.java	Thu Apr 28 11:32:41 2011 +0000
@@ -0,0 +1,29 @@
+package de.intevation.flys.artifacts.states;
+
+import org.apache.log4j.Logger;
+
+import org.w3c.dom.Element;
+
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+
+import de.intevation.artifacts.common.utils.XMLUtils;
+
+
+public class WaterlevelState extends DefaultState {
+
+    /** The logger that is used in this state.*/
+    private static Logger logger = Logger.getLogger(WaterlevelState.class);
+
+
+    protected Element[] createItems(
+        XMLUtils.ElementCreator cr,
+        Artifact    artifact,
+        String      name,
+        CallContext context)
+    {
+        logger.debug("WaterlevelState.createItems");
+        return null;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org