comparison flys-artifacts/src/main/java/de/intevation/flys/exports/EmptySettings.java @ 3814:8083f6384023

merged flys-artifacts/pre2.6-2012-01-04
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:56 +0200
parents 3632150dbe0b
children 4bd3d8bbb60c
comparison
equal deleted inserted replaced
1491:2a00f4849738 3814:8083f6384023
1 package de.intevation.flys.exports;
2
3 import org.w3c.dom.Document;
4 import org.w3c.dom.Node;
5
6 import de.intevation.artifactdatabase.state.Settings;
7 import de.intevation.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 }

http://dive4elements.wald.intevation.org