comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 1115:eaf32c767bac

Cosmetics. flys-artifacts/trunk@2622 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Aug 2011 12:20:23 +0000
parents 7bd514eb4b2c
children 05e4ef0f9489
comparison
equal deleted inserted replaced
1114:9cc658cc4e20 1115:eaf32c767bac
25 import de.intevation.flys.artifacts.model.Calculation4; 25 import de.intevation.flys.artifacts.model.Calculation4;
26 import de.intevation.flys.artifacts.model.Calculation; 26 import de.intevation.flys.artifacts.model.Calculation;
27 import de.intevation.flys.artifacts.model.CalculationResult; 27 import de.intevation.flys.artifacts.model.CalculationResult;
28 import de.intevation.flys.artifacts.model.DischargeTables; 28 import de.intevation.flys.artifacts.model.DischargeTables;
29 import de.intevation.flys.artifacts.model.MainValuesFactory; 29 import de.intevation.flys.artifacts.model.MainValuesFactory;
30 import de.intevation.flys.artifacts.model.RiverFactory;
31 import de.intevation.flys.artifacts.model.Segment; 30 import de.intevation.flys.artifacts.model.Segment;
32 import de.intevation.flys.artifacts.model.WQKms; 31 import de.intevation.flys.artifacts.model.WQKms;
33 import de.intevation.flys.artifacts.model.WstValueTable; 32 import de.intevation.flys.artifacts.model.WstValueTable;
34 import de.intevation.flys.artifacts.model.WstValueTableFactory; 33 import de.intevation.flys.artifacts.model.WstValueTableFactory;
35 34
73 72
74 /** XPath */ 73 /** XPath */
75 public static final String XPATH_STATIC_UI ="/art:result/art:ui/art:static"; 74 public static final String XPATH_STATIC_UI ="/art:result/art:ui/art:static";
76 75
77 /** The default number of steps between the start end end of a selected Q 76 /** The default number of steps between the start end end of a selected Q
78 * range.*/ 77 * range. */
79 public static final int DEFAULT_Q_STEPS = 30; 78 public static final int DEFAULT_Q_STEPS = 30;
80 79
81 /** The default step width between the start end end kilometer.*/ 80 /** The default step width between the start end end kilometer. */
82 public static final double DEFAULT_KM_STEPS = 0.1; 81 public static final double DEFAULT_KM_STEPS = 0.1;
83 82
84 83
85 /** 84 /**
86 * The default constructor. 85 * The default constructor.
347 } 346 }
348 347
349 return computeWaterlevelData(kms, qs, ws, wst, refKm); 348 return computeWaterlevelData(kms, qs, ws, wst, refKm);
350 } 349 }
351 350
351
352 /** 352 /**
353 * Computes the data of a waterlevel computation based on the interpolation 353 * Computes the data of a waterlevel computation based on the interpolation
354 * in WstValueTable. 354 * in WstValueTable.
355 * 355 *
356 * @param kms The kilometer values. 356 * @param kms The kilometer values.
864 * @return true, if the calculation should compute on a free range otherwise 864 * @return true, if the calculation should compute on a free range otherwise
865 * false and the calculation is bound to a gauge. 865 * false and the calculation is bound to a gauge.
866 */ 866 */
867 public boolean isFreeQ() { 867 public boolean isFreeQ() {
868 StateData mode = getData("wq_free"); 868 StateData mode = getData("wq_free");
869 String value = mode != null ? (String) mode.getValue() : null; 869 String value = (mode != null) ? (String) mode.getValue() : null;
870 870
871 logger.debug("isFreeQ: " + value); 871 logger.debug("isFreeQ: " + value);
872 872
873 if (value == null) { 873 if (value == null) {
874 return false; 874 return false;
887 */ 887 */
888 public double[] getQs(double[] range) { 888 public double[] getQs(double[] range) {
889 StateData dMode = getData("wq_mode"); 889 StateData dMode = getData("wq_mode");
890 StateData dValues = getData("wq_values"); 890 StateData dValues = getData("wq_values");
891 891
892 String mode = dMode != null ? (String) dMode.getValue() : ""; 892 String mode = (dMode != null) ? (String) dMode.getValue() : "";
893 893
894 if (mode.equals("Q")) { 894 if (mode.equals("Q")) {
895 return getWQForDist(range); 895 return getWQForDist(range);
896 } 896 }
897 897
909 */ 909 */
910 public double[] getWs(double[] range) { 910 public double[] getWs(double[] range) {
911 StateData dMode = getData("wq_mode"); 911 StateData dMode = getData("wq_mode");
912 StateData dValues = getData("wq_values"); 912 StateData dValues = getData("wq_values");
913 913
914 String mode = dMode != null ? (String) dMode.getValue() : ""; 914 String mode = (dMode != null) ? (String) dMode.getValue() : "";
915 915
916 if (mode.equals("W")) { 916 if (mode.equals("W")) {
917 return getWQForDist(range); 917 return getWQForDist(range);
918 } 918 }
919 919

http://dive4elements.wald.intevation.org