comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/fixation/AnalysisPeriods.java @ 2651:9e9eb9d97548

Initial transition configuration and artifact/state stubs for fixation analysis. flys-artifacts/trunk@4312 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 26 Apr 2012 15:08:51 +0000
parents
children 15523818eae4
comparison
equal deleted inserted replaced
2650:a6fa128e4654 2651:9e9eb9d97548
1 package de.intevation.flys.artifacts.states.fixation;
2
3 import org.apache.log4j.Logger;
4
5 import org.w3c.dom.Element;
6 import org.w3c.dom.Node;
7
8 import de.intevation.artifacts.Artifact;
9 import de.intevation.artifacts.CallContext;
10
11 import de.intevation.artifacts.common.utils.XMLUtils;
12
13 import de.intevation.artifactdatabase.ProtocolUtils;
14 import de.intevation.artifactdatabase.data.StateData;
15
16 import de.intevation.flys.artifacts.FLYSArtifact;
17 import de.intevation.flys.artifacts.resources.Resources;
18 import de.intevation.flys.artifacts.states.DefaultState;
19
20
21 /**
22 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
23 */
24 public class AnalysisPeriods extends DefaultState {
25
26 /** The logger used in this class. */
27 private static Logger logger = Logger.getLogger(AnalysisPeriods.class);
28
29
30 /**
31 * The default constructor that initializes an empty State object.
32 */
33 public AnalysisPeriods() {
34 }
35
36
37 /**
38 * Initialize the state based on the state node in the configuration.
39 *
40 * @param config The state configuration node.
41 */
42 public void setup(Node config) {
43 super.setup(config);
44 }
45
46
47 protected Element createData(
48 XMLUtils.ElementCreator cr,
49 Artifact artifact,
50 StateData data,
51 CallContext context)
52 {
53 Element select = ProtocolUtils.createArtNode(
54 cr, "select",
55 new String[] { "uiprovider" },
56 new String[] { "time_range_selector" });
57 cr.addAttr(select, "name", data.getName(), true);
58
59 Element label = ProtocolUtils.createArtNode(
60 cr, "label", null, null);
61
62 select.appendChild(label);
63
64 label.setTextContent(Resources.getMsg(
65 context.getMeta(),
66 getID(),
67 getID()));
68
69 return select;
70 }
71
72
73 @Override
74 protected Element[] createItems(
75 XMLUtils.ElementCreator cr,
76 Artifact artifact,
77 String name,
78 CallContext context)
79 {
80 return null;
81 }
82
83
84 protected Object getLower(FLYSArtifact artifact) {
85 return null;
86 }
87
88
89 protected Object getUpper(FLYSArtifact artifact) {
90 return null;
91 }
92
93
94 @Override
95 protected String getUIProvider() {
96 return "time_range_selector";
97 }
98 }
99 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org