changeset 60:eed1baaeb481

TestCase implemented until Choosing the TimeInetval of an TimeSeries gnv-artifacts/trunk@42 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 08 Sep 2009 16:24:34 +0000
parents 2c5d8f5bced1
children 5f47881f7c97
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_01_advance.xml gnv-artifacts/src/test/ressources/timeseries/timeseries_step_01_feed.xml gnv-artifacts/src/test/ressources/timeseries/timeseries_step_02_advance.xml gnv-artifacts/src/test/ressources/timeseries/timeseries_step_02_feed.xml gnv-artifacts/src/test/ressources/timeseries/timeseries_step_03_advance.xml gnv-artifacts/src/test/ressources/timeseries/timeseries_step_03_feed.xml
diffstat 10 files changed, 104 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Tue Sep 08 16:21:46 2009 +0000
+++ b/gnv-artifacts/Changelog	Tue Sep 08 16:24:34 2009 +0000
@@ -1,3 +1,18 @@
+2009-09-08  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/ressources/timeseries/timeseries_step_01_advance.xml Edited, 
+      src/test/ressources/timeseries/timeseries_step_01_feed.xml Edited, 
+      src/test/ressources/timeseries/timeseries_step_02_advance.xml Added, 
+      src/test/ressources/timeseries/timeseries_step_02_feed.xml Added, 
+      src/test/ressources/timeseries/timeseries_step_03_advance.xml Added, 
+      src/test/ressources/timeseries/timeseries_step_03_feed.xml Added, 
+      src/test/ressources/GNVArtifactsTestCase_Configuration.xml: Edited,
+      src/test/ressources/queries.properties Added,  
+      src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Edited: 
+      TestCase implemented until Choosing the TimeInetval of an TimeSeries
+      
+      One Entry is Missing
+      
 2009-09-08  Tim Englich  <tim.englich@intevation.de>
 
     * src/main/java/de/intevation/gnv/transition/TransitionBase.java Edited, 
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Tue Sep 08 16:21:46 2009 +0000
+++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java	Tue Sep 08 16:24:34 2009 +0000
@@ -81,15 +81,26 @@
         assertNotNull(artifact);
         log.debug("TimeSeries-Artifact is available");
         
-
+        // Erster Schritt
         Document outputData = artifact.describe(bootstrap.getContext());
         this.writeDocument2Log(outputData);
-        
         artifact.feed(this.readDocument("src/test/ressources/timeseries/timeseries_step_01_feed.xml"), bootstrap.getContext());
         outputData = artifact.advance(this.readDocument("src/test/ressources/timeseries/timeseries_step_01_advance.xml"), bootstrap.getContext());
         this.writeDocument2Log(outputData);
+        
+        // Zweiter Schritt
         outputData = artifact.describe(bootstrap.getContext());
         this.writeDocument2Log(outputData);
+        artifact.feed(this.readDocument("src/test/ressources/timeseries/timeseries_step_02_feed.xml"), bootstrap.getContext());
+        outputData = artifact.advance(this.readDocument("src/test/ressources/timeseries/timeseries_step_02_advance.xml"), bootstrap.getContext());
+        this.writeDocument2Log(outputData);
+        
+        // Dritter Schritt
+        outputData = artifact.describe(bootstrap.getContext());
+        this.writeDocument2Log(outputData);
+        artifact.feed(this.readDocument("src/test/ressources/timeseries/timeseries_step_03_feed.xml"), bootstrap.getContext());
+        outputData = artifact.advance(this.readDocument("src/test/ressources/timeseries/timeseries_step_03_advance.xml"), bootstrap.getContext());
+        this.writeDocument2Log(outputData);
         
         
     }
--- a/gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml	Tue Sep 08 16:21:46 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/GNVArtifactsTestCase_Configuration.xml	Tue Sep 08 16:24:34 2009 +0000
@@ -12,25 +12,53 @@
         <artifact name="timeSeries">
             <transitions>
                 
