annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java @ 1117:dec4257ad570

Changed imports to fit new positions of XMLUtils and Config gnv-artifacts/trunk@1478 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 15 Mar 2011 16:13:39 +0000
parents f953c9a559d8
children c01c220312d0
rev   line source
1115
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
1 /*
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
3 *
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
5 * Read the file LGPL.txt coming with the software for details
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
7 */
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 797
diff changeset
8
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 package de.intevation.gnv.artifacts;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 import de.intevation.artifacts.ArtifactDatabase;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 import de.intevation.artifacts.ArtifactDatabaseException;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 import de.intevation.artifacts.ArtifactFactory;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 import de.intevation.artifacts.CallMeta;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15
779
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 778
diff changeset
16 import org.w3c.dom.Document;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 778
diff changeset
17
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 /**
780
c4156275c1e1 Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 779
diff changeset
19 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
485
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 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 public class TestArtifactDatabase implements ArtifactDatabase {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 private ArtifactFactory artifactFactory = null;
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 * Constructor
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 public TestArtifactDatabase(ArtifactFactory artifactFactory) {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 this.artifactFactory = artifactFactory;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31
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 * @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
34 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 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
36 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 }
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 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 * @see de.intevation.artifacts.ArtifactDatabase#artifactFactoryNamesAndDescriptions()
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 public String[][] artifactFactoryNamesAndDescriptions() {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 /**
595
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
50 * @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
51 */
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 595
diff changeset
52 public Document createArtifactWithFactory(String factory,
595
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
53 CallMeta callMeta,
e0d7b8a0bc42 Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents: 510
diff changeset
54 Document data)
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59
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 * @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
62 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 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
64 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68
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 * @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
71 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72 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
73 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77
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 * @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
80 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
81 public ArtifactFactory getInternalArtifactFactory(String factoryName) {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
82 return this.artifactFactory;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
83 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
84
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
85 /**
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
86 * @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
87 */
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
88 public DeferredOutput out(String artifact, Document format,
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
89 CallMeta callMeta)
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
90 throws ArtifactDatabaseException {
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
91
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
92 return null;
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
93 }
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
94
510
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
95 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
96 return null;
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
97 }
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
98
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
99 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
100 return null;
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
101 }
9e5ed3eebf29 Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents: 485
diff changeset
102
797
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
103 public Document exportArtifact(String artifact, CallMeta callMeta) throws ArtifactDatabaseException {
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
104 throw new UnsupportedOperationException("Not supported yet.");
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
105 }
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
106
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
107 public Document importArtifact(Document data, CallMeta callMeta) throws ArtifactDatabaseException {
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
108 throw new UnsupportedOperationException("Not supported yet.");
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
109 }
9d2891068ba5 Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
110
485
4939236c2dc9 Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
111 }

http://dive4elements.wald.intevation.org