annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxExporter.java @ 8949:09e4a4909814

Distinguish between csv and pdf column headers
author gernotbelger
date Wed, 14 Mar 2018 18:34:34 +0100
parents a4f1ac81f26d
children 0adc6d04de95
rev   line source
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
2 * Software engineering by Intevation GmbH
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
3 *
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
7 */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
8
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
9 package org.dive4elements.river.artifacts.sinfo.flowdepthminmax;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
10
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
11 import java.util.ArrayList;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
12 import java.util.Collection;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
13
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
14 import org.apache.log4j.Logger;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
15 import org.dive4elements.river.artifacts.sinfo.common.AbstractSInfoExporter;
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
16 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultRow;
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
17 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
18 import org.dive4elements.river.artifacts.sinfo.util.BedHeightInfo;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
19 import org.dive4elements.river.artifacts.sinfo.util.MetaAndTableJRDataSource;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
20 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
21 import org.dive4elements.river.artifacts.sinfo.util.WstInfo;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
22
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
23 import au.com.bytecode.opencsv.CSVWriter;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
24
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
25 /**
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
26 * Generates different output formats (csv, pdf) of data that resulted from a flow depths computation.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
27 *
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
28 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
29 * @author Gernot Belger
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
30 */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
31 // REMARK: must be public because its registered in generators.xml
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
32 public class FlowDepthMinMaxExporter extends AbstractSInfoExporter<FlowDepthMinMaxCalculationResult, FlowDepthMinMaxCalculationResults> {
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
33
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
34 /** The log used in this exporter. */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
35 private static Logger log = Logger.getLogger(FlowDepthMinMaxExporter.class);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
36
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
37 private static final String JASPER_FILE = "/jasper/sinfo.flowdepthminmax.jasper";
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
38
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
39 @Override
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
40 protected Logger getLog() {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
41 return log;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
42 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
43
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
44 @Override
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
45 protected void writeCSVResultMetadata(final CSVWriter writer, final FlowDepthMinMaxCalculationResults results,
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
46 final FlowDepthMinMaxCalculationResult result) {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
47
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
48 final BedHeightInfo sounding = result.getAnySounding();
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
49 super.writeCSVSoundingMetadata(writer, sounding);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
50
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
51 final WstInfo wst = result.getWst();
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
52 writeCSVWaterlevelMetadata(writer, wst);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
53 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
54
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
55 @Override
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
56 protected void writeCSVGlobalMetadata(final CSVWriter writer, final FlowDepthMinMaxCalculationResults results) {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
57
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
58 super.writeCSVGlobalMetadataDefaults(writer, results);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
59
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
60 writer.writeNext(new String[] { "" });
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
61 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
62
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
63 /**
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
64 * Write the header, with different headings depending on whether at a
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
65 * gauge or at a location.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
66 *
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
67 * @param river
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
68 * @param useTkh
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
69 */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
70 @Override
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
71 protected void writeCSVHeader(final CSVWriter writer, final FlowDepthMinMaxCalculationResults results, final RiverInfo river) {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
72 log.info("FlowDepthExporter.writeCSVHeader");
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
73
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
74 final Collection<String> header = new ArrayList<>(11);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
75
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
76 header.add(msg(SInfoResultType.station.getCsvHeader()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
77 header.add(msgUnit(SInfoResultType.flowdepthmin.getCsvHeader(), SInfoResultType.flowdepthmin.getUnit()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
78 header.add(msgUnit(SInfoResultType.flowdepthmax.getCsvHeader(), SInfoResultType.flowdepthmax.getUnit()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
79 header.add(msgUnit(SInfoResultType.waterlevel.getCsvHeader(), river.getWstUnit()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
80 header.add(msgUnit(SInfoResultType.discharge.getCsvHeader(), SInfoResultType.discharge.getUnit()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
81 header.add(msg(SInfoResultType.waterlevelLabel.getCsvHeader()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
82 header.add(msg(SInfoResultType.gaugeLabel.getCsvHeader()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
83 header.add(msgUnit(SInfoResultType.meanBedHeight.getCsvHeader(), river.getWstUnit()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
84 header.add(msg(SInfoResultType.soundingLabel.getCsvHeader()));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
85 header.add(msg(SInfoResultType.location.getCsvHeader()));
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
86
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
87 writer.writeNext(header.toArray(new String[header.size()]));
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
88 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
89
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
90 @Override
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
91 protected String[] formatCSVRow(final FlowDepthMinMaxCalculationResults results, final FlowDepthMinMaxCalculationResult result, final SInfoResultRow row) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
92 return formatRow(result, row);
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
93 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
94
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
95 /**
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
96 * Format a row of a flow depth result into an array of string, both used by csv and pdf
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
97 *
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
98 * @param result
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
99 *
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
100 * @param useTkh
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
101 */
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
102 private String[] formatRow(final FlowDepthMinMaxCalculationResult result, final SInfoResultRow row) {
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
103
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
104 final Collection<String> lines = new ArrayList<>(10);
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
105
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
106 lines.add(row.exportValue(this.context, SInfoResultType.station));
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
107
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
108 // REMARK: null check as pdf will call this with null and in that case we show all columns (to avoid multiple jasper
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
109 // FIXME: does not work like this: we may have several pairs of min/max; so we need to look at all of them?
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
110 // templates)
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
111 // if (result == null || result.getMinSounding() != null)
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
112 lines.add(row.exportValue(this.context, SInfoResultType.flowdepthmin));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
113 // if (result == null || result.getMaxSounding() != null)
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
114 lines.add(row.exportValue(this.context, SInfoResultType.flowdepthmax));
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
115
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
116 lines.add(row.exportValue(this.context, SInfoResultType.waterlevel));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
117 lines.add(row.exportValue(this.context, SInfoResultType.discharge));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
118 lines.add(row.exportValue(this.context, SInfoResultType.waterlevelLabel));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
119 lines.add(row.exportValue(this.context, SInfoResultType.gaugeLabel));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
120 lines.add(row.exportValue(this.context, SInfoResultType.meanBedHeight));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
121 lines.add(row.exportValue(this.context, SInfoResultType.soundingLabel));
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
122 lines.add(row.exportValue(this.context, SInfoResultType.location));
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
123
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
124 return lines.toArray(new String[lines.size()]);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
125 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
126
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
127 @Override
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
128 protected final String getJasperFile() {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
129 return JASPER_FILE;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
130 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
131
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
132 @Override
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
133 protected final void addJRMetaData(final MetaAndTableJRDataSource source, final FlowDepthMinMaxCalculationResults results) {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
134
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
135 /* general metadata */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
136 super.addJRMetaDataDefaults(source, results);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
137
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
138 /* column headings */
8949
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
139 source.addMetaData("station_header", SInfoResultType.station.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
140 source.addMetaData("flowdepthmin_header", SInfoResultType.flowdepthmin.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
141 source.addMetaData("flowdepthmax_header", SInfoResultType.flowdepthmax.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
142 source.addMetaData("waterlevel_header", SInfoResultType.waterlevel.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
143 source.addMetaData("discharge_header", SInfoResultType.discharge.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
144 source.addMetaData("waterlevel_name_header", SInfoResultType.waterlevelLabel.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
145 source.addMetaData("gauge_header", SInfoResultType.gaugeLabel.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
146 source.addMetaData("bedheight_header", SInfoResultType.meanBedHeight.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
147 source.addMetaData("sounding_name_header", SInfoResultType.soundingLabel.getPdfHeader(this.context.getMeta()));
09e4a4909814 Distinguish between csv and pdf column headers
gernotbelger
parents: 8948
diff changeset
148 source.addMetaData("location_header", SInfoResultType.location.getPdfHeader(this.context.getMeta()));
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
149 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
150
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
151 @Override
8948
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
152 protected String[] formatPDFRow(final FlowDepthMinMaxCalculationResults results, final SInfoResultRow row) {
a4f1ac81f26d Work on SINFO-FlowDepthMinMax.
gernotbelger
parents: 8946
diff changeset
153 return formatRow(null, row);
8946
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
154 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
155 }

http://dive4elements.wald.intevation.org