Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java @ 1107:86ca3c10523f
Adjust the format of axes labels in histograms corresponding the specified locale (issue316).
gnv-artifacts/trunk@1238 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 29 Jun 2010 07:37:36 +0000 |
parents | 9d2891068ba5 |
children | f953c9a559d8 |
rev | line source |
---|---|
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.artifacts; |
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 import de.intevation.artifacts.ArtifactDatabase; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 import de.intevation.artifacts.ArtifactDatabaseException; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 import de.intevation.artifacts.ArtifactFactory; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.artifacts.CallMeta; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
8 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
|
9 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 /** |
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
|
11 * @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
|
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 public class TestArtifactDatabase implements ArtifactDatabase { |
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 private ArtifactFactory artifactFactory = null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 * Constructor |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 public TestArtifactDatabase(ArtifactFactory artifactFactory) { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 this.artifactFactory = artifactFactory; |
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 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 * @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
|
26 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 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
|
28 throws ArtifactDatabaseException { |
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 return null; |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 * @see de.intevation.artifacts.ArtifactDatabase#artifactFactoryNamesAndDescriptions() |
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 public String[][] artifactFactoryNamesAndDescriptions() { |
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 /** |
595
e0d7b8a0bc42
Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents:
510
diff
changeset
|
42 * @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
|
43 */ |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
595
diff
changeset
|
44 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
|
45 CallMeta callMeta, |
e0d7b8a0bc42
Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Tim Englich <tim.englich@intevation.de>
parents:
510
diff
changeset
|
46 Document data) |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 throws ArtifactDatabaseException { |
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 return null; |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 } |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 * @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
|
54 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 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
|
56 throws ArtifactDatabaseException { |
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 return null; |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 * @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
|
63 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 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
|
65 throws ArtifactDatabaseException { |
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 return null; |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
71 * @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
|
72 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
73 public ArtifactFactory getInternalArtifactFactory(String factoryName) { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 return this.artifactFactory; |
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 |
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 * @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
|
79 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
80 public DeferredOutput out(String artifact, Document format, |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
81 CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
82 throws ArtifactDatabaseException { |
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 return null; |
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 |
510
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
87 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
|
88 return null; |
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
89 } |
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
90 |
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
91 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
|
92 return null; |
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 |
797
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
95 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
|
96 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
|
97 } |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
98 |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
99 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
|
100 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
|
101 } |
9d2891068ba5
Fixed test mockups to let them implement their interface correctly.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
780
diff
changeset
|
102 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
103 } |