# HG changeset patch # User Tim Englich # Date 1257862252 0 # Node ID 9697a6b8d2c98e3c0190b5b413e7bbd6ba881ee7 # Parent 9048bc4b17cda11332eb7eb24c11b3101f64c810 Added ODV-Export to HorizontalCrossSection on Meshes gnv-artifacts/trunk@314 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 9048bc4b17cd -r 9697a6b8d2c9 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Tue Nov 10 11:48:41 2009 +0000 +++ b/gnv-artifacts/ChangeLog Tue Nov 10 14:10:52 2009 +0000 @@ -1,5 +1,20 @@ 2009-11-10 Tim Englich + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testHorizontalCrossSectionMeshArtifact): + Added the ODV-Export to the Unit-Testcase for HorizontalCrossSection-Mesh. + Some Refactoring Work done. + * doc/conf/queries.properties: + Added Query for HorizontalCrossSection ODV-Exports in Meshes. + * doc/conf/products/horizontalcrosssection/conf_mesh.xml: + Added QueryID for ODV-Exports to the Configuration of an + Mesh-HorizontalCrossSection-Artifacts + * src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_feed.xml: + Changed Datevalue, because the old value was out of range to the Data. + * src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_out_odv.xml: + Added Out-Request for ODV-Export to the JUnitTest Configuration for + HorizontalCrossSection Mesh. + +2009-11-10 Tim Englich * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testHorizontalProfileInstantaneousPointArtifact): Added the ODV-Export to the Unit-Testcase for HorizontalProfile-InstantaneousPoint. Some Refactoring Work done. diff -r 9048bc4b17cd -r 9697a6b8d2c9 gnv-artifacts/doc/conf/products/horizontalcrosssection/conf_mesh.xml --- a/gnv-artifacts/doc/conf/products/horizontalcrosssection/conf_mesh.xml Tue Nov 10 11:48:41 2009 +0000 +++ b/gnv-artifacts/doc/conf/products/horizontalcrosssection/conf_mesh.xml Tue Nov 10 14:10:52 2009 +0000 @@ -100,6 +100,7 @@ horizontalcrosssection_mesh_data + horizontalcrosssection_mesh_odv_data diff -r 9048bc4b17cd -r 9697a6b8d2c9 gnv-artifacts/doc/conf/queries.properties --- a/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 11:48:41 2009 +0000 +++ b/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 14:10:52 2009 +0000 @@ -890,7 +890,69 @@ MEDIAN.MESHFACE.KPOSITION = ? \ order by MEDIAN.MESHFACE.JPOSITION , \ MEDIAN.MESHFACE.IPOSITION - +horizontalcrosssection_mesh_odv_data = SELECT 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, \ + MEDIAN.MESHPOINT.JPOSITION, \ + MEDIAN.MESHPOINT.IPOSITION, \ + MEDIAN.MESHPOINT.KPOSITION \ + from MEDIAN.MESHLAYER ML, \ + MEDIAN.MESHPOINT, \ + MEDIAN.MESH M, \ + MEDIAN.SOURCEINFO SI, \ + MEDIAN.MESHSCALARVALUE MSV \ + where MSV.FEATUREID = MEDIAN.MESHPOINT.FEATUREID AND \ + ML.KPOSITION = MEDIAN.MESHPOINT.KPOSITION and \ + ML.MESHID = MEDIAN.MESHPOINT.MESHID and \ + M.MESHID = MEDIAN.MESHPOINT.MESHID AND \ + M.PARTIDMIN <= MSV.PARTID AND \ + M.PARTIDMAX >= MSV.PARTID AND \ + M.SOURCEID = SI.SOURCEID AND \ + MSV.PARAMETERID = ? AND \ + MSV.TIMEVALUE = ? AND \ + M.OBJECTID = ? AND \ + MEDIAN.MESHPOINT.KPOSITION = ? \ + order by MEDIAN.MESHPOINT.JPOSITION , \ + MEDIAN.MESHPOINT.IPOSITION + + + + + +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 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.PARAMETERID = ? AND \ + MSV.TIMEVALUE = ? AND \ + M.OBJECTID = ? AND \ + MEDIAN.MESHPOINT.KPOSITION = ? \ + order by MEDIAN.MESHPOINT.FEATUREID, \ + msv.FEATUREID, \ + msv.PARAMETERID, \ + msv.TIMEVALUE area_filter = SELECT DISTINCT \ FEATUREID KEY ,\ diff -r 9048bc4b17cd -r 9697a6b8d2c9 gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java --- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 11:48:41 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 14:10:52 2009 +0000 @@ -751,48 +751,24 @@ CallContext cc = createCallContext(); Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml"); - // Erster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_feed.xml", - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_01_advance.xml", describeDocument); - - // Zweiter Schritt - this - .doNextStep( + int steps = 5; + + for (int i = 1; i <= steps; i++){ + this.doNextStep( artifact, cc, - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_feed.xml", - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_02_advance.xml", describeDocument); - // Dritter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_feed.xml", - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_03_advance.xml", describeDocument); - // Vierter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_feed.xml", - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_04_advance.xml", describeDocument); + "src/test/ressources/horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_0"+i+"_feed.xml", + "src/test/ressources/horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_0"+i+"_advance.xml", + describeDocument); + } - // Fünfter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_feed.xml", - "src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_05_advance.xml", describeDocument); - 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/horizontalcrosssection_mesh" @@ -803,22 +779,29 @@ fos3 = new FileOutputStream( "src/test/results/horizontalcrosssection_mesh" + System.currentTimeMillis() + ".csv"); - artifact - .feed(this.readDocument("src/test/ressources/horizontal" + - "crosssection_mesh/horizontalcrosssection_step_06_feed.xml"), + fos4 = new FileOutputStream( + "src/test/results/horizontalcrosssection_mesh" + + System.currentTimeMillis() + ".odv"); + artifact.feed(this.readDocument("src/test/ressources/" + + "horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_06_feed.xml"), cc); - artifact - .out(this.readDocument("src/test/ressources/horizontal" + - "crosssection_mesh/horizontalcrosssection_step_06_out_statistics.xml"), + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_06_out_statistics.xml"), fos2, cc); - artifact - .out(this.readDocument("src/test/ressources/horizontal" + - "crosssection_mesh/horizontalcrosssection_step_06_out_chart.xml"), + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_06_out_chart.xml"), fos, cc); - artifact.out(this.readDocument("src/test/ressources/horizontal" + - "crosssection_mesh/horizontalcrosssection_step_06_out_csv.xml"), - fos3, - cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_06_out_csv.xml"), + fos3,cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalcrosssection_mesh/" + + "horizontalcrosssection_step_06_out_odv.xml"), + fos4,cc); } catch (Exception e) { log.error(e, e); fail(); diff -r 9048bc4b17cd -r 9697a6b8d2c9 gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_feed.xml --- a/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_feed.xml Tue Nov 10 11:48:41 2009 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_feed.xml Tue Nov 10 14:10:52 2009 +0000 @@ -4,6 +4,6 @@ - + \ No newline at end of file diff -r 9048bc4b17cd -r 9697a6b8d2c9 gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_out_odv.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_step_06_out_odv.xml Tue Nov 10 14:10:52 2009 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file