comparison artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/Facet.java @ 473:d0ac790a6c89 dive4elements-move

Moved directories to org.dive4elements
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 10:57:18 +0200
parents artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java@71ff234713a6
children 415df0fc4fa1
comparison
equal deleted inserted replaced
472:783cc1b6b615 473:d0ac790a6c89
1 package de.intevation.artifactdatabase.state;
2
3 import java.util.List;
4
5 import java.io.Serializable;
6
7 import org.w3c.dom.Document;
8 import org.w3c.dom.Node;
9
10 import de.intevation.artifacts.Artifact;
11 import de.intevation.artifacts.CallContext;
12
13
14 /**
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
16 */
17 public interface Facet extends Serializable {
18
19 /**
20 * Returns the index of this facet.
21 *
22 * @return the index of this facet.
23 */
24 int getIndex();
25
26 /**
27 * Returns the name of this facet.
28 *
29 * @return the name of this facet.
30 */
31 String getName();
32
33
34 /**
35 * Returns the description of this facet.
36 *
37 * @return the description of this facet.
38 */
39 String getDescription();
40
41
42 /**
43 * Returns the data this facet requires.
44 *
45 * @param artifact The owner artifact.
46 * @param context The CallContext.
47 *
48 * @return the data.
49 */
50 Object getData(Artifact artifact, CallContext context);
51
52
53 /**
54 * Get keys for which this Facet can provide data (for other facets, not
55 * for plot).
56 * @param artifact Artifact that this facet belongs to.
57 * @return list of keys
58 */
59 List getDataProviderKeys(Artifact artifact, CallContext context);
60
61
62 /**
63 * Provide data to other facet.
64 *
65 * @param art The artifact that this facet belongs to.
66 * @param key the key of the requested service.
67 * @param prm optional parameters.
68 * @param ctxt the callcontext.
69 *
70 * @return the data
71 */
72 Object provideBlackboardData(
73 Artifact art,
74 Object key,
75 Object prm,
76 CallContext ctxt);
77
78
79 /**
80 * Write the internal representation of a facet to a node.
81 *
82 * @param doc A Document.
83 *
84 * @return the representation as Node.
85 */
86 Node toXML(Document doc);
87
88 Facet deepCopy();
89 }
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org