Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadUnit.java @ 4220:a30647abf009
Added config and states for sediment load calculation in MINFO module.
The config describes the transitions and states for parameter input in sediment
load calculation.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 23 Oct 2012 09:53:02 +0200 |
parents | |
children | c6db11e3b83a |
comparison
equal
deleted
inserted
replaced
4213:0674d89210f5 | 4220:a30647abf009 |
---|---|
1 package de.intevation.flys.artifacts.states.minfo; | |
2 | |
3 import org.apache.log4j.Logger; | |
4 import org.w3c.dom.Element; | |
5 | |
6 import de.intevation.artifacts.Artifact; | |
7 import de.intevation.artifacts.CallContext; | |
8 import de.intevation.artifacts.CallMeta; | |
9 import de.intevation.artifacts.common.utils.XMLUtils; | |
10 import de.intevation.flys.artifacts.FLYSArtifact; | |
11 import de.intevation.flys.artifacts.resources.Resources; | |
12 import de.intevation.flys.artifacts.states.DefaultState; | |
13 | |
14 | |
15 public class SedimentLoadUnit | |
16 extends DefaultState | |
17 { | |
18 /** The logger used in this class. */ | |
19 private static Logger logger = Logger.getLogger(SedimentLoadUnit.class); | |
20 | |
21 | |
22 /** | |
23 * The default constructor that initializes an empty State object. | |
24 */ | |
25 public SedimentLoadUnit() { | |
26 } | |
27 | |
28 @Override | |
29 protected String getUIProvider() { | |
30 return "minfo.sedimentload_unit_select"; | |
31 } | |
32 | |
33 @Override | |
34 protected Element[] createItems( | |
35 XMLUtils.ElementCreator ec, | |
36 Artifact artifact, | |
37 String name, | |
38 CallContext context) | |
39 { | |
40 CallMeta meta = context.getMeta(); | |
41 Element[] elements = new Element[2]; | |
42 elements[0] = createItem( | |
43 ec, | |
44 new String[] { | |
45 Resources.getMsg(meta, | |
46 "state.minfo.t_per_a", | |
47 "state.minfo.t_per_a"), | |
48 "t_per_a"}); | |
49 | |
50 elements[1] = createItem( | |
51 ec, | |
52 new String[] { | |
53 Resources.getMsg(meta, | |
54 "state.minfo.m3_per_a", | |
55 "state.minfo.m3_per_a"), | |
56 "m3_per_a"}); | |
57 | |
58 return elements; | |
59 } | |
60 } |