9274
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
|
2 * Software engineering by Intevation GmbH |
|
3 * |
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
|
6 * documentation coming with Dive4Elements River for details. |
|
7 */ |
|
8 |
|
9 package org.dive4elements.river.artifacts.bundu.bezugswst; |
|
10 |
|
11 import java.util.LinkedHashMap; |
|
12 |
|
13 import org.dive4elements.artifactdatabase.data.StateData; |
|
14 import org.dive4elements.artifacts.Artifact; |
|
15 import org.dive4elements.artifacts.CallContext; |
|
16 import org.dive4elements.artifacts.CallMeta; |
|
17 import org.dive4elements.artifacts.common.utils.XMLUtils; |
|
18 import org.dive4elements.river.artifacts.states.RadioSelect; |
|
19 import org.dive4elements.river.artifacts.uinfo.salix.ScenarioTypeState; |
|
20 import org.w3c.dom.Element; |
|
21 |
|
22 /** |
|
23 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
|
24 */ |
|
25 public class CalcChoice extends RadioSelect { |
|
26 private static final long serialVersionUID = 1L; |
|
27 |
|
28 @Override |
|
29 protected final String getUIProvider() { |
9292
|
30 return "bundu_calc_choice_radio_panel"; |
9274
|
31 } |
|
32 |
|
33 @Override |
|
34 protected LinkedHashMap<String, String> makeEntries(final CallMeta meta, final Artifact artifact) { |
|
35 final LinkedHashMap<String, String> entries = new LinkedHashMap<>(); |
9366
|
36 entries.put("state.bundu.wst.calc.auto", null); |
|
37 entries.put("state.bundu.wst.calc.manual", null); |
9274
|
38 return entries; |
|
39 } |
|
40 |
|
41 @Override |
|
42 protected Element createData(final XMLUtils.ElementCreator cr, final Artifact artifact, final StateData data, final CallContext context) { |
|
43 return ScenarioTypeState.changeHeaderForCurrentState("state.bundu.wst.calc_choice", data.getName(), cr, context); |
|
44 } |
|
45 |
9369
|
46 @Override |
|
47 protected String getDatakey() { |
|
48 return "calc_choice"; |
|
49 } |
|
50 |
9274
|
51 } |