ingo@358: package de.intevation.artifactdatabase.state; ingo@358: ingo@358: import java.io.Serializable; ingo@358: import java.util.Set; ingo@358: ingo@358: import org.w3c.dom.Node; ingo@358: ingo@358: ingo@358: /** ingo@358: * @author Ingo Weinzierl ingo@358: */ ingo@358: public interface Section extends Serializable { ingo@358: ingo@358: /** ingo@358: * Adds a new Attribute to this Section. ingo@358: * ingo@358: * @param key The key that is used to store/retrieve the Attribute. ingo@358: * @param attribute The new Attribute. ingo@358: */ ingo@358: void addAttribute(String key, Attribute attribute); ingo@358: ingo@358: /** ingo@358: * Returns an Attribute for the specified key. ingo@358: * ingo@358: * @param key The key that is used to retrieve the target Attribute. ingo@358: * ingo@358: * @return the Attribute specified by key. ingo@358: */ ingo@358: Attribute getAttribute(String key); ingo@358: ingo@358: /** ingo@358: * Returns all keys of all Attributes currently stored in this Section. ingo@358: * ingo@358: * @return all keys of all Attributes. ingo@358: */ ingo@358: Set getKeys(); ingo@358: ingo@358: /** ingo@358: * Transforms this Section into XML using Attribute.toXML() for each ingo@358: * Attribute stored in this Section. ingo@358: * ingo@358: * @param parent The parent node. ingo@358: */ ingo@358: void toXML(Node parent); ingo@358: } ingo@358: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :