comparison gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 232:3d6d89bcbf42

Added special Data-Selection to the ODV-Exports of TimeSeries on TimeSeriesPoints. issue68 gnv-artifacts/trunk@300 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 09 Nov 2009 08:55:01 +0000
parents a610c0a01afc
children 76897b73db4e
comparison
equal deleted inserted replaced
231:74255064a4c5 232:3d6d89bcbf42
90 CallContext cc = createCallContext(); 90 CallContext cc = createCallContext();
91 91
92 // Erster Schritt 92 // Erster Schritt
93 93
94 Document describeDocument = this.readDocument("src/test/ressources/timeseries/timeseries_describe.xml"); 94 Document describeDocument = this.readDocument("src/test/ressources/timeseries/timeseries_describe.xml");
95 this 95
96 .doNextStep( 96 int steps = 5;
97 artifact, 97
98 cc, 98 for (int i = 1; i <= steps; i++){
99 "src/test/ressources/timeseries/timeseries_step_01_feed.xml", 99
100 "src/test/ressources/timeseries/timeseries_step_01_advance.xml", describeDocument); 100 this.doNextStep(
101 101 artifact,
102 // Zweiter Schritt 102 cc,
103 this 103 "src/test/ressources/timeseries/" +
104 .doNextStep( 104 "timeseries_step_0"+i+"_feed.xml",
105 artifact, 105 "src/test/ressources/timeseries/" +
106 cc, 106 "timeseries_step_0"+i+"_advance.xml",
107 "src/test/ressources/timeseries/timeseries_step_02_feed.xml", 107 describeDocument);
108 "src/test/ressources/timeseries/timeseries_step_02_advance.xml", describeDocument); 108
109 109 }
110 // Dritter Schritt 110
111 this 111 Document outputData = artifact.describe(describeDocument,cc);
112 .doNextStep(
113 artifact,
114 cc,
115 "src/test/ressources/timeseries/timeseries_step_03_feed.xml",
116 "src/test/ressources/timeseries/timeseries_step_03_advance.xml", describeDocument);
117
118 // Vierter Schritt
119 this
120 .doNextStep(
121 artifact,
122 cc,
123 "src/test/ressources/timeseries/timeseries_step_04_feed.xml",
124 "src/test/ressources/timeseries/timeseries_step_04_advance.xml", describeDocument);
125
126 // Fünfter Schritt
127 this
128 .doNextStep(
129 artifact,
130 cc,
131 "src/test/ressources/timeseries/timeseries_step_05_feed.xml",
132 "src/test/ressources/timeseries/timeseries_step_05_advance.xml", describeDocument);
133
134
135 Document outputData;
136 // Fünfter Schritt
137 outputData = artifact.describe(describeDocument,cc);
138 FileOutputStream fos = null; 112 FileOutputStream fos = null;
113 FileOutputStream fos2 = null;
114 FileOutputStream fos3 = null;
115 FileOutputStream fos4 = null;
139 try { 116 try {
140 fos = new FileOutputStream( 117 fos = new FileOutputStream("src/test/results/timeseries"
141 "src/test/results/timeseriesdiagramm" 118 + System.currentTimeMillis()
142 + System.currentTimeMillis() + ".png"); 119 + ".png");
143 artifact 120 fos2 = new FileOutputStream("src/test/results/timeseries"
144 .feed( 121 + System.currentTimeMillis()
145 this 122 + ".xml");
146 .readDocument("src/test/ressources/timeseries/timeseries_step_06_feed.xml"), 123 fos3 = new FileOutputStream("src/test/results/timeseries"
147 cc); 124 + System.currentTimeMillis()
148 artifact 125 + ".csv");
149 .out( 126 fos4 = new FileOutputStream("src/test/results/timeseries"
150 this 127 + System.currentTimeMillis()
151 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out.xml"), 128 + ".odv");
152 fos, cc); 129
130 artifact.feed(this
131 .readDocument("src/test/ressources/timeseries/timeseries_step_06_feed.xml"),
132 cc);
133 artifact.out(this
134 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_chart.xml"),
135 fos, cc);
136 artifact.out(this
137 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_statistics.xml"),
138 fos2, cc);
139 artifact.out(this
140 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_csv.xml"),
141 fos3, cc);
142 artifact.out(this
143 .readDocument("src/test/ressources/timeseries/timeseries_step_06_out_odv.xml"),
144 fos4, cc);
153 } catch (Exception e) { 145 } catch (Exception e) {
154 log.error(e, e); 146 log.error(e, e);
155 fail(); 147 fail();
156 } finally { 148 } finally {
157 try { 149 try {

http://dive4elements.wald.intevation.org