Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/state/Section.java @ 359:f93edbfcf2bc
Improved the Settings and Section interfaces and added default implementations for both.
artifacts/trunk@3416 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 14 Dec 2011 12:20:06 +0000 |
parents | 03a8f9796571 |
children |
comparison
equal
deleted
inserted
replaced
358:03a8f9796571 | 359:f93edbfcf2bc |
---|---|
8 | 8 |
9 /** | 9 /** |
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
11 */ | 11 */ |
12 public interface Section extends Serializable { | 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); | |
13 | 43 |
14 /** | 44 /** |
15 * Adds a new Attribute to this Section. | 45 * Adds a new Attribute to this Section. |
16 * | 46 * |
17 * @param key The key that is used to store/retrieve the Attribute. | 47 * @param key The key that is used to store/retrieve the Attribute. |
35 */ | 65 */ |
36 Set<String> getKeys(); | 66 Set<String> getKeys(); |
37 | 67 |
38 /** | 68 /** |
39 * Transforms this Section into XML using Attribute.toXML() for each | 69 * Transforms this Section into XML using Attribute.toXML() for each |
40 * Attribute stored in this Section. | 70 * Attribute and Section.toXML() for each subsection stored in this Section. |
41 * | 71 * |
42 * @param parent The parent node. | 72 * @param parent The parent node. |
43 */ | 73 */ |
44 void toXML(Node parent); | 74 void toXML(Node parent); |
45 } | 75 } |