Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/YearEpochSelect.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 | 8e66293c5369 |
children |
comparison
equal
deleted
inserted
replaced
4213:0674d89210f5 | 4220:a30647abf009 |
---|---|
4 | 4 |
5 import de.intevation.artifacts.Artifact; | 5 import de.intevation.artifacts.Artifact; |
6 import de.intevation.artifacts.CallContext; | 6 import de.intevation.artifacts.CallContext; |
7 import de.intevation.artifacts.CallMeta; | 7 import de.intevation.artifacts.CallMeta; |
8 import de.intevation.artifacts.common.utils.XMLUtils; | 8 import de.intevation.artifacts.common.utils.XMLUtils; |
9 import de.intevation.flys.artifacts.FLYSArtifact; | |
9 import de.intevation.flys.artifacts.resources.Resources; | 10 import de.intevation.flys.artifacts.resources.Resources; |
10 import de.intevation.flys.artifacts.states.DefaultState; | 11 import de.intevation.flys.artifacts.states.DefaultState; |
11 | 12 |
12 /** | 13 /** |
13 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | 14 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
31 Artifact artifact, | 32 Artifact artifact, |
32 String name, | 33 String name, |
33 CallContext context) | 34 CallContext context) |
34 { | 35 { |
35 CallMeta meta = context.getMeta(); | 36 CallMeta meta = context.getMeta(); |
36 Element[] elements = new Element[2]; | 37 Element[] elements; |
38 if (((FLYSArtifact)artifact).getCurrentStateId() | |
39 .equals("state.minfo.sediment.load.year_epoch") | |
40 ) { | |
41 elements = new Element[3]; | |
42 elements[2] = createItem( | |
43 ec, | |
44 new String[] { | |
45 Resources.getMsg(meta, | |
46 "state.minfo.off_epoch", | |
47 "state.minfo.off_epoch"), | |
48 "off_epoch"}); | |
49 } | |
50 else { | |
51 elements = new Element[2]; | |
52 } | |
37 elements[0] = createItem( | 53 elements[0] = createItem( |
38 ec, | 54 ec, |
39 new String[] { | 55 new String[] { |
40 Resources.getMsg(meta, | 56 Resources.getMsg(meta, |
41 "state.minfo.year", | 57 "state.minfo.year", |
48 Resources.getMsg(meta, | 64 Resources.getMsg(meta, |
49 "state.minfo.epoch", | 65 "state.minfo.epoch", |
50 "state.minfo.epoch"), | 66 "state.minfo.epoch"), |
51 "epoch"}); | 67 "epoch"}); |
52 | 68 |
53 return elements; | 69 return elements; |
54 } | 70 } |
55 } | 71 } |
56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 72 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |