annotate flys-artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadUnit.java @ 5831:bd047b71ab37

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

http://dive4elements.wald.intevation.org