Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java @ 522:c896282c2601
Issue 156 solved. Added width, height and points as parameter to svg and pdf output mode. Width and height have an effact on the width and height of the export, points is a boolean property which enables/disables the drawing of data points.
gnv-artifacts/trunk@616 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 25 Jan 2010 09:18:31 +0000 |
parents | 9e5ed3eebf29 |
children | e0d7b8a0bc42 |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 * @see de.intevation.artifacts.ArtifactDatabase#createArtifactWithFactory(java.lang.String, de.intevation.artifacts.CallMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 public Document createArtifactWithFactory(String factory, CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 throws ArtifactDatabaseException { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 return null; |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 * @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
|
55 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 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
|
57 throws ArtifactDatabaseException { |
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 return null; |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 * @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
|
64 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 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
|
66 throws ArtifactDatabaseException { |
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 return null; |
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 /** |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
72 * @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
|
73 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 public ArtifactFactory getInternalArtifactFactory(String factoryName) { |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
75 return this.artifactFactory; |
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#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
|
80 */ |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
81 public DeferredOutput out(String artifact, Document format, |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
82 CallMeta callMeta) |
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
83 throws ArtifactDatabaseException { |
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 return null; |
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 |
510
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
88 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
|
89 return null; |
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 |
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
92 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
|
93 return null; |
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
94 } |
9e5ed3eebf29
Fixed Compiler-Error after adding further Methods to the Interface ArtifactDatabase.
Tim Englich <tim.englich@intevation.de>
parents:
485
diff
changeset
|
95 |
485
4939236c2dc9
Fixed Compilation and Runtimeerrors in Unittests.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
96 } |