Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java @ 210:7d1f9219d163
The Timeperiod of the Modeldata has changed. so it was nessessarry to change
the Unittest to get propper Results
gnv-artifacts/trunk@266 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 23 Oct 2009 14:29:50 +0000 |
parents | 2f6a96610cb9 |
children | 310874d3573f |
rev | line source |
---|---|
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.artifacts; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
6 import java.io.ByteArrayInputStream; |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
7 import java.io.File; |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
8 import java.io.FileNotFoundException; |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
9 import java.io.FileOutputStream; |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
10 import java.io.IOException; |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
11 |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
12 import javax.xml.parsers.DocumentBuilder; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 import javax.xml.parsers.DocumentBuilderFactory; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 import javax.xml.parsers.ParserConfigurationException; |
72
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
15 |
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
16 import junit.framework.TestCase; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 import org.apache.log4j.BasicConfigurator; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 import org.apache.log4j.Logger; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 import org.w3c.dom.Document; |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
21 import org.xml.sax.SAXException; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 import de.intevation.artifactdatabase.Config; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
24 import de.intevation.artifactdatabase.DefaultCallMeta; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
25 import de.intevation.artifactdatabase.DefaultPreferredLocale; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 import de.intevation.artifactdatabase.FactoryBootstrap; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 import de.intevation.artifacts.Artifact; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 import de.intevation.artifacts.ArtifactFactory; |
102
994a39b084d6
Imporved JUnitTest and Bugfixing as a Result of this Improvement.
Tim Englich <tim.englich@intevation.de>
parents:
73
diff
changeset
|
29 import de.intevation.artifacts.CallContext; |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
30 import de.intevation.artifacts.CallMeta; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
31 import de.intevation.artifacts.PreferredLocale; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 import de.intevation.gnv.artifacts.context.GNVArtifactContext; |
72
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
33 import de.intevation.gnv.utils.ArtifactXMLUtilities; |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 * @author Tim Englich <tim.englich@intevation.de> |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
37 * |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 public class GNVArtifactsTestCase extends TestCase { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 * the logger, used to log exceptions and additonaly information |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 private static Logger log = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
45 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 static { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 BasicConfigurator.configure(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 log = Logger.getLogger(GNVArtifactContext.class); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
50 |
200
2f6a96610cb9
Changed Configuration Folder to doc/conf
Tim Englich <tim.englich@intevation.de>
parents:
197
diff
changeset
|
51 private String configurationDir = "doc/conf"; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
52 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 private FactoryBootstrap bootstrap = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
54 |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 * Constructor |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
57 * |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 * @param name |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 public GNVArtifactsTestCase(String name) { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
61 super(name); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 * @see junit.framework.TestCase#setUp() |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 */ |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
67 protected void setUp() throws Exception { |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
68 log.debug("GNVArtifactsTestCase.setUp"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
69 super.setUp(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
70 log.info(Config.CONFIG_DIR + " ==> " + configurationDir); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
71 System.setProperty(Config.CONFIG_DIR, configurationDir); |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
72 log.info("Bootstrap wird initialisiert."); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
73 bootstrap = new FactoryBootstrap(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 bootstrap.boot(); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
75 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
76 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
77 public void testTimeSeriesArtifact() { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
78 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
79 log.debug("GNVArtifactsTestCase.testTimeSeriesArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
80 String artefactName = "fis_marnet"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
81 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
82 .getArtifactFactory(artefactName); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
83 assertNotNull(artifactFactory); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
84 log.debug("TimeSeries-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
85 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
86 "" + System.currentTimeMillis(), bootstrap.getContext()); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
87 assertNotNull(artifact); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
88 log.debug("TimeSeries-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
89 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
90 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
91 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
92 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
93 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
94 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
95 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
96 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
97 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
98 "src/test/ressources/timeseries/timeseries_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
99 "src/test/ressources/timeseries/timeseries_step_01_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
100 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
101 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
102 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
103 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
104 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
105 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
106 "src/test/ressources/timeseries/timeseries_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
107 "src/test/ressources/timeseries/timeseries_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
108 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
109 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
110 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
111 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
112 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
113 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
114 "src/test/ressources/timeseries/timeseries_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
115 "src/test/ressources/timeseries/timeseries_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
116 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
117 // Vierter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
118 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
119 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
120 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
121 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
122 "src/test/ressources/timeseries/timeseries_step_04_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
123 "src/test/ressources/timeseries/timeseries_step_04_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
124 |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
125 Document outputData; |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
126 // F�nfter Schritt |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
127 outputData = artifact.describe(cc); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
128 FileOutputStream fos = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
129 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
130 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
131 "src/test/results/timeseriesdiagramm" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
132 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
133 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
134 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
135 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
136 .readDocument("src/test/ressources/timeseries/timeseries_step_05_feed.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
137 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
138 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
139 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
140 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
141 .readDocument("src/test/ressources/timeseries/timeseries_step_05_out.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
142 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
143 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
144 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
145 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
146 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
147 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
148 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
149 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
150 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
151 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
152 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
153 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
154 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
155 log.error(e, e); |
73
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
72
diff
changeset
|
156 fail(); |
504570de21fd
Refactoring Work depending on Infrastructurchanges in the Artifact-Module
Tim Englich <tim.englich@intevation.de>
parents:
72
diff
changeset
|
157 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
158 } |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
159 |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
160 /** |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
161 * @return |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
162 */ |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
163 private CallContext createCallContext() { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
164 CallMeta callMeta = new DefaultCallMeta( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
165 new PreferredLocale[] { new DefaultPreferredLocale("de_DE", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
166 1.0f) }); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
167 CallContext cc = new TestCallContext(bootstrap.getContext(), callMeta); |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
168 return cc; |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
169 } |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
170 |
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
171 /** |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
172 * @param artifact |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
173 * @param cc |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
174 * @throws Exception |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
175 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
176 private void doNextStep(Artifact artifact, CallContext cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
177 String feedDocument, String advanceDocument) |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
178 throws Exception { |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
179 Document outputData = artifact.describe(cc); |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
180 this.writeDocument2Log(outputData); |
111
065ec0a29394
Integrate the type Point into the ArtifactMethod.
Tim Englich <tim.englich@intevation.de>
parents:
109
diff
changeset
|
181 outputData = artifact.feed(this.readDocument(feedDocument), cc); |
065ec0a29394
Integrate the type Point into the ArtifactMethod.
Tim Englich <tim.englich@intevation.de>
parents:
109
diff
changeset
|
182 this.check4ExceptionReport(outputData); |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
183 outputData = artifact.advance(this.readDocument(advanceDocument), cc); |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
184 this.writeDocument2Log(outputData); |
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
185 this.check4ExceptionReport(outputData); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
186 |
109
678aad19a08d
Some Coderedundances refactored.
Tim Englich <tim.englich@intevation.de>
parents:
107
diff
changeset
|
187 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
188 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
189 public void testTimeSeriesMeshArtifact() { |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
190 try { |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
191 log.debug("GNVArtifactsTestCase.testTimeSeriesMeshArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
192 String artefactName = "fis_modeldata"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
193 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
194 .getArtifactFactory(artefactName); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
195 assertNotNull(artifactFactory); |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
196 log.debug("TimeSeriesMesh-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
197 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
198 "" + System.currentTimeMillis(), bootstrap.getContext()); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
199 assertNotNull(artifact); |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
200 log.debug("TimeSeriesMesh-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
201 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
202 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
203 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
204 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
205 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
206 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
207 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
208 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
209 "src/test/ressources/timeseries_mesh/timeseries_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
210 "src/test/ressources/timeseries_mesh/timeseries_step_01_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
211 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
212 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
213 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
214 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
215 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
216 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
217 "src/test/ressources/timeseries_mesh/timeseries_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
218 "src/test/ressources/timeseries_mesh/timeseries_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
219 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
220 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
221 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
222 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
223 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
224 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
225 "src/test/ressources/timeseries_mesh/timeseries_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
226 "src/test/ressources/timeseries_mesh/timeseries_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
227 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
228 // Vierter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
229 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
230 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
231 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
232 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
233 "src/test/ressources/timeseries_mesh/timeseries_step_04_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
234 "src/test/ressources/timeseries_mesh/timeseries_step_04_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
235 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
236 // F�nfter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
237 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
238 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
239 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
240 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
241 "src/test/ressources/timeseries_mesh/timeseries_step_05_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
242 "src/test/ressources/timeseries_mesh/timeseries_step_05_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
243 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
244 // Sechster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
245 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
246 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
247 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
248 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
249 "src/test/ressources/timeseries_mesh/timeseries_step_06_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
250 "src/test/ressources/timeseries_mesh/timeseries_step_06_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
251 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
252 // Siebter Schritt |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
253 Document outputData = artifact.describe(cc); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
254 FileOutputStream fos = null; |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
255 FileOutputStream fos2 = null; |
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
256 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
257 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
258 fos = new FileOutputStream("src/test/results/timeseries_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
259 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
260 + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
261 fos2 = new FileOutputStream("src/test/results/timeseries_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
262 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
263 + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
264 fos3 = new FileOutputStream("src/test/results/timeseries_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
265 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
266 + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
267 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
268 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
269 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
270 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_feed.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
271 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
272 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
273 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
274 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
275 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_out_statistics.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
276 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
277 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
278 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
279 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
280 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_out_chart.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
281 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
282 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
283 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
284 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
285 .readDocument("src/test/ressources/timeseries_mesh/timeseries_step_07_out_csv.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
286 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
287 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
288 log.error(e, e); |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
289 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
290 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
291 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
292 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
293 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
294 fos2.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
295 fos2.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
296 fos3.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
297 fos3.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
298 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
299 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
300 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
301 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
302 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
303 log.error(e, e); |
103
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
304 fail(); |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
305 } |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
306 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
307 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
308 public void testVerticalProfileArtifact() { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
309 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
310 log.debug("GNVArtifactsTestCase.testVerticalProfileArtifact"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
311 String artefactName = "fis_marnet"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
312 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
313 .getArtifactFactory(artefactName); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
314 assertNotNull(artifactFactory); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
315 log.debug("VerticalProfile-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
316 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
317 "" + System.currentTimeMillis(), bootstrap.getContext()); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
318 assertNotNull(artifact); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
319 log.debug("VerticalProfile-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
320 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
321 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
322 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
323 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
324 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
325 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
326 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
327 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
328 "src/test/ressources/verticalprofile/verticalprofile_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
329 "src/test/ressources/verticalprofile/verticalprofile_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
330 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
331 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
332 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
333 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
334 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
335 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
336 "src/test/ressources/verticalprofile/verticalprofile_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
337 "src/test/ressources/verticalprofile/verticalprofile_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
338 |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
339 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
340 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
341 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
342 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
343 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
344 "src/test/ressources/verticalprofile/verticalprofile_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
345 "src/test/ressources/verticalprofile/verticalprofile_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
346 |
107
4ebf9ad2e7eb
Added TestCase for TimeSeriesMesh
Tim Englich <tim.englich@intevation.de>
parents:
106
diff
changeset
|
347 // Vierter Schritt |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
348 Document outputData = artifact.describe(cc); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
349 FileOutputStream fos = null; |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
350 FileOutputStream fos2 = null; |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
351 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
352 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
353 fos = new FileOutputStream("src/test/results/verticalprofile" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
354 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
355 + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
356 fos2 = new FileOutputStream("src/test/results/verticalprofile" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
357 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
358 + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
359 fos3 = new FileOutputStream("src/test/results/verticalprofile" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
360 + System.currentTimeMillis() |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
361 + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
362 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
363 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
364 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
365 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_04_feed.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
366 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
367 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
368 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
369 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
370 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_04_out_statistics.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
371 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
372 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
373 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
374 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
375 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_04_out_chart.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
376 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
377 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
378 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
379 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
380 .readDocument("src/test/ressources/verticalprofile/verticalprofile_step_04_out_csv.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
381 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
382 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
383 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
384 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
385 } finally { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
386 try { |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
387 fos.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
388 fos.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
389 fos2.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
390 fos2.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
391 fos3.flush(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
392 fos3.close(); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
393 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
394 log.error(e, e); |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
395 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
396 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
397 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
398 log.error(e, e); |
103
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
399 fail(); |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
400 } |
4042844339ee
Testcases for VerticalProfile and VerticalProfile Instantaneouspoint added
Tim Englich <tim.englich@intevation.de>
parents:
102
diff
changeset
|
401 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
402 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
403 public void testVerticalProfileMeshArtifact() { |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
404 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
405 log.debug("GNVArtifactsTestCase.testVerticalProfileArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
406 String artefactName = "fis_modeldata"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
407 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
408 .getArtifactFactory(artefactName); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
409 assertNotNull(artifactFactory); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
410 log.debug("VerticalProfile-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
411 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
412 "" + System.currentTimeMillis(), bootstrap.getContext()); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
413 assertNotNull(artifact); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
414 log.debug("VerticalProfile-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
415 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
416 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
417 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
418 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
419 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
420 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
421 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
422 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
423 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
424 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_01_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
425 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
426 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
427 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
428 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
429 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
430 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
431 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
432 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
433 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
434 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
435 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
436 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
437 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
438 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
439 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
440 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
441 |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
442 // Vierter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
443 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
444 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
445 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
446 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
447 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_04_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
448 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_04_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
449 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
450 // F�nfter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
451 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
452 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
453 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
454 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
455 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_05_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
456 "src/test/ressources/verticalprofile_mesh/verticalprofile_step_05_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
457 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
458 // Sechster Schritt |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
459 Document outputData = artifact.describe(cc); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
460 FileOutputStream fos = null; |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
461 FileOutputStream fos2 = null; |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
462 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
463 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
464 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
465 "src/test/results/verticalprofile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
466 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
467 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
468 "src/test/results/verticalprofile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
469 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
470 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
471 "src/test/results/verticalprofile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
472 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
473 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
474 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
475 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
476 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_06_feed.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
477 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
478 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
479 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
480 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
481 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_06_out_statistics.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
482 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
483 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
484 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
485 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
486 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_06_out_chart.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
487 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
488 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
489 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
490 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
491 .readDocument("src/test/ressources/verticalprofile_mesh/verticalprofile_step_06_out_csv.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
492 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
493 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
494 log.error(e, e); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
495 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
496 } finally { |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
497 try { |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
498 fos.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
499 fos.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
500 fos2.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
501 fos2.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
502 fos3.flush(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
503 fos3.close(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
504 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
505 log.error(e, e); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
506 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
507 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
508 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
509 log.error(e, e); |
114
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
510 fail(); |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
511 } |
d8d38a4dd965
Added TestCase for HorizontalProfiles of InstataneousPoints and the required Configuration
Tim Englich <tim.englich@intevation.de>
parents:
111
diff
changeset
|
512 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
513 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
514 public void testVerticalProfileInstantaneousPointArtifact() { |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
515 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
516 log.debug("GNVArtifactsTestCase.testVerticalProfileArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
517 String artefactName = "fis_bsh_ctd"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
518 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
519 .getArtifactFactory(artefactName); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
520 assertNotNull(artifactFactory); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
521 log.debug("VerticalProfile-ArtifactFactory is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
522 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
523 "" + System.currentTimeMillis(), bootstrap.getContext()); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
524 assertNotNull(artifact); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
525 log.debug("VerticalProfile-Artifact is available"); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
526 |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
527 CallContext cc = createCallContext(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
528 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
529 // Erster Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
530 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
531 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
532 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
533 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
534 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
535 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_01_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
536 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
537 // Zweiter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
538 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
539 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
540 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
541 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
542 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
543 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
544 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
545 // Dritter Schritt |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
546 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
547 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
548 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
549 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
550 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
551 "src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
552 |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
553 // Vierter Schritt |
117
ef157bd2fa92
LanguageSupport integrated
Tim Englich <tim.englich@intevation.de>
parents:
116
diff
changeset
|
554 Document outputData = artifact.describe(cc); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
555 FileOutputStream fos = null; |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
556 FileOutputStream fos2 = null; |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
557 FileOutputStream fos3 = null; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
558 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
559 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
560 "src/test/results/verticalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
561 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
562 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
563 "src/test/results/verticalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
564 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
565 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
566 "src/test/results/verticalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
567 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
568 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
569 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
570 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
571 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_feed.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
572 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
573 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
574 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
575 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
576 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_out_statistics.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
577 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
578 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
579 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
580 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
581 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_out_chart.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
582 fos, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
583 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
584 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
585 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
586 .readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_step_04_out_csv.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
587 fos3, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
588 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
589 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
590 fail(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
591 } finally { |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
592 try { |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
593 fos.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
594 fos.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
595 fos2.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
596 fos2.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
597 fos3.flush(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
598 fos3.close(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
599 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
600 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
601 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
602 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
603 } catch (Exception e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
604 log.error(e, e); |
116
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
605 fail(); |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
606 } |
820238357bab
Added Horizontal-Profile-Support for Meshes.
Tim Englich <tim.englich@intevation.de>
parents:
114
diff
changeset
|
607 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
608 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
609 public void testHorizontalProfileInstantaneousPointArtifact() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
610 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
611 log |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
612 .debug("GNVArtifactsTestCase.testHorizontalProfileInstantaneousPointArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
613 String artefactName = "fis_delphin"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
614 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
615 .getArtifactFactory(artefactName); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
616 assertNotNull(artifactFactory); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
617 log.debug("VerticalProfile-ArtifactFactory is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
618 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
619 "" + System.currentTimeMillis(), bootstrap.getContext()); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
620 assertNotNull(artifact); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
621 log.debug("VerticalProfile-Artifact is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
622 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
623 CallContext cc = createCallContext(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
624 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
625 // Erster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
626 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
627 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
628 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
629 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
630 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_00_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
631 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_00_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
632 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
633 // Erster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
634 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
635 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
636 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
637 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
638 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
639 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_01_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
640 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
641 // Zweiter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
642 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
643 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
644 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
645 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
646 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
647 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
648 // Dritter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
649 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
650 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
651 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
652 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
653 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
654 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
655 // Vierter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
656 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
657 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
658 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
659 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
660 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_04_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
661 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_04_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
662 // F�nfter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
663 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
664 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
665 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
666 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
667 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
668 "src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_05_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
669 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
670 Document outputData = artifact.describe(cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
671 FileOutputStream fos = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
672 FileOutputStream fos2 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
673 FileOutputStream fos3 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
674 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
675 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
676 "src/test/results/horizontalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
677 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
678 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
679 "src/test/results/horizontalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
680 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
681 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
682 "src/test/results/horizontalprofile_instantaneouspoint" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
683 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
684 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
685 .feed( |
177
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
686 this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_feed.xml"), |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
687 cc); |
177
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
688 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_statistics.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
689 fos2, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
690 cc); |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
691 artifact.out( |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
692 this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_chart.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
693 fos, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
694 cc); |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
695 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_step_06_out_csv.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
696 fos3, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
697 cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
698 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
699 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
700 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
701 } finally { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
702 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
703 fos.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
704 fos.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
705 fos2.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
706 fos2.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
707 fos3.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
708 fos3.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
709 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
710 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
711 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
712 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
713 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
714 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
715 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
716 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
717 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
718 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
719 public void testHorizontalProfileMeshPointArtifact() { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
720 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
721 log |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
722 .debug("GNVArtifactsTestCase.testHorizontalProfileInstantaneousPointArtifact"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
723 String artefactName = "fis_modeldata"; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
724 ArtifactFactory artifactFactory = this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
725 .getArtifactFactory(artefactName); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
726 assertNotNull(artifactFactory); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
727 log.debug("VerticalProfile-ArtifactFactory is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
728 Artifact artifact = artifactFactory.createArtifact( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
729 "" + System.currentTimeMillis(), bootstrap.getContext()); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
730 assertNotNull(artifact); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
731 log.debug("VerticalProfile-Artifact is available"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
732 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
733 CallContext cc = createCallContext(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
734 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
735 // Erster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
736 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
737 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
738 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
739 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
740 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_01_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
741 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_01_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
742 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
743 // Zweiter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
744 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
745 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
746 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
747 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
748 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
749 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_02_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
750 // Dritter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
751 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
752 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
753 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
754 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
755 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_03_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
756 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_03_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
757 // Vierter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
758 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
759 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
760 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
761 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
762 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_04_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
763 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_04_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
764 // F�nfter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
765 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
766 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
767 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
768 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
769 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_05_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
770 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_05_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
771 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
772 // Sechster Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
773 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
774 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
775 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
776 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
777 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_06_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
778 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_06_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
779 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
780 // Siebter Schritt |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
781 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
782 .doNextStep( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
783 artifact, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
784 cc, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
785 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_feed.xml", |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
786 "src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_07_advance.xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
787 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
788 Document outputData = artifact.describe(cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
789 FileOutputStream fos = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
790 FileOutputStream fos2 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
791 FileOutputStream fos3 = null; |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
792 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
793 fos = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
794 "src/test/results/horizontalProfile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
795 + System.currentTimeMillis() + ".png"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
796 fos2 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
797 "src/test/results/horizontalProfile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
798 + System.currentTimeMillis() + ".xml"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
799 fos3 = new FileOutputStream( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
800 "src/test/results/horizontalProfile_mesh" |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
801 + System.currentTimeMillis() + ".csv"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
802 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
803 .feed( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
804 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
805 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_feed.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
806 cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
807 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
808 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
809 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
810 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_out_statistics.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
811 fos2, cc); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
812 artifact |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
813 .out( |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
814 this |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
815 .readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_out_chart.xml"), |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
816 fos, cc); |
177
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
817 artifact.out(this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_step_08_out_csv.xml"), |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
818 fos3, |
08b8b79b30ff
Integrated special CSV-Export for HorizontalProfiles
Tim Englich <tim.englich@intevation.de>
parents:
171
diff
changeset
|
819 cc); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
820 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
821 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
822 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
823 } finally { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
824 try { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
825 fos.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
826 fos.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
827 fos2.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
828 fos2.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
829 fos3.flush(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
830 fos3.close(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
831 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
832 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
833 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
834 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
835 } catch (Exception e) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
836 log.error(e, e); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
837 fail(); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
838 } |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
839 } |
197
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
840 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
841 public void testVerticalCrossSectionMeshArtifact() { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
842 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
843 log.debug("GNVArtifactsTestCase.testHVerticalCrossSectionMeshArtifact"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
844 String artefactName = "fis_modeldata"; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
845 ArtifactFactory artifactFactory = this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
846 .getArtifactFactory(artefactName); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
847 assertNotNull(artifactFactory); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
848 log.debug("VerticalProfile-ArtifactFactory is available"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
849 Artifact artifact = artifactFactory.createArtifact( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
850 "" + System.currentTimeMillis(), bootstrap.getContext()); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
851 assertNotNull(artifact); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
852 log.debug("VerticalProfile-Artifact is available"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
853 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
854 CallContext cc = createCallContext(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
855 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
856 // Erster Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
857 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
858 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
859 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
860 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
861 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_01_feed.xml", |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
862 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_01_advance.xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
863 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
864 // Zweiter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
865 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
866 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
867 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
868 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
869 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_02_feed.xml", |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
870 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_02_advance.xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
871 // Dritter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
872 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
873 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
874 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
875 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
876 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_03_feed.xml", |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
877 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_03_advance.xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
878 // Vierter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
879 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
880 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
881 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
882 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
883 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_04_feed.xml", |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
884 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_04_advance.xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
885 // F�nfter Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
886 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
887 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
888 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
889 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
890 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_05_feed.xml", |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
891 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_05_advance.xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
892 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
893 // Sechster Schritt |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
894 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
895 .doNextStep( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
896 artifact, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
897 cc, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
898 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_feed.xml", |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
899 "src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_06_advance.xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
900 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
901 |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
902 Document outputData = artifact.describe(cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
903 FileOutputStream fos = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
904 FileOutputStream fos2 = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
905 FileOutputStream fos3 = null; |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
906 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
907 fos = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
908 "src/test/results/verticalcrosssection_mesh" |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
909 + System.currentTimeMillis() + ".png"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
910 fos2 = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
911 "src/test/results/verticalcrosssection_mesh" |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
912 + System.currentTimeMillis() + ".xml"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
913 fos3 = new FileOutputStream( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
914 "src/test/results/verticalcrosssection_mesh" |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
915 + System.currentTimeMillis() + ".csv"); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
916 artifact |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
917 .feed( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
918 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
919 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_feed.xml"), |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
920 cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
921 artifact |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
922 .out( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
923 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
924 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_out_statistics.xml"), |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
925 fos2, cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
926 artifact |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
927 .out( |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
928 this |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
929 .readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_out_chart.xml"), |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
930 fos, cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
931 artifact.out(this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_step_07_out_csv.xml"), |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
932 fos3, |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
933 cc); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
934 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
935 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
936 fail(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
937 } finally { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
938 try { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
939 fos.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
940 fos.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
941 fos2.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
942 fos2.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
943 fos3.flush(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
944 fos3.close(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
945 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
946 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
947 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
948 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
949 } catch (Exception e) { |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
950 log.error(e, e); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
951 fail(); |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
952 } |
bab92ad1165d
Added the required Classes an Configuration for providing VerticalCrossSections
Tim Englich <tim.englich@intevation.de>
parents:
177
diff
changeset
|
953 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
954 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
955 protected void createFile(byte[] content, String fileName) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
956 try { |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
957 FileOutputStream fos = new FileOutputStream(new File(fileName)); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
958 ByteArrayInputStream bis = new ByteArrayInputStream(content); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
959 byte[] buf = new byte[4096]; |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
960 while (bis.read(buf) > 0) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
961 fos.write(buf); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
962 } |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
963 fos.flush(); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
964 fos.close(); |
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
965 } catch (FileNotFoundException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
966 log.error(e, e); |
69
f24c825144bc
TestCase Refactored to the new Folder-Based Configuration.
Tim Englich <tim.englich@intevation.de>
parents:
62
diff
changeset
|
967 } catch (IOException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
968 log.error(e, e); |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
969 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
970 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
971 |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
972 /** |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
973 * @param artefactName |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
974 */ |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
975 private ArtifactFactory getArtifactFactory(String artefactName) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
976 log.debug("GNVArtifactsTestCase.getArtifactFactory"); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
977 ArtifactFactory[] artifactFactories = bootstrap.getArtifactFactories(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
978 for (int i = 0; i < artifactFactories.length; i++) { |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
979 if (artifactFactories[i].getName().equals(artefactName)) { |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
980 log.debug("ArtifactFactory wurde gefunden."); |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
981 return artifactFactories[i]; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
982 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
983 } |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
984 return null; |
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
985 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
986 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
987 protected void writeDocument2Log(Document document) { |
72
1fece4da4f2f
TestCase moved from TimeSeriesArtifact to FISArtifact. Used FIS: Marnet
Tim Englich <tim.englich@intevation.de>
parents:
69
diff
changeset
|
988 log.debug(new ArtifactXMLUtilities().writeDocument2String(document)); |
54
09b4bf848c7b
2009-09-08 Tim Englich <tim.englich@intevation.de>
Tim Englich <tim.englich@intevation.de>
parents:
52
diff
changeset
|
989 } |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
990 |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
991 protected Document readDocument(String fileName) { |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
992 Document returnValue = null; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
993 try { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
994 DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
995 .newInstance(); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
996 DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
997 returnValue = docBuilder.parse(new File(fileName)); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
998 } catch (ParserConfigurationException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
999 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1000 } catch (SAXException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1001 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1002 } catch (IOException e) { |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1003 log.error(e, e); |
58
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1004 } |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1005 return returnValue; |
f31343d80d53
Artifact.advance initial implementiert
Tim Englich <tim.englich@intevation.de>
parents:
54
diff
changeset
|
1006 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1007 |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1008 private void check4ExceptionReport(Document document) throws Exception { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1009 document = new ArtifactXMLUtilities().reInitDocument(document); |
171
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1010 String message = Config.getStringXPath(document, |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1011 "/exceptionreport/exception"); |
7fb9441dd8af
Format Code to max 80 Chars per Row and Cleanup
Tim Englich <tim.englich@intevation.de>
parents:
119
diff
changeset
|
1012 if (message != null) { |
106
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1013 throw new Exception(message); |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1014 } |
10d9a440f52e
ExceptionTest for Responsdocuments added.
Tim Englich <tim.englich@intevation.de>
parents:
105
diff
changeset
|
1015 } |
52
4d6a82b96059
First Implementation of the GNV-Artifacts
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1016 } |