Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/org/dive4elements/artifactdatabase/state/Section.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/Section.java@f93edbfcf2bc |
children | 415df0fc4fa1 |
comparison
equal
deleted
inserted
replaced
472:783cc1b6b615 | 473:d0ac790a6c89 |
---|---|
1 package de.intevation.artifactdatabase.state; | |
2 | |
3 import java.io.Serializable; | |
4 import java.util.Set; | |
5 | |
6 import org.w3c.dom.Node; | |
7 | |
8 | |
9 /** | |
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
11 */ | |
12 public interface Section extends Serializable { | |
13 | |
14 /** | |
15 * Returns an ID for this Section. | |
16 * | |
17 * @return an ID for this Section. | |
18 */ | |
19 String getId(); | |
20 | |
21 /** | |
22 * Adds a new subsection to this Section object. | |
23 * | |
24 * @param subsection the new Section. | |
25 */ | |
26 void addSubsection(Section subsection); | |
27 | |
28 /** | |
29 * Returns the number of subsections in this Section. | |
30 * | |
31 * @return the number of subsections. | |
32 */ | |
33 int getSubsectionCount(); | |
34 | |
35 /** | |
36 * Returns a subsection at position <i>pos</i>. | |
37 * | |
38 * @param pos The position of the target subsection. | |
39 * | |
40 * @return the subsection at position <i>pos</i>. | |
41 */ | |
42 Section getSubsection(int pos); | |
43 | |
44 /** | |
45 * Adds a new Attribute to this Section. | |
46 * | |
47 * @param key The key that is used to store/retrieve the Attribute. | |
48 * @param attribute The new Attribute. | |
49 */ | |
50 void addAttribute(String key, Attribute attribute); | |
51 | |
52 /** | |
53 * Returns an Attribute for the specified <i>key</i>. | |
54 * | |
55 * @param key The key that is used to retrieve the target Attribute. | |
56 * | |
57 * @return the Attribute specified by <i>key</i>. | |
58 */ | |
59 Attribute getAttribute(String key); | |
60 | |
61 /** | |
62 * Returns all keys of all Attributes currently stored in this Section. | |
63 * | |
64 * @return all keys of all Attributes. | |
65 */ | |
66 Set<String> getKeys(); | |
67 | |
68 /** | |
69 * Transforms this Section into XML using Attribute.toXML() for each | |
70 * Attribute and Section.toXML() for each subsection stored in this Section. | |
71 * | |
72 * @param parent The parent node. | |
73 */ | |
74 void toXML(Node parent); | |
75 } | |
76 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |