Mercurial > dive4elements > river
changeset 7566:32563516c485
issue1592: Fix csv headers for w or q calculations.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 13 Nov 2013 11:32:47 +0100 |
parents | 84107f13167c |
children | 286c0094af62 |
files | artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java artifacts/src/main/resources/messages.properties artifacts/src/main/resources/messages_de.properties artifacts/src/main/resources/messages_de_DE.properties artifacts/src/main/resources/messages_en.properties |
diffstat | 5 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java Wed Nov 13 08:10:00 2013 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java Wed Nov 13 11:32:47 2013 +0100 @@ -32,6 +32,7 @@ import org.dive4elements.artifacts.CallMeta; import org.dive4elements.river.artifacts.D4EArtifact; +import org.dive4elements.river.artifacts.access.HistoricalDischargeAccess; import org.dive4elements.river.artifacts.model.CalculationResult; import org.dive4elements.river.artifacts.model.HistoricalDischargeData; import org.dive4elements.river.artifacts.model.Timerange; @@ -60,8 +61,11 @@ public static final String CSV_DISCHARGE_HEADER = "export.historical.discharge.csv.header.discharge"; - public static final String CSV_DIFF_HEADER = - "export.historical.discharge.csv.header.diff"; + public static final String CSV_DIFF_HEADER_W = + "export.historical.discharge.csv.header.diff.w"; + + public static final String CSV_DIFF_HEADER_Q = + "export.historical.discharge.csv.header.diff.q"; public static final String CSV_GAUGENAME_HEADER = "export.historical.discharge.csv.header.gaugename"; @@ -141,11 +145,14 @@ protected void writeCSVHeader(CSVWriter writer) { + HistoricalDischargeAccess hda = new HistoricalDischargeAccess((D4EArtifact) master); writer.writeNext(new String[] { msg(CSV_TIMERANGE_HEADER, CSV_TIMERANGE_HEADER), msg(CSV_WATERLEVEL_HEADER, CSV_WATERLEVEL_HEADER), msg(CSV_DISCHARGE_HEADER, CSV_DISCHARGE_HEADER), - msg(CSV_DIFF_HEADER, CSV_DIFF_HEADER), + (hda.getEvaluationMode() == HistoricalDischargeAccess.EvaluationMode.W) + ? msg(CSV_DIFF_HEADER_W, CSV_DIFF_HEADER_W) + : msg(CSV_DIFF_HEADER_Q, CSV_DIFF_HEADER_Q), msg(CSV_GAUGENAME_HEADER, CSV_GAUGENAME_HEADER) }); }
--- a/artifacts/src/main/resources/messages.properties Wed Nov 13 08:10:00 2013 +0100 +++ b/artifacts/src/main/resources/messages.properties Wed Nov 13 11:32:47 2013 +0100 @@ -368,7 +368,8 @@ export.historical.discharge.csv.header.timerange = Timerange export.historical.discharge.csv.header.waterlevel = Waterlevel [cm] export.historical.discharge.csv.header.discharge = Discharge [m\u00b3/s] -export.historical.discharge.csv.header.diff = \u0394Q to reference[m\u00b3/s] +export.historical.discharge.csv.header.diff.q = \u0394Q to reference[m\u00b3/s] +export.historical.discharge.csv.header.diff.w = \u0394W to reference[m\u00b3/s] export.historical.discharge.csv.header.gaugename = Gauge export.reference_curve.csv.header.km = km export.reference_curve.csv.header.w.cm = W (cm at Gauge)
--- a/artifacts/src/main/resources/messages_de.properties Wed Nov 13 08:10:00 2013 +0100 +++ b/artifacts/src/main/resources/messages_de.properties Wed Nov 13 11:32:47 2013 +0100 @@ -367,7 +367,8 @@ export.historical.discharge.csv.header.timerange = Zeitraum export.historical.discharge.csv.header.waterlevel = Wasserstand [cm] export.historical.discharge.csv.header.discharge = Abfluss [m\u00b3/s] -export.historical.discharge.csv.header.diff = \u0394Q zur Bezugskurve[m\u00b3/s] +export.historical.discharge.csv.header.diff.q = \u0394Q zur Bezugskurve[m\u00b3/s] +export.historical.discharge.csv.header.diff.w = \u0394W zur Bezugskurve[m\u00b3/s] export.historical.discharge.csv.header.gaugename = Pegel export.reference_curve.csv.header.km = km export.reference_curve.csv.header.w.cm = W (cm am Pegel)
--- a/artifacts/src/main/resources/messages_de_DE.properties Wed Nov 13 08:10:00 2013 +0100 +++ b/artifacts/src/main/resources/messages_de_DE.properties Wed Nov 13 11:32:47 2013 +0100 @@ -365,7 +365,8 @@ export.historical.discharge.csv.header.timerange = Zeitraum export.historical.discharge.csv.header.waterlevel = Wasserstand [cm] export.historical.discharge.csv.header.discharge = Abfluss [m\u00b3/s] -export.historical.discharge.csv.header.diff = \u0394Q zur Bezugskurve[m\u00b3/s] +export.historical.discharge.csv.header.diff.q = \u0394Q zur Bezugskurve[m\u00b3/s] +export.historical.discharge.csv.header.diff.w = \u0394W zur Bezugskurve[m\u00b3/s] export.historical.discharge.csv.header.gaugename = Pegel export.reference_curve.csv.header.km = km export.reference_curve.csv.header.w.cm = W (cm am Pegel)
--- a/artifacts/src/main/resources/messages_en.properties Wed Nov 13 08:10:00 2013 +0100 +++ b/artifacts/src/main/resources/messages_en.properties Wed Nov 13 11:32:47 2013 +0100 @@ -371,7 +371,8 @@ export.historical.discharge.csv.header.timerange = Timerange export.historical.discharge.csv.header.waterlevel = Waterlevel [cm] export.historical.discharge.csv.header.discharge = Discharge [m\u00b3/s] -export.historical.discharge.csv.header.diff = \u0394Q to reference[m\u00b3/s] +export.historical.discharge.csv.header.diff.q = \u0394Q to reference[m\u00b3/s] +export.historical.discharge.csv.header.diff.w = \u0394W to reference[m\u00b3/s] export.historical.discharge.csv.header.gaugename = Gauge export.reference_curve.csv.header.km = km export.reference_curve.csv.header.w.cm = W (cm at Gauge)