Mercurial > dive4elements > gnv-client
changeset 242:5925739d25ac
Added ODV-Export to HorizontalProfiles in Meshes
gnv-artifacts/trunk@310 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 10 Nov 2009 08:35:18 +0000 |
parents | 8500529d82af |
children | b599de3db552 |
files | gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/horizontalprofile/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/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml gnv-artifacts/src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_odv.xml |
diffstat | 6 files changed, 108 insertions(+), 88 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Mon Nov 09 15:24:41 2009 +0000 +++ b/gnv-artifacts/ChangeLog Tue Nov 10 08:35:18 2009 +0000 @@ -1,3 +1,18 @@ +2009-11-10 Tim Englich <tim.englich@intevation.de> + + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testHorizontalProfileMeshPointArtifact): + Added the ODV-Export to the Unit-Testcase for HorizontalProfile-Mesh. + Some Refactoring Work done. + * doc/conf/products/horizontalprofile/conf_mesh.xml: + Added QueryID for ODV-Exports to the Configuration of an + Mesh-HorizontalProfile-Artifacts + * doc/conf/queries.properties: + Added Query for HorizontalProfile ODV-Exports in Meshes + * src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_odv.xml: + Added Out-Request for ODV-Export to the JUnitTest Configuration for HorizontalProfiles Mesh. + * src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml: + BugFix: Changed missspelled Input-Name + 2009-11-09 Tim Englich <tim.englich@intevation.de> * src/main/java/de/intevation/gnv/transition/timeseries/TimeSeriesOutputTransition.java (TIMESERIES_ODV_PROFILE_NAMES): @@ -12,7 +27,7 @@ Mesh-VerticalProfile-Artifacts * src/test/ressources/verticalprofile_mesh/verticalprofile_step_10_out_odv.xml, src/test/ressources/verticalprofile/verticalprofile_step_06_out_odv.xml: - Added Out-request for ODV-Export to the JUnitTest Configuration for VerticalProfiles. + Added Out-Request for ODV-Export to the JUnitTest Configuration for VerticalProfiles. 2009-11-09 Tim Englich <tim.englich@intevation.de>
--- a/gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml Mon Nov 09 15:24:41 2009 +0000 +++ b/gnv-artifacts/doc/conf/products/horizontalprofile/conf_mesh.xml Tue Nov 10 08:35:18 2009 +0000 @@ -143,6 +143,7 @@ <transition id="horizontalprofile_mesh_calculate_results" description="horizontalprofile_mesh_calculate_results" transition="de.intevation.gnv.transition.profile.horizontal.HorizontalProfileOutputTransition"> <queryID>horizontalprofile_mesh_chart_data</queryID> + <queryID-odv>horizontalprofile_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 Mon Nov 09 15:24:41 2009 +0000 +++ b/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 08:35:18 2009 +0000 @@ -450,7 +450,7 @@ MEDIAN.MESHPOINT, \ MEDIAN.MESH m, \ MEDIAN.MESHSCALARVALUE msv, \ - MEDIAN.SOURCEINFO SI, \ + MEDIAN.SOURCEINFO SI \ where m.SOURCEID = SI.SOURCEID AND \ msv.FEATUREID = MEDIAN.MESHPOINT. FEATUREID AND \ ml.KPOSITION = MEDIAN.MESHPOINT.KPOSITION and \ @@ -700,6 +700,46 @@ msv.PARAMETERID, \ MEDIAN.MESHPOINT.JPOSITION , \ MEDIAN.MESHPOINT.IPOSITION + +horizontalprofile_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.DATAVALUE , \ + msv.PARAMETERID PARAMETERID, \ + msv.TIMEVALUE, \ + MEDIAN.MESHPOINT.JPOSITION , \ + MEDIAN.MESHPOINT.IPOSITION \ + from MEDIAN.MESHLAYER ml, \ + MEDIAN.MESHPOINT , \ + MEDIAN.MESH m, \ + MEDIAN.MESHSCALARVALUE msv, \ + MEDIAN.SOURCEINFO SI \ + 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.SOURCEID = SI.SOURCEID AND \ + m.PARTIDMIN <= msv.PARTID AND \ + m.PARTIDMAX >= msv.PARTID AND \ + msv.PARAMETERID in (?) AND \ + msv.TIMEVALUE in (?) 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 \ + KPOSITION in ( ? ) and \ + ? = (select ? from MEDIAN.MESHPOINT where FEATUREID = ?)) \ + order by msv.TIMEVALUE, \ + MEDIAN.MESHPOINT.KPOSITION, \ + msv.PARAMETERID, \ + MEDIAN.MESHPOINT.JPOSITION , \ + MEDIAN.MESHPOINT.IPOSITION #############################################
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Mon Nov 09 15:24:41 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 08:35:18 2009 +0000 @@ -679,8 +679,8 @@ public void testHorizontalProfileMeshPointArtifact() { try { - log - .debug("GNVArtifactsTestCase.testHorizontalProfileInstantaneousPointArtifact"); + log.debug("GNVArtifactsTestCase." + + "testHorizontalProfileInstantaneousPointArtifact"); String artefactName = "fis_modeldata"; ArtifactFactory artifactFactory = this .getArtifactFactory(artefactName); @@ -693,79 +693,26 @@ CallContext cc = createCallContext(); Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_describe.xml"); - // Erster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_01_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_01_advance.xml", describeDocument); - - // Zweiter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_advance.xml", describeDocument); - // Dritter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_03_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_03_advance.xml", describeDocument); - // Vierter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_04_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_04_advance.xml", describeDocument); - // Fünfter Schritt - this - .doNextStep( + + int steps = 9; + + for (int i = 1; i <= steps; i++){ + + this.doNextStep( artifact, cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_05_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_05_advance.xml", describeDocument); - - // Sechster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_06_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_06_advance.xml", describeDocument); - - // Siebter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_advance.xml", describeDocument); + "src/test/ressources/horizontalProfile_mesh/" + + "horizontalprofile_step_0"+i+"_feed.xml", + "src/test/ressources/horizontalProfile_mesh/" + + "horizontalprofile_step_0"+i+"_advance.xml", + describeDocument); + } - // Achter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_advance.xml", describeDocument); - - // Neunter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_09_feed.xml", - "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_09_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/horizontalProfile_mesh" @@ -776,24 +723,29 @@ fos3 = new FileOutputStream( "src/test/results/horizontalProfile_mesh" + System.currentTimeMillis() + ".csv"); - artifact - .feed( - this - .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_feed.xml"), - cc); - artifact - .out( - this - .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_statistics.xml"), - fos2, cc); - artifact - .out( - this - .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_chart.xml"), + fos4 = new FileOutputStream( + "src/test/results/horizontalProfile_mesh" + + System.currentTimeMillis() + ".odv"); + artifact.feed(this.readDocument("src/test/ressources/" + + "horizontalProfile_mesh/" + + "horizontalprofile_step_10_feed.xml"), + cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_mesh/" + + "horizontalprofile_step_10_out_statistics.xml"), + fos2, cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_mesh/" + + "horizontalprofile_step_10_out_chart.xml"), fos, cc); - artifact.out(this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_10_out_csv.xml"), - fos3, - cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_mesh/" + + "horizontalprofile_step_10_out_csv.xml"), + fos3, cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_mesh/" + + "horizontalprofile_step_10_out_odv.xml"), + fos4, cc); } catch (Exception e) { log.error(e, e); fail(); @@ -805,6 +757,8 @@ fos2.close(); fos3.flush(); fos3.close(); + fos4.flush(); + fos4.close(); } catch (Exception e) { log.error(e, e); }
--- a/gnv-artifacts/src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml Mon Nov 09 15:24:41 2009 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml Tue Nov 10 08:35:18 2009 +0000 @@ -4,6 +4,6 @@ <art:uuid value="1f6a63e2-c9d6-4ab1-830e-1effbc189d68" /> <art:hash value="29647319" /> <art:data> - <art:input name="aereaid" value="3" /> + <art:input name="areaid" value="3" /> </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/horizontalProfile_mesh/horizontalprofile_step_10_out_odv.xml Tue Nov 10 08:35:18 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="1f6a63e2-c9d6-4ab1-830e-1effbc189d68" /> + <art:hash value="29647319" /> + <art:out name="odv"> + <art:out value="text/plain" /> + <art:params /> + </art:out> +</art:action> \ No newline at end of file