Mercurial > dive4elements > framework
diff 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 |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/Section.java Wed Dec 14 09:41:44 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/Section.java Wed Dec 14 12:20:06 2011 +0000 @@ -12,6 +12,36 @@ public interface Section extends Serializable { /** + * Returns an ID for this Section. + * + * @return an ID for this Section. + */ + String getId(); + + /** + * Adds a new subsection to this Section object. + * + * @param subsection the new Section. + */ + void addSubsection(Section subsection); + + /** + * Returns the number of subsections in this Section. + * + * @return the number of subsections. + */ + int getSubsectionCount(); + + /** + * Returns a subsection at position <i>pos</i>. + * + * @param pos The position of the target subsection. + * + * @return the subsection at position <i>pos</i>. + */ + Section getSubsection(int pos); + + /** * Adds a new Attribute to this Section. * * @param key The key that is used to store/retrieve the Attribute. @@ -37,7 +67,7 @@ /** * Transforms this Section into XML using Attribute.toXML() for each - * Attribute stored in this Section. + * Attribute and Section.toXML() for each subsection stored in this Section. * * @param parent The parent node. */