Mercurial > dive4elements > gnv-client
changeset 244:9048bc4b17cd
Added ODV-Export to HorizontalProfiles on InstantaneousPoint
gnv-artifacts/trunk@313 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 10 Nov 2009 11:48:41 +0000 |
parents | b599de3db552 |
children | 9697a6b8d2c9 |
files | gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml gnv-artifacts/doc/conf/queries.properties gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_odv.xml |
diffstat | 5 files changed, 92 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Tue Nov 10 09:06:35 2009 +0000 +++ b/gnv-artifacts/ChangeLog Tue Nov 10 11:48:41 2009 +0000 @@ -1,7 +1,20 @@ 2009-11-10 Tim Englich <tim.englich@intevation.de> + * 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. + * src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_odv.xml: + Added Out-Request for ODV-Export to the JUnitTest Configuration for + HorizontalProfiles InstantaneousPoint. + * doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml: + Added QueryID for ODV-Exports to the Configuration of an + InstantaneousPoint-HorizontalProfile-Artifacts + * doc/conf/queries.properties: + Added Query for HorizontalProfile ODV-Exports in InstantaneousPoint + +2009-11-10 Tim Englich <tim.englich@intevation.de> * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (testVerticalProfileInstantaneousPointArtifact): - Added the ODV-Export to the Unit-Testcase for VerticalProfile-HorizontalProfile. + Added the ODV-Export to the Unit-Testcase for VerticalProfile-InstantaneousPoint. Some Refactoring Work done. * doc/conf/products/verticalprofile/conf_instantaneouspoint.xml: Added QueryID for ODV-Exports to the Configuration of an
--- a/gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml Tue Nov 10 09:06:35 2009 +0000 +++ b/gnv-artifacts/doc/conf/products/horizontalprofile/conf_instantaneouspoint.xml Tue Nov 10 11:48:41 2009 +0000 @@ -82,6 +82,7 @@ </transition> <transition id="horizontalprofile_instantaneouspoint_calculate_results" description="horizontalprofile_instantaneouspoint_calculate_results" transition="de.intevation.gnv.transition.profile.horizontal.HorizontalProfileOutputTransition"> <queryID>horizontalprofile_instantaneouspoint_chart_data</queryID> + <queryID-odv>horizontalprofile_instantaneouspoint_odv_data</queryID-odv> <inputvalues> <inputvalue name="cruiseid" type="Integer" multiselect="false" usedinquery="0" /> <inputvalue name="trackid" type="Integer" multiselect="false" usedinquery="0" />
--- a/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 09:06:35 2009 +0000 +++ b/gnv-artifacts/doc/conf/queries.properties Tue Nov 10 11:48:41 2009 +0000 @@ -668,6 +668,34 @@ ORDER BY MSV.PARAMETERID, \ M.ZLOCATION, \ MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE +horizontalprofile_instantaneouspoint_odv_data = SELECT V.NAME || ' ' || C.NAME CRUISE, \ + MEDIAN.InstantaneousPoint.FEATUREID STATION, \ + '*' TYPE, \ + 0 BOTDEPTH, \ + (M.ZLOCATION * -1) DEPTH , \ + ST_ASTEXT(SHAPE) , \ + MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE, \ + MSV.DATAVALUE, \ + MSV.PARAMETERID PARAMETER \ + FROM MEDIAN.INSTANTANEOUSPOINT, \ + MEDIAN.VEHICLE V, \ + MEDIAN.CRUISE C, \ + (SELECT TRACKID,CRUISEID FROM MEDIAN.TRACK) T, \ + MEDIAN.SURVEYINFO S, \ + MEDIAN.MEASUREMENT M, \ + MEDIAN.MEASUREDSCALARVALUE MSV \ + WHERE V.VEHICLEID = C.VEHICLEID AND \ + C.CRUISEID = T.CRUISEID AND \ + T.TRACKID = S.TRACKID AND \ + S.SURVEYID = MEDIAN.INSTANTANEOUSPOINT.SURVEYID AND \ + MEDIAN.INSTANTANEOUSPOINT.FEATUREID = M.FEATUREID AND \ + M.MEASUREMENTID = MSV.MEASUREMENTID AND \ + MEDIAN.INSTANTANEOUSPOINT.SURVEYID = ? AND \ + M.ZLOCATION IN (?) AND \ + MSV.PARAMETERID in (?) \ + ORDER BY MSV.PARAMETERID, \ + M.ZLOCATION, \ + MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE ############################################# #############################################
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 09:06:35 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Nov 10 11:48:41 2009 +0000 @@ -556,8 +556,8 @@ public void testHorizontalProfileInstantaneousPointArtifact() { try { - log - .debug("GNVArtifactsTestCase.testHorizontalProfileInstantaneousPointArtifact"); + log.debug("GNVArtifactsTestCase." + + "testHorizontalProfileInstantaneousPointArtifact"); String artefactName = "fis_delphin"; ArtifactFactory artifactFactory = this .getArtifactFactory(artefactName); @@ -570,55 +570,26 @@ CallContext cc = createCallContext(); Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_describe.xml"); - // Erster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_00_feed.xml", - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_00_advance.xml", describeDocument); - - // Erster Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_01_feed.xml", - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_01_advance.xml", describeDocument); - - // Zweiter Schritt - this - .doNextStep( + + int steps = 6; + + for (int i = 0; i < steps; i++){ + + this.doNextStep( artifact, cc, - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_02_feed.xml", - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_02_advance.xml", describeDocument); - // Dritter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_03_feed.xml", - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_03_advance.xml", describeDocument); - // Vierter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_04_feed.xml", - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_04_advance.xml", describeDocument); - // Fünfter Schritt - this - .doNextStep( - artifact, - cc, - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_feed.xml", - "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_advance.xml", describeDocument); + "src/test/ressources/horizontalProfile_instantaneouspoint/" + + "horizontalprofile_step_0"+i+"_feed.xml", + "src/test/ressources/horizontalProfile_instantaneouspoint/" + + "horizontalprofile_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/horizontalprofile_instantaneouspoint" @@ -629,20 +600,29 @@ fos3 = new FileOutputStream( "src/test/results/horizontalprofile_instantaneouspoint" + System.currentTimeMillis() + ".csv"); - artifact - .feed( - this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_feed.xml"), - cc); - artifact.out(this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_statistics.xml"), - fos2, - cc); - artifact.out( - this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_chart.xml"), - fos, - cc); - artifact.out(this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_csv.xml"), - fos3, - cc); + fos4 = new FileOutputStream( + "src/test/results/horizontalprofile_instantaneouspoint" + + System.currentTimeMillis() + ".odv"); + artifact.feed(this.readDocument("src/test/ressources/" + + "horizontalProfile_instantaneouspoint/" + + "horizontalprofile_step_06_feed.xml"), + cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_instantaneouspoint/" + + "horizontalprofile_step_06_out_statistics.xml"), + fos2,cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_instantaneouspoint/" + + "horizontalprofile_step_06_out_chart.xml"), + fos,cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_instantaneouspoint/" + + "horizontalprofile_step_06_out_csv.xml"), + fos3,cc); + artifact.out(this.readDocument("src/test/ressources/" + + "horizontalProfile_instantaneouspoint/" + + "horizontalprofile_step_06_out_odv.xml"), + fos4,cc); } catch (Exception e) { log.error(e, e); fail(); @@ -1041,4 +1021,4 @@ throw new Exception(message); } } -} +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_odv.xml Tue Nov 10 11:48:41 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="3637e455-944f-46ef-997d-8cd61d9ad2d3" /> + <art:hash value="27021384" /> + <art:out name="odv"> + <art:out value="text/plain" /> + <art:params /> + </art:out> +</art:action> \ No newline at end of file