annotate artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java @ 9801:1d7a72a50183 3.2.x tip

Assume Compose V2, consistently
author Tom Gottfried <tom@intevation.de>
date Thu, 23 Nov 2023 10:14:13 +0100
parents 0a5239a1e46e
children
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5867
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5867
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
9 package org.dive4elements.river.exports;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import java.io.OutputStream;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import java.text.NumberFormat;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import java.text.DateFormat;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import java.util.ArrayList;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 import java.util.Date;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 import java.util.List;
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
17 import java.util.Map;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
18 import java.util.HashMap;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
19 import java.util.Locale;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8856
diff changeset
21 import org.apache.logging.log4j.Logger;
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8856
diff changeset
22 import org.apache.logging.log4j.LogManager;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 import au.com.bytecode.opencsv.CSVWriter;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
26 import net.sf.jasperreports.engine.JasperExportManager;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
27 import net.sf.jasperreports.engine.JasperFillManager;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
28 import net.sf.jasperreports.engine.JasperPrint;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
29 import net.sf.jasperreports.engine.JRException;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
30
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
31 import org.dive4elements.artifacts.common.utils.Config;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
33 import org.dive4elements.artifacts.CallMeta;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
34
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
35 import org.dive4elements.river.artifacts.D4EArtifact;
7566
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
36 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
37 import org.dive4elements.river.artifacts.model.CalculationResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
38 import org.dive4elements.river.artifacts.model.HistoricalDischargeData;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
39 import org.dive4elements.river.artifacts.model.Timerange;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
40 import org.dive4elements.river.artifacts.model.WQTimerange;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
41 import org.dive4elements.river.artifacts.model.WQTJRDataSource;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
42 import org.dive4elements.river.artifacts.resources.Resources;
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
43 import org.dive4elements.river.utils.RiverUtils;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
44 import org.dive4elements.river.utils.Formatter;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 /**
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 */
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 public class HistoricalDischargeCurveExporter extends AbstractExporter {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
52 private static final Logger log =
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8856
diff changeset
53 LogManager.getLogger(HistoricalDischargeCurveExporter.class);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 public static final String CSV_TIMERANGE_HEADER =
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 "export.historical.discharge.csv.header.timerange";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 public static final String CSV_WATERLEVEL_HEADER =
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 "export.historical.discharge.csv.header.waterlevel";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 public static final String CSV_DISCHARGE_HEADER =
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 "export.historical.discharge.csv.header.discharge";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64
7566
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
65 public static final String CSV_DIFF_HEADER_W =
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
66 "export.historical.discharge.csv.header.diff.w";
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
67
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
68 public static final String CSV_DIFF_HEADER_Q =
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
69 "export.historical.discharge.csv.header.diff.q";
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 public static final String CSV_GAUGENAME_HEADER =
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 "export.historical.discharge.csv.header.gaugename";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
74 public static final String PDF_HEADER_MODE =
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
75 "export.historical.discharge.pdf.mode";
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
76
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
77 public static final String JASPER_FILE =
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
78 "export.historical.discharge.pdf.file";
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 protected List<WQTimerange[]> data;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81
7077
0a337f0005c2 Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
82 public HistoricalDischargeCurveExporter() {
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 data = new ArrayList<WQTimerange[]>();
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 @Override
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87 protected void addData(Object d) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
88 log.debug("Add data of class: " + d.getClass());
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90 if (d instanceof CalculationResult) {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91 d = ((CalculationResult) d).getData();
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
93 log.debug("Internal data of CalculationResult: " + d.getClass());
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
95 if (d instanceof HistoricalDischargeData) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
96 d = (WQTimerange[])((HistoricalDischargeData)d)
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
97 .getWQTimeranges();
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
98
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
99 if (d instanceof WQTimerange[]) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
100 log.debug("Add new data of type WQTimerange");
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
101 data.add((WQTimerange[]) d);
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
102 }
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 @Override
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109 protected void writeCSVData(CSVWriter writer) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
110 log.info("HistoricalDischargeCurveExporter.writeCSVData");
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
111 log.debug("CSV gets " + data.size() + " WQTimerange[] objects.");
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113 writeCSVHeader(writer);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115 for (WQTimerange[] arr: data) {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 for (WQTimerange wqt: arr) {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 wqt2CSV(writer, wqt);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
121
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
122
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
123 @Override
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
124 protected void writePDF(OutputStream out) {
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
125 WQTJRDataSource source = createJRData();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
126
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
127 String jasperFile = Resources.getMsg(
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
128 context.getMeta(),
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
129 JASPER_FILE,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
130 "/jasper/historical-discharge_en.jasper");
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
131 String confPath = Config.getConfigDirectory().toString();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
132
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
133 Map parameters = new HashMap();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
134 parameters.put("ReportTitle", "Exported Data");
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
135 try {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
136 JasperPrint print = JasperFillManager.fillReport(
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
137 confPath + jasperFile,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
138 parameters,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
139 source);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
140 JasperExportManager.exportReportToPdfStream(print, out);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
141 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
142 catch(JRException je) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
143 log.warn("Error generating PDF Report!");
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
144 je.printStackTrace();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
145 }
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
146 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
147
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
148
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
149 protected void writeCSVHeader(CSVWriter writer) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
150 HistoricalDischargeAccess hda =
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
151 new HistoricalDischargeAccess((D4EArtifact) master);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
152 writer.writeNext(new String[] {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
153 msg(CSV_TIMERANGE_HEADER, CSV_TIMERANGE_HEADER),
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
154 msg(CSV_WATERLEVEL_HEADER, CSV_WATERLEVEL_HEADER),
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
155 msg(CSV_DISCHARGE_HEADER, CSV_DISCHARGE_HEADER),
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
156 (hda.getEvaluationMode()
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
157 == HistoricalDischargeAccess.EvaluationMode.W)
7566
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
158 ? msg(CSV_DIFF_HEADER_W, CSV_DIFF_HEADER_W)
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
159 : msg(CSV_DIFF_HEADER_Q, CSV_DIFF_HEADER_Q),
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
160 msg(CSV_GAUGENAME_HEADER, CSV_GAUGENAME_HEADER)
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
161 });
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
162 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
163
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
164
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
165 protected void wqt2CSV(CSVWriter writer, WQTimerange wqt) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
166 log.debug("Add next WQTimerange to CSV");
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
167
2588
7dd45896e941 Issue 459.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2331
diff changeset
168 DateFormat df = Formatter.getMediumDateFormat(context);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
169 NumberFormat wf = Formatter.getHistoricalDischargeW(context);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
170 NumberFormat qf = Formatter.getHistoricalDischargeQ(context);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
171
2311
b8df8d1476ba Compute differences between discharge table values and reference discharge table values in historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2286
diff changeset
172 double[] wq = new double[3];
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
173
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
174 String gaugeName = getReferenceGaugename();
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
175
4171
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
176 List<WQTimerange.TimerangeItem> sorted = wqt.sort();
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
177
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
178 for (int i = 0, n = sorted.size(); i < n; i++) {
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
179 WQTimerange.TimerangeItem item = sorted.get(i);
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
180
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
181 Timerange tr = item.timerange;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
182 Date start = new Date(tr.getStart());
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
183 Date end = new Date(tr.getEnd());
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
184
4171
1d8faeedda0c Sort calculation results of a historical discharge calculation based on their start date.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2588
diff changeset
185 item.get(wq);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
186
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
187 writer.writeNext(new String[] {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
188 df.format(start) + " - " + df.format(end),
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
189 wf.format(wq[0]),
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
190 qf.format(wq[1]),
2311
b8df8d1476ba Compute differences between discharge table values and reference discharge table values in historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2286
diff changeset
191 qf.format(wq[2]),
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
192 gaugeName
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
193 });
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
194 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
195 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
196
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
197
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
198 protected WQTJRDataSource createJRData() {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
199 WQTJRDataSource source = new WQTJRDataSource();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
200
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
201 addMetaData(source);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
202 for (WQTimerange[] arr: data) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
203 for (WQTimerange wqt: arr) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
204 addWQTData(source, wqt);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
205 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
206 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
207
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
208 return source;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
209 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
210
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
211
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
212 protected void addMetaData(WQTJRDataSource source) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
213 CallMeta meta = context.getMeta();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
214
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
215 D4EArtifact flys = (D4EArtifact) master;
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
216
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
217 source.addMetaData ("river", RiverUtils.getRivername(flys));
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
218
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
219 Locale locale = Resources.getLocale(meta);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
220 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
221
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
222 source.addMetaData("date", df.format(new Date()));
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
223
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
224 source.addMetaData("calculation", Resources.getMsg(
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
225 locale,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
226 PDF_HEADER_MODE,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
227 "Historical Discharge"));
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
228 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
229
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
230
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
231 protected void addWQTData(WQTJRDataSource source, WQTimerange wqt) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
232 DateFormat df = Formatter.getShortDateFormat(context);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
233 NumberFormat wf = Formatter.getHistoricalDischargeW(context);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
234 NumberFormat qf = Formatter.getHistoricalDischargeQ(context);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
235
2331
2c96222dd773 Picked rev4034 from trunk.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2311
diff changeset
236 double[] wq = new double[3];
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
237
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
238 String gaugeName = getReferenceGaugename();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
239
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
240 for (int i = 0, n = wqt.size(); i < n; i++) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
241 Timerange tr = wqt.getTimerange(i);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
242 Date start = new Date(tr.getStart());
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
243 Date end = new Date(tr.getEnd());
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
244
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
245 wqt.get(i, wq);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
246
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
247 source.addData(new String[] {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
248 df.format(start) + " - " + df.format(end),
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
249 wf.format(wq[0]),
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
250 qf.format(wq[1]),
2331
2c96222dd773 Picked rev4034 from trunk.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2311
diff changeset
251 qf.format(wq[2]),
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
252 gaugeName
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
253 });
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
254 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
255 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
256
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
257
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
258 public String getReferenceGaugename() {
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
259 return RiverUtils.getReferenceGaugeName((D4EArtifact) master);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
260 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
261 }
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
262 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org