Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java @ 6619:075c00b767d7
issue1399: WINFOArtifact: Compute difference also if part of difference building oneselve.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 19 Jul 2013 13:39:40 +0200 |
parents | 5c880567a020 |
children | f4421417f3e1 |
comparison
equal
deleted
inserted
replaced
6618:e8e76d50d119 | 6619:075c00b767d7 |
---|---|
195 { | 195 { |
196 logger.debug("WINFOArtifact.getWaterlevelData"); | 196 logger.debug("WINFOArtifact.getWaterlevelData"); |
197 | 197 |
198 String calculationMode = getDataAsString("calculation_mode"); | 198 String calculationMode = getDataAsString("calculation_mode"); |
199 | 199 |
200 if (calculationMode.equals("calc.discharge.longitudinal.section") | 200 // If this WINFO-Artifact has a calculation trait. |
201 ) { | 201 if (calculationMode != null) { |
202 return getDischargeLongitudinalSectionData(); | 202 if (calculationMode.equals("calc.discharge.longitudinal.section") |
203 } | 203 ) { |
204 else if (calculationMode.equals("calc.extreme.curve")) { | 204 return getDischargeLongitudinalSectionData(); |
205 return (CalculationResult) | 205 } |
206 this.compute(context, ComputeType.ADVANCE, false); | 206 else if (calculationMode.equals("calc.extreme.curve")) { |
207 } | 207 return (CalculationResult) |
208 | 208 this.compute(context, ComputeType.ADVANCE, false); |
209 } | |
210 else if (calculationMode.equals("calc.w.differences")) { | |
211 return (CalculationResult) | |
212 this.compute(context, ComputeType.ADVANCE, true); | |
213 } | |
214 else { | |
215 logger.warn("Unhandled calculation_mode " + calculation_mode); | |
216 } | |
217 } | |
218 | |
219 // Otherwise get it from parameterization. | |
209 River river = RiverUtils.getRiver(this); | 220 River river = RiverUtils.getRiver(this); |
210 if (river == null) { | 221 if (river == null) { |
211 return error(new WQKms[0], "no.river.selected"); | 222 return error(new WQKms[0], "no.river.selected"); |
212 } | 223 } |
213 | 224 |