annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java @ 638:c580666a843f

Removed CallMeta object from state which should not be serialized. Implemented a little workarround instead to save localized strings for axes descriptions of horizontal profile charts (issue180). gnv-artifacts/trunk@721 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Mar 2010 08:43:50 +0000
parents e0d7b8a0bc42
children 9a828e5a2390
rev   line source
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.artifacts;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 import org.w3c.dom.Document;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 import de.intevation.artifacts.ArtifactDatabase;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 import de.intevation.artifacts.ArtifactDatabaseException;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 import de.intevation.artifacts.ArtifactFactory;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 import de.intevation.artifacts.CallMeta;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 * @author Tim Englich <tim.englich@intevation.de>
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 *
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 public class TestArtifactDatabase implements ArtifactDatabase {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 private ArtifactFactory artifactFactory = null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 * Constructor
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 public TestArtifactDatabase(ArtifactFactory artifactFactory) {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 this.artifactFactory = artifactFactory;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 * @see de.intevation.artifacts.ArtifactDatabase#advance(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 public Document advance(String artifact, Document target, CallMeta callMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 * @see de.intevation.artifacts.ArtifactDatabase#artifactFactoryNamesAndDescriptions()
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 public String[][] artifactFactoryNamesAndDescriptions() {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
40
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 /**
595
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
45 * @see de.intevation.artifacts.ArtifactDatabase#createArtifactWithFactory(java.lang.String, de.intevation.artifacts.CallMeta, org.w3c.dom.Document)
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 */
595
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
47 public Document createArtifactWithFactory(String factory,
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
48 CallMeta callMeta,
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
49 Document data)
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56 * @see de.intevation.artifacts.ArtifactDatabase#describe(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 public Document describe(String artifact, Document data, CallMeta callMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
61 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65 * @see de.intevation.artifacts.ArtifactDatabase#feed(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 public Document feed(String artifact, Document data, CallMeta callMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
70 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
71 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
73 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74 * @see de.intevation.artifacts.ArtifactDatabase#getInternalArtifactFactory(java.lang.String)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 public ArtifactFactory getInternalArtifactFactory(String factoryName) {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77 return this.artifactFactory;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
78 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
79
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
80 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
81 * @see de.intevation.artifacts.ArtifactDatabase#out(java.lang.String, org.w3c.dom.Document, de.intevation.artifacts.CallMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
82 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
83 public DeferredOutput out(String artifact, Document format,
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
84 CallMeta callMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
85 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
86
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
87 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
88 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
89
510
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
90 public Document process(String service, Document input, CallMeta callMeta) {
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
91 return null;
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
92 }
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
93
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
94 public String[][] serviceNamesAndDescriptions() {
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
95 return null;
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
96 }
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
97
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
98 }

http://dive4elements.wald.intevation.org