changeset 243:b599de3db552

Added ODV-Export to VerticalProfiles in InstantaneousPoint gnv-artifacts/trunk@311 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 10 Nov 2009 09:06:35 +0000
parents 5925739d25ac
children 9048bc4b17cd
files gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml gnv-artifacts/doc/conf/queries.properties gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java gnv-artifacts/src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_odv.xml
diffstat 5 files changed, 84 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Nov 10 08:35:18 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Nov 10 09:06:35 2009 +0000
@@ -1,5 +1,18 @@
 2009-11-10  Tim Englich  <tim.englich@intevation.de>
 
+	* src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testVerticalProfileInstantaneousPointArtifact): 
+	  Added the ODV-Export to the Unit-Testcase for VerticalProfile-HorizontalProfile.
+	  Some Refactoring Work done.
+	* doc/conf/products/verticalprofile/conf_instantaneouspoint.xml: 
+	  Added QueryID for ODV-Exports to the Configuration of an 
+	  InstantaneousPoint-VerticalProfile-Artifacts
+	* doc/conf/queries.properties: 
+	  Added Query for VerticalProfile ODV-Exports in InstantaneousPoint
+	* src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_odv.xml:
+	  Added Out-Request for ODV-Export to the JUnitTest Configuration for VerticalProfiles InstantaneousPoint.
+
+2009-11-10  Tim Englich  <tim.englich@intevation.de>
+	
 	* src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testHorizontalProfileMeshPointArtifact): 
 	  Added the ODV-Export to the Unit-Testcase for HorizontalProfile-Mesh.
 	  Some Refactoring Work done.
--- a/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml	Tue Nov 10 08:35:18 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml	Tue Nov 10 09:06:35 2009 +0000
@@ -55,6 +55,7 @@
      </transition>
      <transition id="verticalprofile_instantaneouspoint_calculate_results" description="verticalprofile_mesh_calculate_results" transition="de.intevation.gnv.transition.profile.vertical.VerticalProfileOutputTransition">
          <queryID>verticalprofile_instantaneouspoint_chart_data</queryID>
+         <queryID-odv>verticalprofile_instantaneouspoint_odv_data</queryID-odv>
          <inputvalues>
              <inputvalue name="seriesid" type="Integer" multiselect="false" usedinquery="0" />
              <inputvalue name="instantaneouspoint_point" type="Integer" multiselect="false" usedinquery="1"/>
--- a/gnv-artifacts/doc/conf/queries.properties	Tue Nov 10 08:35:18 2009 +0000
+++ b/gnv-artifacts/doc/conf/queries.properties	Tue Nov 10 09:06:35 2009 +0000
@@ -547,7 +547,31 @@
     ORDER BY IP.TIMEVALUE, \
           MSV.PARAMETERID, \
           M.ZLOCATION
-
+          
+verticalprofile_instantaneouspoint_odv_data = SELECT S.DESCRIPTION CRUISE, \
+        MEDIAN.INSTANTANEOUSPOINT.FEATUREID STATION, \
+        '*' TYPE, \
+        ST_ASTEXT(SHAPE), \
+        0 BOTDEPTH, \
+        (M.ZLOCATION * -1) DEPTH, \
+        MSV.DATAVALUE, \
+        MSV.PARAMETERID PARAMETER, \
+        MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE \
+    FROM MEDIAN.SERIES S, \
+         MEDIAN.INSTANTANEOUSPOINT, \
+         MEDIAN.MEASUREMENT M, \
+         MEDIAN.MEASUREDSCALARVALUE MSV \
+    WHERE S.SERIESID = MEDIAN.INSTANTANEOUSPOINT.SERIESID AND \
+          MEDIAN.INSTANTANEOUSPOINT.FEATUREID = M.FEATUREID AND \
+          M.MEASUREMENTID = MSV.MEASUREMENTID AND \
+          MEDIAN.INSTANTANEOUSPOINT.FEATUREID = ? AND \
+          MSV.PARAMETERID in (?) AND \
+          M.ZLOCATION >= ? AND \
+          M.ZLOCATION <= ? \
+    ORDER BY MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE, \
+          MSV.PARAMETERID, \
+          M.ZLOCATION
+          
 #############################################
 #############################################
 #### Horizontalprofil InstantaneousPoint ####
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Tue Nov 10 08:35:18 2009 +0000
+++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Tue Nov 10 09:06:35 2009 +0000
@@ -480,42 +480,26 @@
 
             CallContext cc = createCallContext();
             Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_describe.xml");
