Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 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 | fdc898a134a7 |
children | eab5e5089d77 |
line wrap: on
line diff
--- 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.