Mercurial > dive4elements > gnv-client
changeset 246:b7f69809239c
Added ODV-Export to VerticalCrossSection on Meshes
gnv-artifacts/trunk@315 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 10 Nov 2009 14:37:42 +0000 |
parents | 9697a6b8d2c9 |
children | af474a541f74 |
files | gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/verticalcrosssection/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/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml gnv-artifacts/src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_odv.xml |
diffstat | 6 files changed, 108 insertions(+), 103 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Tue Nov 10 14:10:52 2009 +0000 +++ b/gnv-artifacts/ChangeLog Tue Nov 10 14:37:42 2009 +0000 @@ -1,5 +1,21 @@ 2009-11-10 Tim Englich <tim.englich@intevation.de> + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testVerticalCrossSectionMeshArtifact): + Added the ODV-Export to the Unit-Testcase for VerticalCrossSection-Mesh. + Some Refactoring Work done. + * doc/conf/products/verticalcrosssection/conf_mesh.xml: + Added QueryID for ODV-Exports to the Configuration of an + Mesh-VerticalCrossSection-Artifacts + * doc/conf/queries.properties: + Added Query for VerticalCrossSection ODV-Exports in Meshes. + * src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml: + Changed Datevalue, because the old value was out of range to the Data. + * src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_odv.xml: + Added Out-Request for ODV-Export to the JUnitTest Configuration for + VerticalCrossSection Mesh. + +2009-11-10 Tim Englich <tim.englich@intevation.de> + * 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.
--- a/gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml Tue Nov 10 14:10:52 2009 +0000 +++ b/gnv-artifacts/doc/conf/products/verticalcrosssection/conf_mesh.xml Tue Nov 10 14:37:42 2009 +0000 @@ -126,6 +126,7 @@ <transition id="verticalcrosssection_mesh_calculate_results" description="verticalcrosssection_mesh_calculate_results" transition="de.intevation.gnv.transition.profile.verticalcrosssection.VerticalCrossSectionOutputTransition"> <queryID>verticalcrosssection_mesh_chart_data</queryID> + <queryID-odv>verticalcrosssection_mesh_odv_data</queryID-odv> <inputvalues> <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/> <inputvalue name="dateid" type="Date" multiselect="true" usedinquery="1"/>
--- a/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 14:10:52 2009 +0000 +++ b/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 14:37:42 2009 +0000 @@ -842,6 +842,46 @@ MEDIAN.MESHPOINT.IPOSITION, \ MEDIAN.MESHPOINT.KPOSITION +verticalcrosssection_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.FEATUREID in \ + ( select FEATUREID \ + from MEDIAN.MESHPOINT mp, \ + MEDIAN.MESH m \ + where m.OBJECTID = ? AND \ + mp.MESHID = m.MESHID AND \ + ? = (select ? from MEDIAN.MESHPOINT where FEATUREID = ?)) \ + order by msv.TIMEVALUE, \ + msv.PARAMETERID, \ + MEDIAN.MESHPOINT.JPOSITION , \ + MEDIAN.MESHPOINT.IPOSITION, \ + MEDIAN.MESHPOINT.KPOSITION + ############################################# ############################################# ########## Horizontalschnitt MESH ########### @@ -920,39 +960,6 @@ 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 ,\
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 14:10:52 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 14:37:42 2009 +0000 @@ -825,7 +825,8 @@ public void testVerticalCrossSectionMeshArtifact() { try { - log.debug("GNVArtifactsTestCase.testHVerticalCrossSectionMeshArtifact"); + log.debug("GNVArtifactsTestCase." + + "testHVerticalCrossSectionMeshArtifact"); String artefactName = "fis_modeldata"; ArtifactFactory artifactFactory = this .getArtifactFactory(artefactName); @@ -838,62 +839,26 @@ CallContext cc = createCallContext(); Document describeDocument = this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_describe.xml"); - // Erster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_01_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_01_advance.xml", describeDocument); - - // Zweiter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_02_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_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/verticalcrosssection_mesh/verticalcrosssection_step_03_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_03_advance.xml", describeDocument); - // Vierter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_04_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_04_advance.xml", describeDocument); - // Fünfter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_05_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_05_advance.xml", describeDocument); - - // Sechster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_advance.xml", describeDocument); - // Siebter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_feed.xml", - "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_advance.xml", describeDocument); - + "src/test/ressources/verticalcrosssection_mesh/" + + "verticalcrosssection_step_0"+i+"_feed.xml", + "src/test/ressources/verticalcrosssection_mesh/" + + "verticalcrosssection_step_0"+i+"_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/verticalcrosssection_mesh" @@ -904,24 +869,30 @@ fos3 = new FileOutputStream( "src/test/results/verticalcrosssection_mesh" + System.currentTimeMillis() + ".csv"); - artifact - .feed( - this - .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml"), - cc); - artifact - .out( - this - .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_statistics.xml"), - fos2, cc); - artifact - .out( - this - .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_chart.xml"), - fos, cc); - artifact.out(this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_out_csv.xml"), - fos3, - cc); + fos4 = new FileOutputStream( + "src/test/results/verticalcrosssection_mesh" + + System.currentTimeMillis() + ".odv"); + artifact.feed(this.readDocument("src/test/ressources/" + + "verticalcrosssection_mesh/" + + "verticalcrosssection_step_08_feed.xml"), + cc); + artifact.out(this.readDocument("src/test/ressources/" + + "verticalcrosssection_mesh/" + + "verticalcrosssection_step_08_out_statistics.xml"), + fos2, cc); + artifact.out(this.readDocument("src/test/ressources/" + + "verticalcrosssection_mesh/" + + "verticalcrosssection_step_08_out_chart.xml"), + fos, cc); + artifact.out(this.readDocument("src/test/ressources/" + + "verticalcrosssection_mesh/" + + "verticalcrosssection_step_08_out_csv.xml"), + fos3,cc); + artifact.out(this.readDocument("src/test/ressources/" + + "verticalcrosssection_mesh/" + + "verticalcrosssection_step_08_out_odv.xml"), + fos4,cc); + } catch (Exception e) { log.error(e, e); fail();
--- a/gnv-artifacts/src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml Tue Nov 10 14:10:52 2009 +0000 +++ b/gnv-artifacts/src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_08_feed.xml Tue Nov 10 14:37:42 2009 +0000 @@ -4,6 +4,6 @@ <art:uuid value="07807bb4-572b-4a46-a71d-7c1c8c9ab50c" /> <art:hash value="2969645" /> <art:data> - <art:input name="dateid" value="2009.10.13 01:00:00" /> + <art:input name="dateid" value="2009.11.09 00:00:00" /> </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/verticalcrosssection_mesh/verticalcrosssection_step_08_out_odv.xml Tue Nov 10 14:37:42 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="07807bb4-572b-4a46-a71d-7c1c8c9ab50c" /> + <art:hash value="2969645" /> + <art:out name="odv"> + <art:out value="text/plain" /> + <art:params /> + </art:out> +</art:action> \ No newline at end of file