-            // Erster Schritt
-            this
-                    .doNextStep(
-                            artifact,
-                            cc,
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_feed.xml",
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_advance.xml", describeDocument);
-
-            // Zweiter Schritt
-            this
-                    .doNextStep(
+            
+           int steps = 4;
+            
+            for (int i = 1; i <= steps; i++){
+                this.doNextStep(
                             artifact,
                             cc,
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_feed.xml",
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_advance.xml", describeDocument);
-
-            // Dritter Schritt
-            this
-                    .doNextStep(
-                            artifact,
-                            cc,
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_feed.xml",
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_advance.xml", describeDocument);
-            // Vierter Schritt
-            this
-                    .doNextStep(
-                            artifact,
-                            cc,
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_feed.xml",
-                            "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_advance.xml", describeDocument);
+                            "src/test/ressources/verticalprofile_instantaneouspoint/" +
+                            "verticalprofile_step_0"+i+"_feed.xml",
+                            "src/test/ressources/verticalprofile_instantaneouspoint/" +
+                            "verticalprofile_step_0"+i+"_advance.xml", 
+                            describeDocument);
+            }
 
             // Vierter Schritt
             Document outputData = artifact.describe(describeDocument,cc);
             FileOutputStream fos = null;
             FileOutputStream fos2 = null;
             FileOutputStream fos3 = null;
+            FileOutputStream fos4 = null;
             try {
                 fos = new FileOutputStream(
                         "src/test/results/verticalprofile_instantaneouspoint"
@@ -526,26 +510,29 @@
                 fos3 = new FileOutputStream(
                         "src/test/results/verticalprofile_instantaneouspoint"
                                 + System.currentTimeMillis() + ".csv");
-                artifact
-                        .feed(
-                                this
-                                        .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_feed.xml"),
-                                cc);
-                artifact
-                        .out(
-                                this
-                                        .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_statistics.xml"),
-                                fos2, cc);
-                artifact
-                        .out(
-                                this
-                                        .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_chart.xml"),
-                                fos, cc);
-                artifact
-                        .out(
-                                this
-                                        .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_csv.xml"),
-                                fos3, cc);
+                fos4 = new FileOutputStream(
+                        "src/test/results/verticalprofile_instantaneouspoint"
+                                + System.currentTimeMillis() + ".odv");
+                artifact.feed(this.readDocument("src/test/ressources/" +
+                                                "verticalprofile_instantaneouspoint/" +
+                                                "verticalprofile_step_05_feed.xml"),
+                              cc);
+                artifact.out(this.readDocument("src/test/ressources/" +
+                                               "verticalprofile_instantaneouspoint/" +
+                                               "verticalprofile_step_05_out_statistics.xml"),
+                             fos2, cc);
+                artifact.out(this.readDocument("src/test/ressources/" +
+                                               "verticalprofile_instantaneouspoint/" +
+                                               "verticalprofile_step_05_out_chart.xml"),
+                             fos, cc);
+                artifact.out(this.readDocument("src/test/ressources/" +
+                                               "verticalprofile_instantaneouspoint/" +
+                                               "verticalprofile_step_05_out_csv.xml"),
+                             fos3, cc);
+                artifact.out(this.readDocument("src/test/ressources/" +
+                                               "verticalprofile_instantaneouspoint/" +
+                                               "verticalprofile_step_05_out_odv.xml"),
+                             fos4, cc);
             } catch (Exception e) {
                 log.error(e, e);
                 fail();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_05_out_odv.xml	Tue Nov 10 09:06:35 2009 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<art:action xmlns:art="http://www.intevation.de/2009/artifacts">
+	<art:type name="out" />
+	<art:uuid value="793c935e-a3f3-44ce-a8f1-3d05459ca3d3" />
+	<art:hash value="9390720" />
+	<art:out name="odv">
+		<art:out value="text/plain" />
+		<art:params />
+	</art:out>
+</art:action>
\ No newline at end of file

http://dive4elements.wald.intevation.org