Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation6.java @ 2250:40608c82e9cb
Bugfix: create a report facet for historical discharge curves even if no data has been computed.
flys-artifacts/trunk@3899 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 03 Feb 2012 13:46:03 +0000 |
parents | 7335c526befd |
children | abb390101595 |
comparison
equal
deleted
inserted
replaced
2249:997df76c6f58 | 2250:40608c82e9cb |
---|---|
51 | 51 |
52 logger.debug("Take " + dts.size() + " into account."); | 52 logger.debug("Take " + dts.size() + " into account."); |
53 | 53 |
54 WQTimerange[] wqt = prepareCalculationData(dts); | 54 WQTimerange[] wqt = prepareCalculationData(dts); |
55 | 55 |
56 logger.debug("Number of calculation results: " + wqt.length); | |
57 | |
56 return new CalculationResult(wqt, this); | 58 return new CalculationResult(wqt, this); |
57 } | 59 } |
58 | 60 |
59 | 61 |
60 protected boolean checkParameters() { | 62 protected boolean checkParameters() { |
128 for (DischargeTable dt: dts) { | 130 for (DischargeTable dt: dts) { |
129 TimeInterval ti = dt.getTimeInterval(); | 131 TimeInterval ti = dt.getTimeInterval(); |
130 | 132 |
131 Date start = ti.getStartTime(); | 133 Date start = ti.getStartTime(); |
132 Date end = ti.getStopTime(); | 134 Date end = ti.getStopTime(); |
135 | |
136 if (end == null) { | |
137 logger.warn("TimeInterval has no stop time set!"); | |
138 | |
139 end = new Date(); | |
140 } | |
133 | 141 |
134 Timerange t = new Timerange(ti.getStartTime(),ti.getStopTime()); | 142 Timerange t = new Timerange(ti.getStartTime(),ti.getStopTime()); |
135 double w; | 143 double w; |
136 double q; | 144 double q; |
137 | 145 |