changeset 190:baaa1618fa27

Changed the displayed-Values as defined in issue47 gnv-artifacts/trunk@238 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 19 Oct 2009 09:18:40 +0000
parents af354567b421
children d436c8b27ae3
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java gnv-artifacts/src/main/resources/lang/artifactMessages.properties gnv-artifacts/src/main/resources/lang/artifactMessages_de.properties gnv-artifacts/src/main/resources/lang/artifactMessages_de_DE.properties gnv-artifacts/src/main/resources/lang/artifactMessages_en.properties gnv-artifacts/src/test/ressources/conf.xml
diffstat 8 files changed, 52 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Oct 19 09:18:40 2009 +0000
@@ -1,3 +1,16 @@
+2009-10-19  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/resources/lang/artifactMessages*.properties: 
+	  Changed the displayed-Values as defined in issue47
+	* src/test/ressources/conf.xml: 
+	  Changed the Key for the DataName of MIN-Max-Transitions to put a propper Name 
+	  into the UI-Describeoutput issue47
+	* src/main/java/de/intevation/gnv/transition/TransitionBase.java (describe): 
+	  Added the X-Forms-Group-Element to surround the MinMaxDescibeObject-output to Give the
+	  Group of Objects a propper Name issue47
+	* src/main/java/de/intevation/gnv/transition/MinMaxTransition.java (purifyResult): 
+	  Added the name of the Data to the MinMaxDescibeObject to put it into the UI-output
+
 2009-10-16  Tim Englich  <tim.englich@intevation.de>
 
 	* src/test/ressources/timeseries_mesh/timeseries_step_05_feed.xml: 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/MinMaxTransition.java	Mon Oct 19 09:18:40 2009 +0000
@@ -42,9 +42,8 @@
         }
         if (result != null && result.size() == 1) {
 
-            Object[] names = this.inputValueNames.toArray();
-            String minName = names[names.length - 2].toString();
-            String maxName = names[names.length - 1].toString();
+            String minName = this.dataName;
+            String maxName = this.dataName;
             Result value = result.iterator().next();
             DescribeData describeData = new DefaultMinMaxDescribeData(minName,
                     maxName, value.getObject("MIN"), value.getObject("MAX"));
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Mon Oct 19 09:18:40 2009 +0000
@@ -521,6 +521,18 @@
                         Date d = ((GregorianCalendar) max).getTime();
                         max = DateUtils.getPatternedDateAmer(d);
                     }
+                    
+                    Element groupNode = xmlutilities.createXFormElement(
+                            document, "group");
+                    groupNode.setAttribute("ref", descibeData.getMinName());
+                    Element groupNodeLableNode = xmlutilities
+                            .createXFormElement(document, "label");
+                    groupNodeLableNode.setTextContent(RessourceFactory
+                            .getInstance().getRessource(
+                                    callMeta.getLanguages(),
+                                    descibeData.getMinName(),
+                                    descibeData.getMinName()));
+                    groupNode.appendChild(groupNodeLableNode);
 
                     Element inputMinNode = xmlutilities.createXFormElement(
                             document, "input");
@@ -554,12 +566,13 @@
                     inputMaxValueNode.setTextContent(max.toString());
                     inputMaxNode.appendChild(inputMaxValueNode);
 
+                    groupNode.appendChild(inputMinNode);
+                    groupNode.appendChild(inputMaxNode);
+                    
                     if (!it.hasNext()) {
-                        dynamic.appendChild(inputMinNode);
-                        dynamic.appendChild(inputMaxNode);
+                        dynamic.appendChild(groupNode);
                     } else {
-                        staticNode.appendChild(inputMinNode);
-                        staticNode.appendChild(inputMaxNode);
+                        staticNode.appendChild(groupNode);
                     }
                 } else if (o instanceof SingleValueDescribeData) {
 
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages.properties	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages.properties	Mon Oct 19 09:18:40 2009 +0000
@@ -16,13 +16,14 @@
 timeSeries= Timeseries
 verticalProfile = Verticalprofile
 horizontalProfile = Horizontalprofile
-featureid = Object
+featureid = Station
 mesh_coordinate = Geographic position (e.g. 56n30 6e20)
 mesh_point = Mesh Point
-measurementid = Measurement depth
+measurementid = Measurement depth/height [m]
 parameterid = Parameter
-minvalue = Minvalue
-maxvalue = Maxvalue
+timeinterval = Time period
+minvalue = from
+maxvalue = to
 dateid = Measurement date
 vehicleid = Ship
 cruiseid = Cruise
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages_de.properties	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages_de.properties	Mon Oct 19 09:18:40 2009 +0000
@@ -19,10 +19,11 @@
 meshid= Netz
 mesh_coordinate = Position (z.B. 56n30 6e20)
 mesh_point = Messpunkt
-measurementid = Messtiefe
+measurementid = Messung Tiefe/Höhe [m]
 parameterid = Parameter
-minvalue = Minimalwert
-maxvalue = Maximalwert
+timeinterval = Zeitfenster
+minvalue = von
+maxvalue = bis
 dateid = Messdatum
 vehicleid = Schiff
 cruiseid = Reise
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages_de_DE.properties	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages_de_DE.properties	Mon Oct 19 09:18:40 2009 +0000
@@ -19,10 +19,11 @@
 meshid= Netz
 mesh_coordinate = Position (z.B. 56n30 6e20)
 mesh_point = Messpunkt
-measurementid = Messtiefe
+measurementid = Messung Tiefe/Höhe [m]
 parameterid = Parameter
-minvalue = Minimalwert
-maxvalue = Maximalwert
+timeinterval = Zeitfenster
+minvalue = von
+maxvalue = bis
 dateid = Messdatum
 vehicleid = Schiff
 cruiseid = Reise
--- a/gnv-artifacts/src/main/resources/lang/artifactMessages_en.properties	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/main/resources/lang/artifactMessages_en.properties	Mon Oct 19 09:18:40 2009 +0000
@@ -16,13 +16,14 @@
 timeSeries= Timeseries
 verticalProfile = Verticalprofile
 horizontalProfile = Horizontalprofile
-featureid = Object
+featureid = Station
 mesh_coordinate = Geographic position (e.g. 56n30 6e20)
 mesh_point = Mesh Point
-measurementid = Measurement depth
+measurementid = Measurement depth/height [m]
 parameterid = Parameter
-minvalue = Minvalue
-maxvalue = Maxvalue
+timeinterval = Time period
+minvalue = from
+maxvalue = to
 dateid = Measurement date
 vehicleid = Ship
 cruiseid = Cruise
--- a/gnv-artifacts/src/test/ressources/conf.xml	Fri Oct 16 15:26:22 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/conf.xml	Mon Oct 19 09:18:40 2009 +0000
@@ -311,7 +311,7 @@
                 
                 <transition id="timeseries_meshpoint_interval" description="timeseries_interval" transition="de.intevation.gnv.transition.MinMaxTransition">
                     <queryID>timeseries_mesh_interval</queryID>
-                    <dataname>minvalue</dataname>
+                    <dataname>timeinterval</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                         <transition>timeseries_meshpoint_calculate_results</transition>
@@ -402,7 +402,7 @@
                 
                 <transition id="timeseries_interval" description="timeseries_interval" transition="de.intevation.gnv.transition.MinMaxTransition">
                     <queryID>timeseries_interval</queryID>
-                    <dataname>minvalue</dataname>
+                    <dataname>timeinterval</dataname>
                     <data-multiselect>false</data-multiselect>
                     <reachableTransitions>
                         <transition>timeseries_calculate_results</transition>

http://dive4elements.wald.intevation.org