Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/sq/SQRelationExporter.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 | b30068e92757 |
children | 740d65e4aa14 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
247 writer.writeAll(data2StringArrays(result, true)); | 247 writer.writeAll(data2StringArrays(result, true)); |
248 } | 248 } |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 protected List<String[]> data2StringArrays(SQResult result, boolean includeMeasurements) { | 252 protected List<String[]> data2StringArrays( |
253 SQResult result, | |
254 boolean includeMeasurements | |
255 ) { | |
253 String km = Formatter.getSQRelationKM(context | 256 String km = Formatter.getSQRelationKM(context |
254 ).format(result.getKm()); | 257 ).format(result.getKm()); |
255 List<String[]> retval = new ArrayList<String[]>(); | 258 List<String[]> retval = new ArrayList<String[]>(); |
256 | 259 |
257 NumberFormat sqAFormatter = Formatter.getSQRelationA(context); | 260 NumberFormat sqAFormatter = Formatter.getSQRelationA(context); |
278 b = sqBFormatter.format(parameters.getValue(0, "b")); | 281 b = sqBFormatter.format(parameters.getValue(0, "b")); |
279 | 282 |
280 /* The std_dev parameter contains the standard error actually */ | 283 /* The std_dev parameter contains the standard error actually */ |
281 sd = fThreeFormatter.format(parameters.getValue(0, "std_dev")); | 284 sd = fThreeFormatter.format(parameters.getValue(0, "std_dev")); |
282 max_q = fZeroFormatter.format(parameters.getValue(0, "max_q")); | 285 max_q = fZeroFormatter.format(parameters.getValue(0, "max_q")); |
283 c_ferguson = fTwoFormatter.format(parameters.getValue(0, "c_ferguson")); | 286 c_ferguson = fTwoFormatter.format( |
287 parameters.getValue(0, "c_ferguson")); | |
284 c_duan = fTwoFormatter.format(parameters.getValue(0, "c_duan")); | 288 c_duan = fTwoFormatter.format(parameters.getValue(0, "c_duan")); |
285 r2 = fTwoFormatter.format(parameters.getValue(0, "r2")); | 289 r2 = fTwoFormatter.format(parameters.getValue(0, "r2")); |
286 | 290 |
287 | 291 |
288 o = String.valueOf(fraction.totalNumOutliers()); | 292 o = String.valueOf(fraction.totalNumOutliers()); |
391 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); | 395 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); |
392 | 396 |
393 source.addMetaData("date", df.format(new Date())); | 397 source.addMetaData("date", df.format(new Date())); |
394 | 398 |
395 SQRelationAccess access = new SQRelationAccess(arti); | 399 SQRelationAccess access = new SQRelationAccess(arti); |
396 source.addMetaData("location", "KM " + getKmFormatter().format(access.getLocation())); | 400 source.addMetaData( |
401 "location", "KM " + getKmFormatter().format(access.getLocation())); | |
397 | 402 |
398 DateRange period = access.getPeriod(); | 403 DateRange period = access.getPeriod(); |
399 source.addMetaData("periods", df.format(period.getFrom()) + " - " + | 404 source.addMetaData("periods", df.format(period.getFrom()) + " - " + |
400 df.format(period.getTo())); | 405 df.format(period.getTo())); |
401 | 406 |
402 source.addMetaData("outliertest", Resources.getMsg(meta, | 407 source.addMetaData("outliertest", Resources.getMsg(meta, |
403 access.getOutlierMethod(), | 408 access.getOutlierMethod(), |
404 access.getOutlierMethod())); | 409 access.getOutlierMethod())); |
405 source.addMetaData("outliers", Formatter.getRawFormatter(context).format( | 410 source.addMetaData( |
411 "outliers", Formatter.getRawFormatter(context).format( | |
406 access.getOutliers())); | 412 access.getOutliers())); |
407 | 413 |
408 source.addMetaData("calculation", Resources.getMsg( | 414 source.addMetaData("calculation", Resources.getMsg( |
409 locale, | 415 locale, |
410 PDF_HEADER_MODE, | 416 PDF_HEADER_MODE, |
416 source.addMetaData("msName", measurementStationName); | 422 source.addMetaData("msName", measurementStationName); |
417 } else { | 423 } else { |
418 source.addMetaData("msName", ""); | 424 source.addMetaData("msName", ""); |
419 } | 425 } |
420 | 426 |
421 String measurementStationGaugeName = access.getMeasurementStationGaugeName(); | 427 String measurementStationGaugeName = access |
428 .getMeasurementStationGaugeName(); | |
422 | 429 |
423 if (measurementStationGaugeName != null) { | 430 if (measurementStationGaugeName != null) { |
424 source.addMetaData("msGauge", measurementStationGaugeName); | 431 source.addMetaData("msGauge", measurementStationGaugeName); |
425 } else { | 432 } else { |
426 source.addMetaData("msGauge", ""); | 433 source.addMetaData("msGauge", ""); |