-                <transition id="timeseries.step.1" description="timeSeries.start.description" transition="de.intevation.gnv.transition.DefaultTransition">
-                    <queryID>mesh</queryID>
+                <transition id="timeseries_timeseriespoint" description="timeseries_timeseriespoint" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_timeseriespoint</queryID>
                     <reachableTransitions>
-                        <transition>timeseries.step.2</transition>
+                        <transition>timeseries_parameter</transition>
                     </reachableTransitions>
                     <inputvalues>
-                        <inputvalue name="meshid" type="Integer"/>
+                        <inputvalue name="sourceid" type="Integer"/>
                     </inputvalues>
                 </transition>
                 
-                <transition id="timeseries.step.2" description="timeSeries.end.description" transition="de.intevation.gnv.transition.DefaultTransition">
-                    <queryID>mesh</queryID>
+                <transition id="timeseries_parameter" description="timeseries_parameter" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_parameter</queryID>
+                    <reachableTransitions>
+                        <transition>timeseries_depth_height</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                        <inputvalue name="featureid" type="Integer"/>
+                    </inputvalues>
                 </transition>
+                
+                 <transition id="timeseries_depth_height" description="timeseries_depth_height" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_depth_height</queryID>
+                    <reachableTransitions>
+                         <transition>timeseries_interval</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                        <inputvalue name="featureid" type="Integer"/>
+                        <inputvalue name="messurement_parameter" type="Integer"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="timeseries_interval" description="timeseries_interval" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>timeseries_interval</queryID>
+                    <reachableTransitions>
+                    </reachableTransitions>
+                    <inputvalues>
+                        <inputvalue name="featureid" type="Integer"/>
+                        <inputvalue name="depthid" type="Integer"/>
+                    </inputvalues>
+                </transition>
+                
             </transitions>
         </artifact>
     </artifacts>
     <geo-backend>
         <backend-configuration>../geo-backend/src/test/ressources/ArcSDEConnectionPoolTestCase.properties</backend-configuration>
-        <query-configuration>../geo-backend/src/test/ressources/QueryExecutorTestCase.properties</query-configuration>
+        <query-configuration>src/test/ressources/queries.properties</query-configuration>
     </geo-backend>
     <database>
         <user></user>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/queries.properties	Tue Sep 08 16:24:34 2009 +0000
@@ -0,0 +1,3 @@
+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
--- a/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_01_advance.xml	Tue Sep 08 16:21:46 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_01_advance.xml	Tue Sep 08 16:24:34 2009 +0000
@@ -4,5 +4,5 @@
      <art:type name="advance"/>
      <art:uuid value="dd87ce50-9bbe-11de-8a39-0800200c9a66"/>
      <art:hash value="8392d409b5518044465ac8e9b7daf5ef"/>
-     <art:target name="timeseries.step.2"/>
+     <art:target name="timeseries_parameter"/>
 </art:action>
--- a/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_01_feed.xml	Tue Sep 08 16:21:46 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_01_feed.xml	Tue Sep 08 16:24:34 2009 +0000
@@ -5,6 +5,6 @@
      <art:uuid value="dd87ce50-9bbe-11de-8a39-0800200c9a66"/>
      <art:hash value="8392d409b5518044465ac8e9b7daf5ef"/>
      <art:data>
-        <art:input name="meshid" value="2"/>
+        <art:input name="sourceid" value="4"/>
      </art:data>
 </art:action>
\ 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_02_advance.xml	Tue Sep 08 16:24:34 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_depth_height"/>
+</art:action>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_02_feed.xml	Tue Sep 08 16:24:34 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="featureid" value="100006"/>
+     </art:data>
+</art:action>
\ 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_03_advance.xml	Tue Sep 08 16:24:34 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_interval"/>
+</art:action>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/test/ressources/timeseries/timeseries_step_03_feed.xml	Tue Sep 08 16:24:34 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="messurement_parameter" value="54"/>
+     </art:data>
+</art:action>
\ No newline at end of file

http://dive4elements.wald.intevation.org