changeset 685:d45c3ddaed1b

Added a parameter 'wq_free' that determines that mode of calculation 1 (specifies if the calculation is bound to a gauge or not). flys-artifacts/trunk@2148 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 17 Jun 2011 13:00:54 +0000
parents 82eb41beb4de
children eab5e5089d77
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/winfo.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
diffstat 3 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Jun 17 12:38:41 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Jun 17 13:00:54 2011 +0000
@@ -1,3 +1,12 @@
+2011-06-17  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/conf/artifacts/winfo.xml: Added a new parameter "wq_free" that
+	  determines the mode of calculation 1. If it is "false" (default),
+	  the calculation should be bound to a gauge.
+
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Added a
+	  method to retrieve the information about the "wq_free" parameter.
+
 2011-06-17  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/artifacts/winfo.xml: Added a facet for corrected W in
--- a/flys-artifacts/doc/conf/artifacts/winfo.xml	Fri Jun 17 12:38:41 2011 +0000
+++ b/flys-artifacts/doc/conf/artifacts/winfo.xml	Fri Jun 17 13:00:54 2011 +0000
@@ -97,6 +97,7 @@
 
         <state id="state.winfo.wq" description="state.winfo.wq" state="de.intevation.flys.artifacts.states.WQSelect">
             <data name="wq_mode" type="String" />
+            <data name="wq_free" type="Boolean" />
             <data name="wq_selection" type="String" />
             <data name="wq_from" type="Double" />
             <data name="wq_to" type="Double" />
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Jun 17 12:38:41 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Jun 17 13:00:54 2011 +0000
@@ -706,6 +706,7 @@
         }
     }
 
+
     public boolean isQ() {
         StateData mode = getData("wq_mode");
         return mode != null && mode.getValue().equals("Q");
@@ -713,6 +714,26 @@
 
 
     /**
+     * Returns true, if the parameter is set to compute data on a free range.
+     * Otherwise it returns false, which tells the calculation that it is bound
+     * to a gauge.
+     *
+     * @return true, if the calculation should compute on a free range otherwise
+     * false and the calculation is bound to a gauge.
+     */
+    public boolean isFreeQ() {
+        StateData mode  = getData("wq_free");
+        String    value = mode != null ? (String) mode.getValue() : null;
+
+        if (mode == null) {
+            return false;
+        }
+
+        return Boolean.valueOf(value);
+    }
+
+
+    /**
      * Returns the Q values based on a specified kilometer range.
      *
      * @param range A 2dim array with lower and upper kilometer range.

http://dive4elements.wald.intevation.org