annotate artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java @ 453:a2efc9d65a11 2.9.8

Doc.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 28 Dec 2012 13:32:32 +0100
parents 71ff234713a6
children
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
351
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
3 import java.util.List;
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
4
278
9ad188df72f2 Facets are serializable now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
5 import java.io.Serializable;
9ad188df72f2 Facets are serializable now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
6
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
7 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
8 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
9
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
10 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
11 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
12
226
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 /**
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 * @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
16 */
278
9ad188df72f2 Facets are serializable now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 277
diff changeset
17 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
18
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 /**
277
0a579b71496b Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 226
diff changeset
20 * Returns 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 * @return the index of this facet.
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 int getIndex();
0a579b71496b Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 226
diff changeset
25
0a579b71496b Facets have indices now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 226
diff changeset
26 /**
226
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 * 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
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 * @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
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 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
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
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 * 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
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 * @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
38 */
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 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
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
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 * 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
44 *
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 * @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
46 * @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
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 * @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
49 */
7fbe674d758a Facets got a method that return its required data from the owner artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 278
diff changeset
50 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
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
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 /**
351
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
54 * Get keys for which this Facet can provide data (for other facets, not
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
55 * for plot).
357
1d11a0531242 Added artifact parameter to facets getDataProviderKeys.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 351
diff changeset
56 * @param artifact Artifact that this facet belongs to.
351
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
57 * @return list of keys
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
58 */
378
71ff234713a6 Pass context when asking facets for keys to write on blackboard.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 357
diff changeset
59 List getDataProviderKeys(Artifact artifact, CallContext context);
351
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
60
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
61
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
62 /**
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
63 * Provide data to other facet.
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
64 *
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
65 * @param art The artifact that this facet belongs to.
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
66 * @param key the key of the requested service.
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
67 * @param prm optional parameters.
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
68 * @param ctxt the callcontext.
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
69 *
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
70 * @return the data
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
71 */
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
72 Object provideBlackboardData(
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
73 Artifact art,
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
74 Object key,
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
75 Object prm,
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
76 CallContext ctxt);
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
77
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
78
eb1136134d09 Prepare inter-facet pre-rendering communication ('blackboard') phase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 322
diff changeset
79 /**
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
80 * 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
81 *
e5bc48dc3ec3 Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 280
diff changeset
82 * @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
83 *
e5bc48dc3ec3 Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 280
diff changeset
84 * @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
85 */
e5bc48dc3ec3 Facets can write its internal representation to XML using a toXML() method now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 280
diff changeset
86 Node toXML(Document doc);
322
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 295
diff changeset
87
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 295
diff changeset
88 Facet deepCopy();
226
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 }
41404961c804 Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org