comparison artifacts/src/main/java/org/dive4elements/river/exports/EmptySettings.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/exports/EmptySettings.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
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