comparison flys-artifacts/src/main/java/de/intevation/flys/exports/EmptySettings.java @ 1979:a7c437c9547e

Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing. flys-artifacts/trunk@3409 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 14 Dec 2011 10:20:56 +0000
parents
children 3632150dbe0b
comparison
equal deleted inserted replaced
1978:4c10a4cb978f 1979:a7c437c9547e
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 creates an empty <i>settings</i> DOM node.
60 *
61 * @param parent A parent DOM node.
62 */
63 @Override
64 public void toXML(Node parent) {
65 Document owner = parent.getOwnerDocument();
66 parent.appendChild(owner.createElement("art:settings"));
67 }
68 }

http://dive4elements.wald.intevation.org