annotate artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.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 e4606eae8ea5
children 0a5239a1e46e
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
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 import org.apache.log4j.Logger;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 import au.com.bytecode.opencsv.CSVWriter;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
25 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
26 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
27 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
28 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
29
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
30 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
31
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
32 import org.dive4elements.artifacts.CallMeta;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
33
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
34 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
35 import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
36 import org.dive4elements.river.artifacts.model.CalculationResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
37 import org.dive4elements.river.artifacts.model.HistoricalDischargeData;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
38 import org.dive4elements.river.artifacts.model.Timerange;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
39 import org.dive4elements.river.artifacts.model.WQTimerange;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
40 import org.dive4elements.river.artifacts.model.WQTJRDataSource;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
41 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
42 import org.dive4elements.river.utils.RiverUtils;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5421
diff changeset
43 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
44
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 * @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
48 */
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 public class HistoricalDischargeCurveExporter extends AbstractExporter {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
51 private static final Logger log =
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 Logger.getLogger(HistoricalDischargeCurveExporter.class);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53
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 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
56 "export.historical.discharge.csv.header.timerange";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 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
59 "export.historical.discharge.csv.header.waterlevel";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 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
62 "export.historical.discharge.csv.header.discharge";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63
7566
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
64 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
65 "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
66
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
67 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
68 "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
69
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 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
71 "export.historical.discharge.csv.header.gaugename";
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
73 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
74 "export.historical.discharge.pdf.mode";
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
75
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
76 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
77 "export.historical.discharge.pdf.file";
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 protected List<WQTimerange[]> data;
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80
7077
0a337f0005c2 Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
81 public HistoricalDischargeCurveExporter() {
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 data = new ArrayList<WQTimerange[]>();
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 }
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 @Override
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 protected void addData(Object d) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
87 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
88
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 if (d instanceof CalculationResult) {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90 d = ((CalculationResult) d).getData();
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
92 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
93
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
94 if (d instanceof HistoricalDischargeData) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
95 d = (WQTimerange[])((HistoricalDischargeData)d)
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
96 .getWQTimeranges();
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
97
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
98 if (d instanceof WQTimerange[]) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
99 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
100 data.add((WQTimerange[]) d);
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4197
diff changeset
101 }
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 }
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 @Override
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 protected void writeCSVData(CSVWriter writer) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
109 log.info("HistoricalDischargeCurveExporter.writeCSVData");
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
110 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
111
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112 writeCSVHeader(writer);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 for (WQTimerange[] arr: data) {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115 for (WQTimerange wqt: arr) {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 wqt2CSV(writer, wqt);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 }
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 @Override
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
123 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
124 WQTJRDataSource source = createJRData();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
125
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
126 String jasperFile = Resources.getMsg(
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
127 context.getMeta(),
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
128 JASPER_FILE,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
129 "/jasper/historical-discharge_en.jasper");
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
130 String confPath = Config.getConfigDirectory().toString();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
131
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
132 Map parameters = new HashMap();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
133 parameters.put("ReportTitle", "Exported Data");
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
134 try {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
135 JasperPrint print = JasperFillManager.fillReport(
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
136 confPath + jasperFile,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
137 parameters,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
138 source);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
139 JasperExportManager.exportReportToPdfStream(print, out);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
140 }
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
141 catch(JRException je) {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 7566
diff changeset
142 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
143 je.printStackTrace();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
144 }
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
145 }
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 protected void writeCSVHeader(CSVWriter writer) {
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
149 HistoricalDischargeAccess hda =
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
150 new HistoricalDischargeAccess((D4EArtifact) master);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
151 writer.writeNext(new String[] {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
152 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
153 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
154 msg(CSV_DISCHARGE_HEADER, CSV_DISCHARGE_HEADER),
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
155 (hda.getEvaluationMode()
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
156 == HistoricalDischargeAccess.EvaluationMode.W)
7566
32563516c485 issue1592: Fix csv headers for w or q calculations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7088
diff changeset
157 ? 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
158 : 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
159 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
160 });
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 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
165 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
166
2588
7dd45896e941 Issue 459.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2331
diff changeset
167 DateFormat df = Formatter.getMediumDateFormat(context);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
168 NumberFormat wf = Formatter.getHistoricalDischargeW(context);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
169 NumberFormat qf = Formatter.getHistoricalDischargeQ(context);
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
170
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
171 double[] wq = new double[3];
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
172
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
173 String gaugeName = getReferenceGaugename();
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
174
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
175 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
176
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 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
178 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
179
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 Timerange tr = item.timerange;
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
181 Date start = new Date(tr.getStart());
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
182 Date end = new Date(tr.getEnd());
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
183
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
184 item.get(wq);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
185
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
186 writer.writeNext(new String[] {
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
187 df.format(start) + " - " + df.format(end),
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
188 wf.format(wq[0]),
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
189 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
190 qf.format(wq[2]),
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
191 gaugeName
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
192 });
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
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
197 protected WQTJRDataSource createJRData() {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
198 WQTJRDataSource source = new WQTJRDataSource();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
199
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
200 addMetaData(source);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
201 for (WQTimerange[] arr: data) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
202 for (WQTimerange wqt: arr) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
203 addWQTData(source, wqt);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
204 }
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 return source;
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
208 }
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 protected void addMetaData(WQTJRDataSource source) {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
212 CallMeta meta = context.getMeta();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
213
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
214 D4EArtifact flys = (D4EArtifact) master;
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
215
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
216 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
217
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
218 Locale locale = Resources.getLocale(meta);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
219 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
220
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
221 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
222
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
223 source.addMetaData("calculation", Resources.getMsg(
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
224 locale,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
225 PDF_HEADER_MODE,
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
226 "Historical Discharge"));
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
227 }
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 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
231 DateFormat df = Formatter.getShortDateFormat(context);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
232 NumberFormat wf = Formatter.getHistoricalDischargeW(context);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
233 NumberFormat qf = Formatter.getHistoricalDischargeQ(context);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
234
2331
2c96222dd773 Picked rev4034 from trunk.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2311
diff changeset
235 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
236
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
237 String gaugeName = getReferenceGaugename();
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
238
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
239 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
240 Timerange tr = wqt.getTimerange(i);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
241 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
242 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
243
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
244 wqt.get(i, wq);
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
245
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
246 source.addData(new String[] {
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
247 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
248 wf.format(wq[0]),
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
249 qf.format(wq[1]),
2331
2c96222dd773 Picked rev4034 from trunk.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2311
diff changeset
250 qf.format(wq[2]),
2286
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
251 gaugeName
89ca1e8572e4 Added PDF export for historical discharge curve calculations.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2258
diff changeset
252 });
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
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
257 public String getReferenceGaugename() {
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
258 return RiverUtils.getReferenceGaugeName((D4EArtifact) master);
2258
ea173e4c07c7 Added a CSV export for historical discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
259 }
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 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org