Mercurial > dive4elements > river
changeset 401:34de11dcf355
Small bugfix in the adapted WQ state and further i18n strings.
flys-artifacts/trunk@1836 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 05 May 2011 12:34:53 +0000 (2011-05-05) |
parents | 7e5c2e93e449 |
children | eb22ffe4d74c |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.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 | 6 files changed, 57 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu May 05 12:31:28 2011 +0000 +++ b/flys-artifacts/ChangeLog Thu May 05 12:34:53 2011 +0000 @@ -1,3 +1,15 @@ +2011-05-05 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java: + Bugfix: just write the ranges of gauges into the DESCRIBE if the + 'wq_values' data item is required. + + * 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 messages used in + the DESCRIBE of the WQAdapted state. + 2011-05-05 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Thu May 05 12:31:28 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Thu May 05 12:34:53 2011 +0000 @@ -28,6 +28,11 @@ private static Logger logger = Logger.getLogger(WQAdapted.class); + public static final String FIELD_WQ_MODE = "wq_mode"; + + public static final String FIELD_WQ_VALUES = "wq_values"; + + /** * This method creates one element for each gauge of the selected river that * is intersected by the given kilometer range. Each element is a tuple of @@ -51,6 +56,42 @@ { logger.debug("WQAdapted.createItems"); + if (name != null && name.equals(FIELD_WQ_MODE)) { + return createModeItems(cr, artifact, name, context); + } + else if (name != null && name.equals(FIELD_WQ_VALUES)) { + return createValueItems(cr, artifact, name, context); + } + else { + logger.warn("Unknown data object: " + name); + return null; + } + } + + + protected Element[] createModeItems( + XMLUtils.ElementCreator cr, + Artifact artifact, + String name, + CallContext context) + { + logger.debug("WQAdapted.createModeItems"); + + Element w = createItem(cr, new String[] { "w", "W" }); + Element q = createItem(cr, new String[] { "q", "Q" }); + + return new Element[] { w, q }; + } + + + protected Element[] createValueItems( + XMLUtils.ElementCreator cr, + Artifact artifact, + String name, + CallContext context) + { + logger.debug("WQAdapted.createValueItems"); + FLYSArtifact flysArtifact = (FLYSArtifact) artifact; double[] dist = flysArtifact.getDistance();
--- a/flys-artifacts/src/main/resources/messages.properties Thu May 05 12:31:28 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages.properties Thu May 05 12:34:53 2011 +0000 @@ -2,6 +2,7 @@ state.winfo.calculation_mode = Calculation Mode state.winfo.location_distance = Location or distance selection state.winfo.wq = Input for W/Q data +state.winfo.wq_adapted = Input for W/Q data state.winfo.location = Choose the location calc.surface.curve = Water Level/Surface Curve
--- a/flys-artifacts/src/main/resources/messages_de.properties Thu May 05 12:31:28 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_de.properties Thu May 05 12:34:53 2011 +0000 @@ -2,6 +2,7 @@ state.winfo.calculation_mode = Berechnungsart state.winfo.location_distance = Wahl des Berechnungsortes/strecke state.winfo.wq = Eingabe f\u00fcr W/Q Daten +state.winfo.wq_adapted = Eingabe f\u00fcr W/Q Daten state.winfo.location = Wahl des Berechnungsortes calc.surface.curve = Wasserstand/Wasserspiegellage
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties Thu May 05 12:31:28 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_de_DE.properties Thu May 05 12:34:53 2011 +0000 @@ -2,6 +2,7 @@ state.winfo.calculation_mode = Berechnungsart state.winfo.location_distance = Wahl des Berechnungsortes/strecke state.winfo.wq = Eingabe f\u00fcr W/Q Daten +state.winfo.wq_adapted = Eingabe f\u00fcr W/Q Daten state.winfo.location = Wahl des Berechnungsortes calc.surface.curve = Wasserstand/Wasserspiegellage
--- a/flys-artifacts/src/main/resources/messages_en.properties Thu May 05 12:31:28 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_en.properties Thu May 05 12:34:53 2011 +0000 @@ -2,6 +2,7 @@ state.winfo.calculation_mode = Calculation Mode state.winfo.location_distance = Location or distance selection state.winfo.wq = Input for W/Q data +state.winfo.wq_adapted = Input for W/Q data state.winfo.location = Choose the location calc.surface.curve = Water Level/Surface Curve