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

Doc.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 28 Dec 2012 13:32:32 +0100
parents f93edbfcf2bc
children
rev   line source
358
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.artifactdatabase.state;
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import java.util.Set;
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import org.w3c.dom.Node;
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 /**
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 */
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 public interface Section extends Serializable {
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 /**
359
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
15 * Returns an ID for this Section.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
16 *
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
17 * @return an ID for this Section.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
18 */
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
19 String getId();
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
20
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
21 /**
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
22 * Adds a new subsection to this Section object.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
23 *
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
24 * @param subsection the new Section.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
25 */
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
26 void addSubsection(Section subsection);
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
27
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
28 /**
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
29 * Returns the number of subsections in this Section.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
30 *
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
31 * @return the number of subsections.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
32 */
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
33 int getSubsectionCount();
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
34
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
35 /**
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
36 * Returns a subsection at position <i>pos</i>.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
37 *
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
38 * @param pos The position of the target subsection.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
39 *
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
40 * @return the subsection at position <i>pos</i>.
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
41 */
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
42 Section getSubsection(int pos);
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
43
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
44 /**
358
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 * Adds a new Attribute to this Section.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 *
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 * @param key The key that is used to store/retrieve the Attribute.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 * @param attribute The new Attribute.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 */
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 void addAttribute(String key, Attribute attribute);
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 /**
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 * Returns an Attribute for the specified <i>key</i>.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 *
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 * @param key The key that is used to retrieve the target Attribute.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 *
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 * @return the Attribute specified by <i>key</i>.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 */
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 Attribute getAttribute(String key);
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 /**
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 * Returns all keys of all Attributes currently stored in this Section.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 *
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 * @return all keys of all Attributes.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 */
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 Set<String> getKeys();
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 /**
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 * Transforms this Section into XML using Attribute.toXML() for each
359
f93edbfcf2bc Improved the Settings and Section interfaces and added default implementations for both.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 358
diff changeset
70 * Attribute and Section.toXML() for each subsection stored in this Section.
358
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 *
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 * @param parent The parent node.
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 */
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 void toXML(Node parent);
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 }
03a8f9796571 Added interfaces for a Settings hierachy currently used for Outputs.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org