Mercurial > dive4elements > river
changeset 456:af1b64ec7250
The curve of a computed discharge curve has a human readable text now.
flys-artifacts/trunk@1954 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 19 May 2011 12:33:12 +0000 |
parents | 7137ef65c17c |
children | 52532b300483 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties |
diffstat | 7 files changed, 50 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/ChangeLog Thu May 19 12:33:12 2011 +0000 @@ -1,3 +1,19 @@ +2011-05-19 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: + Set the name of the computed discharge curve objects. + + * src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java: + The curves of this chart will now have names that consist of the word + 'Discharge Curve', the river name and the kilometer that has been used + for the computation. + + * src/main/resources/messages.properties, + src/main/resources/messages_de_DE.properties, + src/main/resources/messages_en.properties, + src/main/resources/messages_de.properties: Added i18n strings for the + computed discharge curves. + 2011-05-19 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Thu May 19 12:33:12 2011 +0000 @@ -436,9 +436,24 @@ throw new NullPointerException("No Wst found for selected river."); } + WQKms wqkms = computeDischargeCurveData(wst, locations[0]); + // TODO Introduce a caching mechanism here! - return computeDischargeCurveData(wst, locations[0]); + setComputedDischargeCurveNames(wqkms, locations[0]); + + return wqkms; + } + + + /** + * Sets the name of the computed discharge curve data. + * + * @param wqkms The computed WQKms object. + * @param l The location used for the computation. + */ + public static void setComputedDischargeCurveNames(WQKms wqkms, double l) { + wqkms.setName(Double.toString(l)); }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java Thu May 19 12:33:12 2011 +0000 @@ -82,8 +82,7 @@ data[1][i] = res[0]; } - // TODO find the correct name - dataset.addSeries("Abflusskurve", data); + dataset.addSeries(getSeriesName(wqkms), data); } @@ -94,5 +93,18 @@ return winfoArtifact.getComputedDischargeCurveData(); } + + + protected String getSeriesName(WQKms wqkms) { + Object[] args = new Object[] { + getRiverName(), + wqkms.getName() + }; + + return msg( + "chart.computed.discharge.curve.curve.label", + "", + args); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/resources/messages.properties Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages.properties Thu May 19 12:33:12 2011 +0000 @@ -28,6 +28,7 @@ chart.computed.discharge.curve.title = Discharge Curve chart.computed.discharge.curve.subtitle = {0}-km: {1,number,#.###} chart.computed.discharge.curve.yaxis.label = W [NN + m] +chart.computed.discharge.curve.curve.label = Discharge Curve {0} km {1} chart.duration.curve.title = Duration Curve chart.duration.curve.subtitle = {0}-km: {1,number,#.###} chart.duration.curve.xaxis.label = Duration of Non-Exceedence [Days]
--- a/flys-artifacts/src/main/resources/messages_de.properties Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_de.properties Thu May 19 12:33:12 2011 +0000 @@ -28,6 +28,7 @@ chart.computed.discharge.curve.title = Abflusskurve chart.computed.discharge.curve.subtitle = {0}-km: {1,number,#.###} chart.computed.discharge.curve.yaxis.label = W [NN + m] +chart.computed.discharge.curve.curve.label = Abflusskurve {0} km {1} chart.duration.curve.title = Dauerlinie chart.duration.curve.subtitle = {0}-km: {1,number,#.###} chart.duration.curve.xaxis.label = Unterschreitungsdauer [Tage]
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_de_DE.properties Thu May 19 12:33:12 2011 +0000 @@ -28,6 +28,7 @@ chart.computed.discharge.curve.title = Abflusskurve chart.computed.discharge.curve.subtitle = {0}-km: {1,number,#.###} chart.computed.discharge.curve.yaxis.label = W [NN + m] +chart.computed.discharge.curve.curve.label = Abflusskurve {0} km {1} chart.duration.curve.title = Dauerlinie chart.duration.curve.subtitle = {0}-km: {1,number,#.###} chart.duration.curve.xaxis.label = Unterschreitungsdauer [Tage]
--- a/flys-artifacts/src/main/resources/messages_en.properties Thu May 19 09:54:57 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_en.properties Thu May 19 12:33:12 2011 +0000 @@ -28,6 +28,7 @@ chart.computed.discharge.curve.title = Discharge Curve chart.computed.discharge.curve.subtitle = {0}-km: {1,number,#.###} chart.computed.discharge.curve.yaxis.label = W [NN + m] +chart.computed.discharge.curve.curve.label = Discharge Curve {0} km {1} chart.duration.curve.title = Duration Curve chart.duration.curve.subtitle = {0}-km: {1,number,#.###} chart.duration.curve.xaxis.label = Duration of Non-Exceedence [Days]