changeset 62:9f57053d0384

Testcases Modified gnv-artifacts/trunk@45 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Wed, 09 Sep 2009 09:33:50 +0000
parents 5f47881f7c97
children 6ae2d4134da3
files gnv-artifacts/Changelog gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml gnv-artifacts/src/test/ressources/queries.properties gnv-artifacts/src/test/ressources/timeseries/timeseries_step_04_advance.xml gnv-artifacts/src/test/ressources/timeseries/timeseries_step_04_feed.xml
diffstat 6 files changed, 59 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Wed Sep 09 09:29:39 2009 +0000
+++ b/gnv-artifacts/Changelog	Wed Sep 09 09:33:50 2009 +0000
@@ -1,3 +1,15 @@
+2009-09-09  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/ressources/timeseries/timeseries_step_04_feed.xml Added,  
+    * src/test/ressources/timeseries/timeseries_step_04_advance.xml Added:
+      Two more ArtifactCommands for the next Step in TimeSeriesArtifactTestCase 
+    * src/test/ressources/queries.properties Edited:
+      New Queries for timeseries_timeinterval added.
+      Also use KEY ,VALUE, MIN and MAX as Identifiers for the different Columns. 
+    * src/test/ressources/GNVArtifactsTestCase_Configuration.xml Edited, 
+    * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Edited:
+       Modified the TimeseriesArtifact and added one further TransitionStep 
+
 2009-09-09  Tim Englich  <tim.englich@intevation.de>
 
     * src/main/java/de/intevation/gnv/transition/describedata/DefaultMinMaxDescribeData.java , 
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Wed Sep 09 09:29:39 2009 +0000
+++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Wed Sep 09 09:33:50 2009 +0000
@@ -103,6 +103,17 @@
         this.writeDocument2Log(outputData);
         
         
