Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveExporter.java @ 7597:fca46ce8e4f5
(issue1225) Implement Magic labels.
There is now a new value in the chartsettings "Suggested Label" which
is hidden in the property editor. A suggested label is the label that
combines the label's of all processors that wrote data to an axis.
This suggested label is set as the label when the user has not
overwritten the label.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 25 Nov 2013 14:58:14 +0100 |
parents | 41567bf1e131 |
children | e4606eae8ea5 |
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:
4858
diff
changeset
|
9 package org.dive4elements.river.exports; |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import java.io.OutputStream; |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
12 import java.text.NumberFormat; |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import java.util.ArrayList; |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import java.util.List; |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
15 import java.util.Map; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
16 import java.util.HashMap; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
17 import java.util.Date; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
18 import java.text.DateFormat; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
19 import java.util.Locale; |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 import org.apache.log4j.Logger; |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 import au.com.bytecode.opencsv.CSVWriter; |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
25 import net.sf.jasperreports.engine.JasperExportManager; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
26 import net.sf.jasperreports.engine.JasperFillManager; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
27 import net.sf.jasperreports.engine.JasperPrint; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
28 import net.sf.jasperreports.engine.JRException; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
29 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
30 import org.dive4elements.artifacts.CallMeta; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
31 import org.dive4elements.artifacts.common.utils.Config; |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5865
diff
changeset
|
33 import org.dive4elements.river.artifacts.D4EArtifact; |
709
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
701
diff
changeset
|
34 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
35 import org.dive4elements.river.artifacts.access.RangeAccess; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
36 import org.dive4elements.river.artifacts.model.WQDay; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
37 import org.dive4elements.river.artifacts.model.CalculationResult; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
38 import org.dive4elements.river.artifacts.model.WKmsJRDataSource; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
39 import org.dive4elements.river.artifacts.resources.Resources; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
40 |
5865
73da40528cf2
River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
41 import org.dive4elements.river.utils.RiverUtils; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4858
diff
changeset
|
42 import org.dive4elements.river.utils.Formatter; |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 /** |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 */ |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 public class DurationCurveExporter extends AbstractExporter { |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 |
1160
efe1b8545f5c
Cosmetics
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
709
diff
changeset
|
50 /** The logger used in this exporter. */ |
3778
35a6c9a49a76
Fixed wrong assigned loggers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3083
diff
changeset
|
51 private static Logger logger = Logger.getLogger(DurationCurveExporter.class); |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 |
416
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
54 public static final String CSV_DURATION_HEADER = |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
55 "export.duration.curve.csv.header.duration"; |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
56 |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
57 public static final String CSV_W_HEADER = |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
58 "export.duration.curve.csv.header.w"; |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
59 |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
60 public static final String CSV_Q_HEADER = |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
61 "export.duration.curve.csv.header.q"; |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
62 |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
63 public static final String DEFAULT_CSV_DURATION_HEADER = "D [Tagen]"; |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
64 public static final String DEFAULT_CSV_W_HEADER = "W [NN + m]"; |
664
e006da5679d2
s@m³/s@m\u00b3/s@
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
445
diff
changeset
|
65 public static final String DEFAULT_CSV_Q_HEADER = "Q [m\u00b3/s]"; |
416
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
66 |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
67 public static final String PDF_HEADER_MODE = "export.duration.pdf.mode"; |
2185
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
68 public static final String JASPER_FILE = "export.duration.pdf.file"; |
416
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
69 |
1160
efe1b8545f5c
Cosmetics
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
709
diff
changeset
|
70 /** The storage that contains all WQKms objects for the different facets. */ |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 protected List<WQDay> data; |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 |
7077
0a337f0005c2
Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6101
diff
changeset
|
73 public DurationCurveExporter() { |
0a337f0005c2
Extended init() of OutGenerator to take name of the out to serve.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6101
diff
changeset
|
74 data = new ArrayList<WQDay>(); |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 } |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
701
dad1a2c88f9f
Base WST/CSV exports on facets. TODO: generate the facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
664
diff
changeset
|
77 @Override |
dad1a2c88f9f
Base WST/CSV exports on facets. TODO: generate the facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
664
diff
changeset
|
78 protected void addData(Object d) { |
709
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
701
diff
changeset
|
79 if (d instanceof CalculationResult) { |
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
701
diff
changeset
|
80 d = ((CalculationResult)d).getData(); |
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
701
diff
changeset
|
81 if (d instanceof WQDay) { |
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
701
diff
changeset
|
82 data.add((WQDay)d); |
3b7e9ddf6bb1
New model to transport data and error reports of calculations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
701
diff
changeset
|
83 } |
701
dad1a2c88f9f
Base WST/CSV exports on facets. TODO: generate the facets.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
664
diff
changeset
|
84 } |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 } |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 protected void writeCSVData(CSVWriter writer) { |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 logger.info("DurationCurveExporter.writeData"); |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 |
416
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
91 writeCSVHeader(writer); |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
92 |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 for (WQDay wqday: data) { |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 wQDay2CSV(writer, wqday); |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 } |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 } |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 |
416
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
99 protected void writeCSVHeader(CSVWriter writer) { |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
100 logger.info("DurationCurveExporter.writeCSVHeader"); |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
101 |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
102 writer.writeNext(new String[] { |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
103 msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER), |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
104 msg(CSV_Q_HEADER, DEFAULT_CSV_Q_HEADER), |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
105 msg(CSV_DURATION_HEADER, DEFAULT_CSV_DURATION_HEADER) |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
106 }); |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
107 } |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
108 |
340dc41a7ea3
The CSV exports will now have headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
391
diff
changeset
|
109 |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 protected void wQDay2CSV(CSVWriter writer, WQDay wqday) { |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 logger.debug("DurationCurveExporter.wQDay2CSV"); |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 int size = wqday.size(); |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
115 NumberFormat wf = getWFormatter(); |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
116 NumberFormat qf = getQFormatter(); |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
117 NumberFormat df = getDFormatter(); |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
118 |
1689
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
119 if (wqday.isIncreasing()) { |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
120 for (int i = size-1; i >= 0; i --) { |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
121 writer.writeNext(new String[] { |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
122 wf.format(wqday.getW(i)), |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
123 qf.format(wqday.getQ(i)), |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
124 df.format(wqday.getDay(i)) |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
125 }); |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
126 } |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
127 } |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
128 else { |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
129 for (int i = 0; i < size; i ++) { |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
130 writer.writeNext(new String[] { |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
131 wf.format(wqday.getW(i)), |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
132 qf.format(wqday.getQ(i)), |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
133 df.format(wqday.getDay(i)) |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
134 }); |
e9475d2ef343
Bugfix: #189 Changed the order of a duration curve CSV export.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1160
diff
changeset
|
135 } |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 } |
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 } |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
138 |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
139 |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
140 /** |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
141 * Returns the number formatter for W values. |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
142 * |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
143 * @return the number formatter for W values. |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
144 */ |
2284
5d1ba04d2f68
Refactored Formatter access to ease reuse.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2185
diff
changeset
|
145 @Override |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
146 protected NumberFormat getWFormatter() { |
445
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
418
diff
changeset
|
147 return Formatter.getDurationW(context); |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
148 } |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
149 |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
150 |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
151 /** |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
152 * Returns the number formatter for Q values. |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
153 * |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
154 * @return the number formatter for Q values. |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
155 */ |
2284
5d1ba04d2f68
Refactored Formatter access to ease reuse.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2185
diff
changeset
|
156 @Override |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
157 protected NumberFormat getQFormatter() { |
445
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
418
diff
changeset
|
158 return Formatter.getDurationQ(context); |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
159 } |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
160 |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
161 |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
162 /** |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
163 * Returns the number formatter for duration values. |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
164 * |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
165 * @return the number formatter for duration values. |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
166 */ |
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
167 protected NumberFormat getDFormatter() { |
445
a7947972fdeb
Added a new class that supports formatters for different types of data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
418
diff
changeset
|
168 return Formatter.getDurationD(context); |
418
e0fec407a280
ISSUE-53 Formatted number values of CSV exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
416
diff
changeset
|
169 } |
2176
65dac9cf6ff5
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1689
diff
changeset
|
170 |
65dac9cf6ff5
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1689
diff
changeset
|
171 |
65dac9cf6ff5
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1689
diff
changeset
|
172 @Override |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
173 protected void writePDF(OutputStream out) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
174 WKmsJRDataSource source = createJRData(); |
2185
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
175 |
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
176 String jasperFile = Resources.getMsg( |
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
177 context.getMeta(), |
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
178 JASPER_FILE, |
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
179 "/jasper/duration_en.jasper"); |
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
180 String confPath = Config.getConfigDirectory().toString(); |
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
181 |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
182 Map parameters = new HashMap(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
183 parameters.put("ReportTitle", "Exported Data"); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
184 try { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
185 JasperPrint print = JasperFillManager.fillReport( |
2185
a9a8df1473fd
Added i18n support to PDF report export.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2178
diff
changeset
|
186 confPath + jasperFile, |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
187 parameters, |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
188 source); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
189 JasperExportManager.exportReportToPdfStream(print, out); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
190 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
191 catch(JRException je) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
192 logger.warn("Error generating PDF Report!"); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
193 je.printStackTrace(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
194 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
195 } |
2176
65dac9cf6ff5
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1689
diff
changeset
|
196 |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
197 protected WKmsJRDataSource createJRData() { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
198 WKmsJRDataSource source = new WKmsJRDataSource(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
199 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
200 addMetaData(source); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
201 for (WQDay wqday: data) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
202 addWQDayData(source, wqday); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
203 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
204 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
205 return source; |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
206 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
207 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
208 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
209 protected void addMetaData(WKmsJRDataSource source) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
210 CallMeta meta = context.getMeta(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
211 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5865
diff
changeset
|
212 D4EArtifact flys = (D4EArtifact) master; |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
213 |
5865
73da40528cf2
River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
214 source.addMetaData ("river", RiverUtils.getRivername(flys)); |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
215 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
216 Locale locale = Resources.getLocale(meta); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
217 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
218 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
219 source.addMetaData("date", df.format(new Date())); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
220 |
6101
a0078e5e3b39
Removed unused context from RangeAccess and subclasses leading to some dead code removal.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
221 RangeAccess rangeAccess = new RangeAccess(flys); |
4858
56fbdcdb7ff2
ChartGenerator, DurationCurveExporter: Updated to use RangeAccess instead of FLYSUtils.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3778
diff
changeset
|
222 double[] kms = rangeAccess.getKmRange(); |
2178
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
223 source.addMetaData("range", String.valueOf(kms[0])); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
224 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
225 source.addMetaData("calculation", Resources.getMsg( |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
226 locale, |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
227 PDF_HEADER_MODE, |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
228 "Duration")); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
229 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
230 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
231 protected void addWQDayData(WKmsJRDataSource source, WQDay wqday) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
232 int size = wqday.size(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
233 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
234 NumberFormat wf = getWFormatter(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
235 NumberFormat qf = getQFormatter(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
236 NumberFormat df = getDFormatter(); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
237 |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
238 if (wqday.isIncreasing()) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
239 for (int i = size-1; i >= 0; i --) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
240 source.addData(new String[] { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
241 "", |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
242 wf.format(wqday.getW(i)), |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
243 qf.format(wqday.getQ(i)), |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
244 "", "", "", |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
245 df.format(wqday.getDay(i)) |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
246 }); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
247 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
248 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
249 else { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
250 for (int i = 0; i < size; i ++) { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
251 source.addData(new String[] { |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
252 "", |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
253 wf.format(wqday.getW(i)), |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
254 qf.format(wqday.getQ(i)), |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
255 "", "", "", |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
256 df.format(wqday.getDay(i)) |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
257 }); |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
258 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
259 } |
1d7fb2cabfc7
Issue 138.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2176
diff
changeset
|
260 } |
391
5d6988836f01
Added an exporter to export the computed data of a duration curve.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
261 } |
3083
4bd3d8bbb60c
Added missing vim lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2290
diff
changeset
|
262 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |