Mercurial > dive4elements > river
annotate 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 |
rev | line source |
---|---|
9036 | 1 |
2 package org.dive4elements.river.artifacts.uinfo.salix; | |
3 | |
9178
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
4 import java.util.LinkedHashMap; |
9062 | 5 |
9271 | 6 import org.dive4elements.artifactdatabase.ProtocolUtils; |
7 import org.dive4elements.artifactdatabase.data.StateData; | |
9178
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
8 import org.dive4elements.artifacts.Artifact; |
9271 | 9 import org.dive4elements.artifacts.CallContext; |
9178
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
10 import org.dive4elements.artifacts.CallMeta; |
9271 | 11 import org.dive4elements.artifacts.common.utils.XMLUtils; |
12 import org.dive4elements.river.artifacts.resources.Resources; | |
9062 | 13 import org.dive4elements.river.artifacts.states.RadioSelect; |
9271 | 14 import org.w3c.dom.Element; |
9036 | 15 |
16 /** | |
17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
18 */ | |
9062 | 19 public class ScenarioTypeState extends RadioSelect { |
9036 | 20 private static final long serialVersionUID = 1L; |
21 | |
22 public ScenarioTypeState() { | |
9062 | 23 super(); |
9036 | 24 } |
25 | |
9062 | 26 @Override |
9178
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
27 protected LinkedHashMap<String, String> makeEntries(final CallMeta meta, final Artifact artifact) { |
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
28 final LinkedHashMap<String, String> entries = new LinkedHashMap<>(); |
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
29 entries.put("scenarioType.option1", null); |
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
30 entries.put("scenarioType.option2", null); |
2f5052835b76
uinfo inundationduration langjähr. Mittel, Uedauern.properties, Meldung
gernotbelger
parents:
9062
diff
changeset
|
31 entries.put("scenarioType.option3", null); |
9062 | 32 return entries; |
33 | |
34 } | |
9271 | 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 } | |
9036 | 53 } |