comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstMissVolCalculationResult3.java @ 9444:ecadc9ed0ba0

Added heights and depths of cross section fields in the bundu bzws calculation and longitudinal section charts
author mschaefer
date Tue, 21 Aug 2018 13:41:18 +0200
parents d194c5b24bf8
children e60584f2a531
comparison
equal deleted inserted replaced
9443:515643b2c49a 9444:ecadc9ed0ba0
1 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
2 * Software engineering by 2 * Software engineering by
3 * Björnsen Beratende Ingenieure GmbH 3 * Björnsen Beratende Ingenieure GmbH
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt 4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
5 * 5 *
6 * This file is Free Software under the GNU AGPL (>=v3) 6 * This file is Free Software under the GNU AGPL (>=v3)
49 49
50 protected String[] formatRow(final AbstractExportContext exportContext, final ResultRow row) { 50 protected String[] formatRow(final AbstractExportContext exportContext, final ResultRow row) {
51 51
52 final Collection<String> lines = new ArrayList<>(20); 52 final Collection<String> lines = new ArrayList<>(20);
53 53
54 lines.add(exportContext.formatRowValue(row, BunduResultType.missStationRange)); 54 lines.add(exportContext.formatRowValue(row, BunduResultType.missStationRangeFrom));
55 lines.add(exportContext.formatRowValue(row, BunduResultType.missStationRangeTo));
55 lines.add(exportContext.formatRowValue(row, BunduResultType.missVolumeTotal)); 56 lines.add(exportContext.formatRowValue(row, BunduResultType.missVolumeTotal));
56 lines.add(exportContext.formatRowValue(row, BunduResultType.missMassTotal)); 57 lines.add(exportContext.formatRowValue(row, BunduResultType.missMassTotal));
57 return lines.toArray(new String[lines.size()]); 58 return lines.toArray(new String[lines.size()]);
58 } 59 }
59 60
60 @Override 61 @Override
61 public void writeCSVHeader(final ExportContextCSV exportContextCSV, final RiverInfo river) { 62 public void writeCSVHeader(final ExportContextCSV exportContextCSV, final RiverInfo river) {
62 63
63 final int colSize = 3; 64 final int colSize = 4;
64 exportContextCSV.writeTitleForTabs("bundu.export.csv.title.bezugswst.result3", colSize); // Voraussetzung für Tabs ist, dass der Titel vor den Headern 65 exportContextCSV.writeTitleForTabs("bundu.export.csv.title.bezugswst.result3", colSize); // Voraussetzung für Tabs ist, dass der Titel vor den Headern
65 final Collection<String> header = new ArrayList<>(colSize); 66 final Collection<String> header = new ArrayList<>(colSize);
66 67
67 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missStationRange)); 68 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missStationRangeFrom));
69 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missStationRangeTo));
68 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missVolumeTotal)); 70 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missVolumeTotal));
69 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missMassTotal)); 71 header.add(exportContextCSV.formatCsvHeader(BunduResultType.missMassTotal));
70 72
71 exportContextCSV.writeCSVLine(header.toArray(new String[header.size()])); 73 exportContextCSV.writeCSVLine(header.toArray(new String[header.size()]));
72 74
86 88
87 @Override 89 @Override
88 protected void addJRTableHeader(final ExportContextPDF exportContextPDF, final MetaAndTableJRDataSource source) { 90 protected void addJRTableHeader(final ExportContextPDF exportContextPDF, final MetaAndTableJRDataSource source) {
89 /* column headings */ 91 /* column headings */
90 92
91 exportContextPDF.addJRMetadata(source, "station_header", BunduResultType.missStationRange); 93 exportContextPDF.addJRMetadata(source, "station_header", BunduResultType.missStationRangeFrom);
94 exportContextPDF.addJRMetadata(source, "station_header", BunduResultType.missStationRangeTo);
92 exportContextPDF.addJRMetadata(source, "channel_miss_volume_header", BunduResultType.missVolumeTotal); 95 exportContextPDF.addJRMetadata(source, "channel_miss_volume_header", BunduResultType.missVolumeTotal);
93 exportContextPDF.addJRMetadata(source, "channel_miss_mass_header", BunduResultType.missMassTotal); 96 exportContextPDF.addJRMetadata(source, "channel_miss_mass_header", BunduResultType.missMassTotal);
94 97
95 } 98 }
96 } 99 }

http://dive4elements.wald.intevation.org