Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | d4caab3fedde |
children | e3519c3e7a0a 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
77 | 77 |
78 /** The name of the artifact. */ | 78 /** The name of the artifact. */ |
79 public static final String ARTIFACT_NAME = "winfo"; | 79 public static final String ARTIFACT_NAME = "winfo"; |
80 | 80 |
81 /** XPath */ | 81 /** XPath */ |
82 public static final String XPATH_STATIC_UI ="/art:result/art:ui/art:static"; | 82 public static final String XPATH_STATIC_UI = |
83 "/art:result/art:ui/art:static"; | |
83 | 84 |
84 /** The default number of steps between the start end end of a selected Q | 85 /** The default number of steps between the start end end of a selected Q |
85 * range. */ | 86 * range. */ |
86 public static final int DEFAULT_Q_STEPS = 30; | 87 public static final int DEFAULT_Q_STEPS = 30; |
87 | 88 |
256 if (isFreeQ() || isFreeW()) { | 257 if (isFreeQ() || isFreeW()) { |
257 refKm = range[0]; | 258 refKm = range[0]; |
258 log.debug("'free' calculation (km " + refKm + ")"); | 259 log.debug("'free' calculation (km " + refKm + ")"); |
259 } | 260 } |
260 else { | 261 else { |
261 Gauge gauge = river.determineRefGauge(range, rangeAccess.isRange()); | 262 Gauge gauge = river.determineRefGauge( |
263 range, rangeAccess.isRange()); | |
262 | 264 |
263 if (gauge == null) { | 265 if (gauge == null) { |
264 return error( | 266 return error( |
265 new WQKms[0], "no.gauge.found.for.km", range[0]); | 267 new WQKms[0], "no.gauge.found.for.km", range[0]); |
266 } | 268 } |
423 protected static final CalculationResult error(Object data, String msg) { | 425 protected static final CalculationResult error(Object data, String msg) { |
424 return new CalculationResult(data, new Calculation(msg)); | 426 return new CalculationResult(data, new Calculation(msg)); |
425 } | 427 } |
426 | 428 |
427 /** Create CalculationResult with data and message with args. */ | 429 /** Create CalculationResult with data and message with args. */ |
428 protected static final CalculationResult error(Object data, String msg, Object ... args) { | 430 protected static final CalculationResult error( |
431 Object data, | |
432 String msg, | |
433 Object ... args | |
434 ) { | |
429 return new CalculationResult(data, new Calculation(msg, args)); | 435 return new CalculationResult(data, new Calculation(msg, args)); |
430 } | 436 } |
431 | 437 |
432 | 438 |
433 /** | 439 /** |
726 | 732 |
727 if (debug) { | 733 if (debug) { |
728 log.debug("range: " + Arrays.toString(range)); | 734 log.debug("range: " + Arrays.toString(range)); |
729 } | 735 } |
730 | 736 |
731 Gauge g = rangeAccess.getRiver().determineRefGauge(range, rangeAccess.isRange()); | 737 Gauge g = rangeAccess.getRiver().determineRefGauge( |
738 range, rangeAccess.isRange()); | |
732 if (g == null) { | 739 if (g == null) { |
733 log.warn("no gauge found for km: " + range[0]); | 740 log.warn("no gauge found for km: " + range[0]); |
734 return null; | 741 return null; |
735 } | 742 } |
736 | 743 |