Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadUnit.java @ 8653:dbec49147f54
(issue1755) Do not create interpolated themes and disable export of non interpolatable data.
Due to the fact that data can contain NaN's which will be filtered out
before creating the interpolator this requires the actual check
for interpolatable data when data is set in the ResultValue
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 01 Apr 2015 17:10:03 +0200 |
parents | e4606eae8ea5 |
children | 0a5239a1e46e |
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 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 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
|
12 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
|
13 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4344
diff
changeset
|
14 import org.dive4elements.artifacts.Artifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4344
diff
changeset
|
15 import org.dive4elements.artifacts.CallContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4344
diff
changeset
|
16 import org.dive4elements.artifacts.CallMeta; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4344
diff
changeset
|
17 import org.dive4elements.artifacts.common.utils.XMLUtils; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4344
diff
changeset
|
18 import org.dive4elements.river.artifacts.resources.Resources; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4344
diff
changeset
|
19 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
|
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 public class SedimentLoadUnit |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 extends DefaultState |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 { |
8202
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
25 /** The log used in this class. */ |
e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5994
diff
changeset
|
26 private static Logger log = Logger.getLogger(SedimentLoadUnit.class); |
4220
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 |
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 * 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
|
31 */ |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 public SedimentLoadUnit() { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 } |
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 @Override |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 protected String getUIProvider() { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 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
|
38 } |
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 @Override |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 protected Element[] createItems( |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 XMLUtils.ElementCreator ec, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 Artifact artifact, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 String name, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 CallContext context) |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 CallMeta meta = context.getMeta(); |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 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
|
49 elements[0] = 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.t_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.t_per_a"), |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 "t_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 elements[1] = createItem( |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 ec, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 new String[] { |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
60 Resources.getMsg(meta, |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
61 "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
|
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 "m3_per_a"}); |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
64 |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
65 return elements; |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 } |
a30647abf009
Added config and states for sediment load calculation in MINFO module.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 } |