annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadUnit.java @ 9801:1d7a72a50183 3.2.x tip

Assume Compose V2, consistently
author Tom Gottfried <tom@intevation.de>
date Thu, 23 Nov 2023 10:14:13 +0100
parents 0a5239a1e46e
children
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
9 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
10
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
11 import org.apache.logging.log4j.Logger;
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
12 import org.apache.logging.log4j.LogManager;
4220
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 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
14
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
15 import org.dive4elements.artifacts.Artifact;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
16 import org.dive4elements.artifacts.CallContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
17 import org.dive4elements.artifacts.CallMeta;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
18 import org.dive4elements.artifacts.common.utils.XMLUtils;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
19 import org.dive4elements.river.artifacts.resources.Resources;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4344
diff changeset
20 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
21
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 public class SedimentLoadUnit
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 extends DefaultState
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 {
8202
e4606eae8ea5 sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
26 /** The log used in this class. */
9726
0a5239a1e46e Upgrade to Log4j 2
Tom Gottfried <tom@intevation.de>
parents: 8202
diff changeset
27 private static Logger log = LogManager.getLogger(SedimentLoadUnit.class);
4220
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29
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 * 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
32 */
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 public SedimentLoadUnit() {
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34 }
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
36 @Override
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 protected String getUIProvider() {
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
38 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
39 }
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41 @Override
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
42 protected Element[] createItems(
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
43 XMLUtils.ElementCreator ec,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44 Artifact artifact,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
45 String name,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 CallContext context)
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47 {
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48 CallMeta meta = context.getMeta();
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
49 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
50 elements[0] = createItem(
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
51 ec,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52 new String[] {
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
53 Resources.getMsg(meta,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
54 "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
55 "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
56 "t_per_a"});
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
57
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
58 elements[1] = createItem(
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
59 ec,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
60 new String[] {
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
61 Resources.getMsg(meta,
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
62 "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
63 "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
64 "m3_per_a"});
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
65
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
66 return elements;
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
67 }
a30647abf009 Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
68 }

http://dive4elements.wald.intevation.org