Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/ScenarioTypeState.java @ 9271:f48a8dc78529
uinfo.salix details
author | gernotbelger |
---|---|
date | Thu, 19 Jul 2018 13:39:27 +0200 |
parents | 2f5052835b76 |
children | 1b2623dff742 |
comparison
equal
deleted
inserted
replaced
9270:7337034eb5d5 | 9271:f48a8dc78529 |
---|---|
1 | 1 |
2 package org.dive4elements.river.artifacts.uinfo.salix; | 2 package org.dive4elements.river.artifacts.uinfo.salix; |
3 | 3 |
4 import java.util.LinkedHashMap; | 4 import java.util.LinkedHashMap; |
5 | 5 |
6 import org.dive4elements.artifactdatabase.ProtocolUtils; | |
7 import org.dive4elements.artifactdatabase.data.StateData; | |
6 import org.dive4elements.artifacts.Artifact; | 8 import org.dive4elements.artifacts.Artifact; |
9 import org.dive4elements.artifacts.CallContext; | |
7 import org.dive4elements.artifacts.CallMeta; | 10 import org.dive4elements.artifacts.CallMeta; |
11 import org.dive4elements.artifacts.common.utils.XMLUtils; | |
12 import org.dive4elements.river.artifacts.resources.Resources; | |
8 import org.dive4elements.river.artifacts.states.RadioSelect; | 13 import org.dive4elements.river.artifacts.states.RadioSelect; |
14 import org.w3c.dom.Element; | |
9 | 15 |
10 /** | 16 /** |
11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
12 */ | 18 */ |
13 public class ScenarioTypeState extends RadioSelect { | 19 public class ScenarioTypeState extends RadioSelect { |
24 entries.put("scenarioType.option2", null); | 30 entries.put("scenarioType.option2", null); |
25 entries.put("scenarioType.option3", null); | 31 entries.put("scenarioType.option3", null); |
26 return entries; | 32 return entries; |
27 | 33 |
28 } | 34 } |
35 | |
36 @Override | |
37 protected Element createData(final XMLUtils.ElementCreator cr, final Artifact artifact, final StateData data, final CallContext context) { | |
38 final Element select = ProtocolUtils.createArtNode(cr, "select", null, null); | |
39 | |
40 cr.addAttr(select, "name", data.getName(), true); | |
41 | |
42 final Element label = ProtocolUtils.createArtNode(cr, "label", null, null); | |
43 | |
44 label.setTextContent(Resources.getMsg(context.getMeta(), "state.uinfo.load.scenario_type")); | |
45 | |
46 final Element description = ProtocolUtils.createArtNode(cr, "description", null, null); | |
47 description.setTextContent("TEST"); | |
48 select.appendChild(description); | |
49 select.appendChild(label); | |
50 | |
51 return select; | |
52 } | |
29 } | 53 } |