Mercurial > dive4elements > framework
annotate artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java @ 318:2ed77f7e1bab
Swapped SQL parameter indices when fetching collection name.
artifacts/trunk@2455 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 02 Aug 2011 14:13:20 +0000 |
parents | e5bc48dc3ec3 |
children | 93a774fe2bb4 |
rev | line source |
---|---|
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.artifactdatabase.state; |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
278
9ad188df72f2
Facets are serializable now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
277
diff
changeset
|
3 import java.io.Serializable; |
9ad188df72f2
Facets are serializable now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
277
diff
changeset
|
4 |
295
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
5 import org.w3c.dom.Document; |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
6 import org.w3c.dom.Node; |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
7 |
280
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
8 import de.intevation.artifacts.Artifact; |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
9 import de.intevation.artifacts.CallContext; |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
10 |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 /** |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 */ |
278
9ad188df72f2
Facets are serializable now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
277
diff
changeset
|
15 public interface Facet extends Serializable { |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 /** |
277
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
18 * Returns the index of this facet. |
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
19 * |
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
20 * @return the index of this facet. |
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
21 */ |
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
22 int getIndex(); |
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
23 |
0a579b71496b
Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
226
diff
changeset
|
24 /** |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * Returns the name of this facet. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 * |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 * @return the name of this facet. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 */ |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 String getName(); |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 /** |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 * Returns the description of this facet. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 * |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 * @return the description of this facet. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 */ |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 String getDescription(); |
280
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
38 |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
39 |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
40 /** |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
41 * Returns the data this facet requires. |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
42 * |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
43 * @param artifact The owner artifact. |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
44 * @param context The CallContext. |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
45 * |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
46 * @return the data. |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
47 */ |
7fbe674d758a
Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
278
diff
changeset
|
48 Object getData(Artifact artifact, CallContext context); |
295
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
49 |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
50 |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
51 /** |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
52 * Write the internal representation of a facet to a node. |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
53 * |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
54 * @param doc A Document. |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
55 * |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
56 * @return the representation as Node. |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
57 */ |
e5bc48dc3ec3
Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
280
diff
changeset
|
58 Node toXML(Document doc); |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |