# HG changeset patch # User Ingo Weinzierl # Date 1308315654 0 # Node ID d45c3ddaed1b588b17f8640bf3247bf6b17071da # Parent 82eb41beb4de4a5ac88a0769414e1734a868cd4a 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 diff -r 82eb41beb4de -r d45c3ddaed1b flys-artifacts/ChangeLog --- 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 + + * 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 * doc/conf/artifacts/winfo.xml: Added a facet for corrected W in diff -r 82eb41beb4de -r d45c3ddaed1b flys-artifacts/doc/conf/artifacts/winfo.xml --- 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 @@ + diff -r 82eb41beb4de -r d45c3ddaed1b flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java --- 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.