comparison flys-artifacts/src/main/java/org/dive4elements/river/exports/EmptySettings.java @ 5831:bd047b71ab37

Repaired internal references
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:06:39 +0200
parents flys-artifacts/src/main/java/de/intevation/flys/exports/EmptySettings.java@4bd3d8bbb60c
children
comparison
equal deleted inserted replaced
5830:160f53ee0870 5831:bd047b71ab37
1 package org.dive4elements.river.exports;
2
3 import org.w3c.dom.Document;
4 import org.w3c.dom.Node;
5
6 import org.dive4elements.artifactdatabase.state.Settings;
7 import org.dive4elements.artifactdatabase.state.Section;
8
9
10 /**
11 * An implementation of <i>Settings</i> that doesn't take new <i>Section</i>s
12 * and that always creates an empty <b>settings</b> DOM node in its
13 * <i>toXML()</i> operation.
14 *
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
16 */
17 public class EmptySettings implements Settings {
18
19 public EmptySettings() {
20 }
21
22
23 /**
24 * This method has no function. It is not implemented!
25 *
26 * @param section A Section.
27 */
28 @Override
29 public void addSection(Section section) {
30 // do nothing
31 }
32
33
34 /**
35 * Always returns 0.
36 *
37 * @return 0.
38 */
39 @Override
40 public int getSectionCount() {
41 return 0;
42 }
43
44
45 /**
46 * This method always returns null. It is not implemented!
47 *
48 * @param pos A position.
49 *
50 * @return null.
51 */
52 @Override
53 public Section getSection(int pos) {
54 return null;
55 }
56
57
58 /**
59 * This method has no function. It is not implemented!
60 */
61 @Override
62 public void removeSection(Section section) {
63 // do nothing
64 }
65
66
67 /**
68 * This method creates an empty <i>settings</i> DOM node.
69 *
70 * @param parent A parent DOM node.
71 */
72 @Override
73 public void toXML(Node parent) {
74 Document owner = parent.getOwnerDocument();
75 parent.appendChild(owner.createElement("settings"));
76 }
77 }
78 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org