Mercurial > dive4elements > gnv-client
changeset 240:76897b73db4e
Added ODV-Export-Support to TimeSeries Mesh
gnv-artifacts/trunk@308 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 09 Nov 2009 14:20:27 +0000 |
parents | 75da91eca29f |
children | 8500529d82af |
files | gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml gnv-artifacts/doc/conf/queries.properties gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java gnv-artifacts/src/test/ressources/timeseries_mesh/timeseries_step_08_out_odv.xml |
diffstat | 5 files changed, 79 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Mon Nov 09 14:11:09 2009 +0000 +++ b/gnv-artifacts/ChangeLog Mon Nov 09 14:20:27 2009 +0000 @@ -1,3 +1,17 @@ +2009-11-09 Tim Englich <tim.englich@intevation.de> + + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testTimeSeriesMeshArtifact): + Added the ODV-Export to the Unit-Testcase for TimeSeries-Mesh. + Some Refactoring Work done. + * src/test/ressources/timeseries_mesh/timeseries_step_08_out_odv.xml: + Added Out-request for ODV-Export to the JUnitTest Configuration + for TimeSeries Mesh. + * doc/conf/products/timeseries/conf_mesh.xml: + Added QueryID for ODV-Exports to the Configuration of an + Mesh-TimeSeries-Artifacts + * doc/conf/queries.properties: + Added Query for TimeSeries ODV-Exports in Meshes + 2009-11-09 Ingo Weinzierl <ingo.weinzierl@intevation.de> * src/main/java/de/intevation/gnv/exports/Export.java
--- a/gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml Mon Nov 09 14:11:09 2009 +0000 +++ b/gnv-artifacts/doc/conf/products/timeseries/conf_mesh.xml Mon Nov 09 14:20:27 2009 +0000 @@ -128,6 +128,7 @@ <transition id="timeseries_meshpoint_calculate_results" description="timeseries_interval" transition="de.intevation.gnv.transition.timeseries.TimeSeriesOutputTransition"> <queryID>timeseries_mesh_chart_data</queryID> + <queryID-odv>timeseries_mesh_odv_data</queryID-odv> <inputvalues> <inputvalue name="meshid" type="Integer" multiselect="false" usedinquery="1"/> <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/>
--- a/gnv-artifacts/doc/conf/queries.properties Mon Nov 09 14:11:09 2009 +0000 +++ b/gnv-artifacts/doc/conf/queries.properties Mon Nov 09 14:20:27 2009 +0000 @@ -187,6 +187,38 @@ msv.FEATUREID, \ msv.PARAMETERID, \ msv.TIMEVALUE + +timeseries_mesh_odv_data = select /*+ parallel(timevalue,10) */ \ + SI.NAME CRUISE, \ + m.MESHID || '-' || MEDIAN.MESHPOINT.IPOSITION || '-' || MEDIAN.MESHPOINT.JPOSITION STATION, \ + '*' TYPE, \ + ST_ASTEXT(SHAPE), \ + 0 BOTDEPTH, \ + (((ML.UPPERZLOCATION + ML.LOWERZLOCATION) / 2)*-1) DEPTH, \ + msv.TIMEVALUE, \ + msv.DATAVALUE , \ + msv.PARAMETERID PARAMETER \ + from MEDIAN.MESHSCALARVALUE msv , \ + MEDIAN.MESHPOINT, \ + MEDIAN.MESH m, \ + MEDIAN.SOURCEINFO SI, \ + MEDIAN.MESHLAYER ML \ + where (m.OBJECTID = ? AND \ + msv.PARTID >= m.PARTIDMIN AND \ + msv.PARTID <= m.PARTIDMAX ) AND \ + m.SOURCEID = SI.SOURCEID AND \ + ML.MESHID = MEDIAN.MESHPOINT.MESHID AND \ + ML.KPOSITION = MEDIAN.MESHPOINT.KPOSITION AND \ + msv.FEATUREID in ( ? ) AND \ + msv.PARAMETERID in (? ) AND \ + MEDIAN.MESHPOINT.FEATUREID in ( ? ) AND \ + msv.TIMEVALUE >= ? AND \ + msv.TIMEVALUE <= ? \ + order by MEDIAN.MESHPOINT.FEATUREID, \ + msv.FEATUREID, \ + msv.PARAMETERID, \ + msv.TIMEVALUE + ############################################# #############################################
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Mon Nov 09 14:11:09 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Mon Nov 09 14:20:27 2009 +0000 @@ -97,7 +97,7 @@ for (int i = 1; i <= steps; i++){ - this.doNextStep( + this.doNextStep( artifact, cc, "src/test/ressources/timeseries/" + @@ -105,7 +105,6 @@ "src/test/ressources/timeseries/" + "timeseries_step_0"+i+"_advance.xml", describeDocument); - } Document outputData = artifact.describe(describeDocument,cc); @@ -205,67 +204,25 @@ CallContext cc = createCallContext(); Document describeDocument = this.readDocument("src/test/ressources/timeseries_mesh/timeseries_describe.xml"); - // Erster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/timeseries_mesh/timeseries_step_01_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_01_advance.xml", describeDocument); - - // Zweiter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_02_advance.xml", describeDocument); - - // Dritter Schritt - this - .doNextStep( + + int steps = 7; + + for (int i = 1; i <= steps; i++){ + this.doNextStep( artifact, cc, - "src/test/ressources/timeseries_mesh/timeseries_step_03_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_03_advance.xml", describeDocument); - - // Vierter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/timeseries_mesh/timeseries_step_04_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_04_advance.xml", describeDocument); - - // Fünfter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/timeseries_mesh/timeseries_step_05_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_05_advance.xml", describeDocument); - - // Sechster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/timeseries_mesh/timeseries_step_06_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_06_advance.xml", describeDocument); - - // Siebter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/timeseries_mesh/timeseries_step_07_feed.xml", - "src/test/ressources/timeseries_mesh/timeseries_step_07_advance.xml", describeDocument); - + "src/test/ressources/timeseries_mesh/" + + "timeseries_step_0"+i+"_feed.xml", + "src/test/ressources/timeseries_mesh/" + + "timeseries_step_0"+i+"_advance.xml", + describeDocument); + } // Achter 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/timeseries_mesh" + System.currentTimeMillis() @@ -276,6 +233,9 @@ fos3 = new FileOutputStream("src/test/results/timeseries_mesh" + System.currentTimeMillis() + ".csv"); + fos4 = new FileOutputStream("src/test/results/timeseries_mesh" + + System.currentTimeMillis() + + ".odv"); artifact .feed( this @@ -296,6 +256,11 @@ this .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_out_csv.xml"), fos3, cc); + artifact + .out( + this + .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_08_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/timeseries_mesh/timeseries_step_08_out_odv.xml Mon Nov 09 14:20:27 2009 +0000 @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<art:action xmlns:art="http://www.intevation.de/2009/artifacts"> + <art:type name="out" /> + <art:uuid value="1e9f6583-9073-4409-aac1-432ad06d7ce1" /> + <art:hash value="29913235" /> + <art:out name="odv"> + <art:params> + <!-- out params copied from describe --> + </art:params> + </art:out> +</art:action> \ No newline at end of file