comparison flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/DeltaWtExporter.java @ 4238:50273de4cf63

flys/issue825/2 Fix labeling of Analysisperiods (like A1, A2....)
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 24 Oct 2012 14:29:10 +0200
parents 36107252e9ef
children b195fede1c3b
comparison
equal deleted inserted replaced
4237:640adb7bced5 4238:50273de4cf63
160 log.debug("AnalysisPeriods: " + analysisPeriods.size()); 160 log.debug("AnalysisPeriods: " + analysisPeriods.size());
161 } 161 }
162 162
163 String analysisTemplate = getAnalysisTemplate(); 163 String analysisTemplate = getAnalysisTemplate();
164 164
165 int analysisCount = 1;
166
167 for (KMIndex<AnalysisPeriod []> periods: analysisPeriods) { 165 for (KMIndex<AnalysisPeriod []> periods: analysisPeriods) {
168 166
169 // Typically resulting in A1,A2...
170 String analyisS = MessageFormat.format(
171 analysisTemplate, analysisCount);
172
173 for (KMIndex.Entry<AnalysisPeriod []> kmEntry: periods) { 167 for (KMIndex.Entry<AnalysisPeriod []> kmEntry: periods) {
174 168
175 String kmS = kmF.format(kmEntry.getKm()); 169 String kmS = kmF.format(kmEntry.getKm());
170 int analysisCount = 1;
176 171
177 for (AnalysisPeriod period: kmEntry.getValue()) { 172 for (AnalysisPeriod period: kmEntry.getValue()) {
173 // Typically resulting in A1,A2...
174 String analyisS = MessageFormat.format(analysisTemplate,
175 analysisCount);
178 QWD [] qwds = period.getQWDs(); 176 QWD [] qwds = period.getQWDs();
179 /* issue825
180 km; Ereignis, Abfluss, GEMESSENER Wasserstand; Status (RECHTSBÜNDIG), del W
181 */
182 177
183 if (qwds != null) { 178 if (qwds != null) {
184 for (QWD qwd: qwds) { 179 for (QWD qwd: qwds) {
185 String deltaWS = dwF.format(qwd.getDeltaW()); 180 String deltaWS = dwF.format(qwd.getDeltaW());
186 String qS = qF.format(qwd.getQ()); 181 String qS = qF.format(qwd.getQ());
194 wS, 189 wS,
195 analyisS, 190 analyisS,
196 deltaWS }); 191 deltaWS });
197 } 192 }
198 } 193 }
194 ++analysisCount;
199 } 195 }
200 } 196 }
201 ++analysisCount;
202 } 197 }
203 writer.flush(); 198 writer.flush();
204 } 199 }
205 200
206 /** Template to create "State" strings like A1,A2... */ 201 /** Template to create "State" strings like A1,A2... */

http://dive4elements.wald.intevation.org