+        // Vierter Schritt
+        outputData = artifact.describe(bootstrap.getContext());
+        this.writeDocument2Log(outputData);
+        artifact.feed(this.readDocument("src/test/ressources/timeseries/timeseries_step_04_feed.xml"), bootstrap.getContext());
+        outputData = artifact.advance(this.readDocument("src/test/ressources/timeseries/timeseries_step_04_advance.xml"), bootstrap.getContext());
+        this.writeDocument2Log(outputData);
+        
+        // Fünfter Schritt
+        outputData = artifact.describe(bootstrap.getContext());
+        this.writeDocument2Log(outputData);
+        
     }
     private Document getDocument(){
         return this.createOutputDocument();
--- a/gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml	Wed Sep 09 09:29:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml	Wed Sep 09 09:33:50 2009 +0000
@@ -43,13 +43,24 @@
                     </inputvalues>
                 </transition>
                 
-                <transition id="timeseries_interval" description="timeseries_interval" transition="de.intevation.gnv.transition.DefaultTransition">
+                <transition id="timeseries_interval" description="timeseries_interval" transition="de.intevation.gnv.transition.MinMaxTransition">
                     <queryID>timeseries_interval</queryID>
                     <reachableTransitions>
+                        <transition>timeseries_calculate_results</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                        <inputvalue name="messurement_parameter" type="Integer"/>
+                        <inputvalue name="depthid" type="Integer"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_calculate_results" description="timeseries_interval" transition="de.intevation.gnv.transition.MinMaxTransition">
+                    <queryID>timeseries_calculate_resulst</queryID>
+                    <reachableTransitions>
                     </reachableTransitions>
                     <inputvalues>
-                        <inputvalue name="featureid" type="Integer"/>
-                        <inputvalue name="depthid" type="Integer"/>
+                        <inputvalue name="minvalue" type="Integer"/>
+                        <inputvalue name="maxvalue" type="Integer"/>
                     </inputvalues>
                 </transition>
                 
--- a/gnv-artifacts/src/test/ressources/queries.properties	Wed Sep 09 09:29:39 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/queries.properties	Wed Sep 09 09:33:50 2009 +0000
@@ -1,3 +1,4 @@
-timeseries_timeseriespoint=SELECT DISTINCT tsp.FEATUREID, tsp.NAME FROM MEDIAN.TIMESERIESPOINT tsp, MEDIAN.MEASUREMENT mmt WHERE tsp.FEATUREID =  mmt.FEATUREID AND mmt.SOURCEID = ? order by tsp.name
-timeseries_parameter=SELECT DISTINCT p.PARAMETERID, p.GERMANNAME from MEDIAN.PARAMETER p where p.PARAMETERID in (select distinct ts.PARAMETERID from MEDIAN.TIMESERIES ts where ts.TIMESERIESID in (select distinct tsv.TIMESERIESID from MEDIAN.TIMESERIESVALUE tsv where tsv.MEASUREMENTID in (select m.MEASUREMENTID from MEDIAN.MEASUREMENT m, MEDIAN.TIMESERIESPOINT tsp where m.FEATUREID = tsp.FEATUREID and tsp.FEATUREID IN ( ? )))) ORDER BY p.GERMANNAME
-timeseries_depth_height=SELECT DISTINCT m.MEASUREMENTID, m.ZLOCATION from MEDIAN.MEASUREMENT m where m.MEASUREMENTID in (SELECT DISTINCT  t_v.MEASUREMENTID from MEDIAN.TIMESERIESVALUE t_v where t_v.TIMESERIESID in (SELECT DISTINCT  t.TIMESERIESID from MEDIAN.TIMESERIES t where t.PARAMETERID in (SELECT DISTINCT  p.PARAMETERID from MEDIAN.PARAMETER p where m.FEATUREID IN ( ? ) and p.PARAMETERID IN (?))))ORDER BY m.ZLOCATION DESC
+timeseries_timeseriespoint=SELECT DISTINCT tsp.FEATUREID KEY, tsp.NAME VALUE FROM MEDIAN.TIMESERIESPOINT tsp, MEDIAN.MEASUREMENT mmt WHERE tsp.FEATUREID =  mmt.FEATUREID AND mmt.SOURCEID = ? order by tsp.name
+timeseries_parameter=SELECT DISTINCT p.PARAMETERID KEY, p.GERMANNAME VALUE from MEDIAN.PARAMETER p where p.PARAMETERID in (select distinct ts.PARAMETERID from MEDIAN.TIMESERIES ts where ts.TIMESERIESID in (select distinct tsv.TIMESERIESID from MEDIAN.TIMESERIESVALUE tsv where tsv.MEASUREMENTID in (select m.MEASUREMENTID from MEDIAN.MEASUREMENT m, MEDIAN.TIMESERIESPOINT tsp where m.FEATUREID = tsp.FEATUREID and tsp.FEATUREID IN ( ? )))) ORDER BY p.GERMANNAME
+timeseries_depth_height=SELECT DISTINCT m.MEASUREMENTID KEY, m.ZLOCATION VALUE from MEDIAN.MEASUREMENT m where m.MEASUREMENTID in (SELECT DISTINCT  t_v.MEASUREMENTID from MEDIAN.TIMESERIESVALUE t_v where t_v.TIMESERIESID in (SELECT DISTINCT  t.TIMESERIESID from MEDIAN.TIMESERIES t where t.PARAMETERID in (SELECT DISTINCT  p.PARAMETERID from MEDIAN.PARAMETER p where m.FEATUREID IN ( ? ) and p.PARAMETERID IN (?))))ORDER BY m.ZLOCATION DESC
+timeseries_interval=select min(tv.TIMEVALUE) MIN, max(tv.TIMEVALUE) MAX from MEDIAN.TIMESERIES t , MEDIAN.TIMESERIESVALUE tv where tv.TIMESERIESID = t.TIMESERIESID AND t.PARAMETERID IN ( ? ) AND tv.MEASUREMENTID IN ( ? )
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_04_advance.xml	Wed Sep 09 09:33:50 2009 +0000
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<art:action
+     xmlns:art="http://www.intevation.de/2009/artifacts">
+     <art:type name="advance"/>
+     <art:uuid value="dd87ce50-9bbe-11de-8a39-0800200c9a66"/>
+     <art:hash value="8392d409b5518044465ac8e9b7daf5ef"/>
+     <art:target name="timeseries_calculate_results"/>
+</art:action>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_04_feed.xml	Wed Sep 09 09:33:50 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="feed"/>
+     <art:uuid value="dd87ce50-9bbe-11de-8a39-0800200c9a66"/>
+     <art:hash value="8392d409b5518044465ac8e9b7daf5ef"/>
+     <art:data>
+        <art:input name="depthid" value="500042"/>
+     </art:data>
+</art:action>
\ No newline at end of file

http://dive4elements.wald.intevation.org