Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoad.java @ 7297:257d72524249
doc fix <3 .
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 11 Oct 2013 12:44:25 +0200 |
parents | 998a9710007e |
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:
5787
diff
changeset
|
9 package org.dive4elements.river.artifacts.model.minfo; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import java.util.Date; |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
12 import java.util.Map; |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
13 import java.util.Set; |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
14 import java.util.TreeMap; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5787
diff
changeset
|
16 import org.dive4elements.river.artifacts.model.NamedObjectImpl; |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
17 import org.dive4elements.river.artifacts.model.Range; |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
18 import org.dive4elements.river.utils.EpsilonComparator; |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
19 |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
20 import org.apache.log4j.Logger; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
21 |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 |
5787 | 23 /** Gives access to Fractions (at kms). */ |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 public class SedimentLoad |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 extends NamedObjectImpl |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
27 /** Private logger. */ |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
28 private static final Logger logger = Logger |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
29 .getLogger(SedimentLoad.class); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
30 |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 protected String description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 protected Date start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 protected Date end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 protected boolean isEpoch; |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
35 protected String unit; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
37 protected Map<Double, SedimentLoadFraction> kms; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 public SedimentLoad() { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
40 kms = new TreeMap<Double, SedimentLoadFraction>(EpsilonComparator.CMP); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 public SedimentLoad( |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 String description, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 Date start, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 Date end, |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
47 boolean isEpoch, |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
48 String unit |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 ) { |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
50 this(); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 this.description = description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 this.start = start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 this.end = end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 this.isEpoch = isEpoch; |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
55 this.unit = unit; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
56 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
57 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 public String getDescription() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 return description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
60 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
61 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
62 public void setDescription(String description) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
63 this.description = description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
64 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
65 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 public Date getStart() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 return start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
68 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
69 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
70 public void setStart(Date start) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
71 this.start = start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
72 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
73 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
74 public Date getEnd() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
75 return end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
76 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
77 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
78 public void setEnd(Date end) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
79 this.end = end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
81 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
82 public boolean isEpoch() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
83 return isEpoch; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
84 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
85 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
86 public void setEpoch(boolean isEpoch) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
87 this.isEpoch = isEpoch; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
88 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
89 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
90 public Set<Double> getKms() { |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
91 return kms.keySet(); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
92 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
93 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
94 public void addKm(double km, SedimentLoadFraction fraction) { |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
95 kms.put(km, fraction); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
96 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
97 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
98 public SedimentLoadFraction getFraction(double km) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
99 SedimentLoadFraction f = kms.get(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
100 if (f == null) { |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
101 f = new SedimentLoadFraction(); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
102 kms.put(km, f); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
103 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
104 return f; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
105 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
106 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
107 public void setCoarse(double km, double coarse, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
108 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
109 logger.error("coarse/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
110 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
111 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
112 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
113 f.setCoarse(coarse); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
114 f.setCoarseRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
115 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
116 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
117 public void setFineMiddle(double km, double fine_middle, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
118 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
119 logger.error("finemiddle/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
120 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
121 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
122 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
123 f.setFineMiddle(fine_middle); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
124 f.setFineMiddleRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
125 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
126 |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
127 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
128 public void setSand(double km, double sand, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
129 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
130 logger.error("sand/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
131 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
132 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
133 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
134 f.setSand(sand); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
135 f.setSandRange(range); |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
136 } |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
137 |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
138 public void setSuspSand(double km, double susp_sand, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
139 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
140 logger.error("suspsand/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
141 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
142 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
143 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
144 f.setSuspSand(susp_sand); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
145 f.setSuspSandRange(range); |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
146 } |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
147 |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
148 public void setSuspSandBed(double km, double susp_sand_bed, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
149 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
150 logger.error("suspsandbed/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
151 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
152 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
153 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
154 f.setSuspSandBed(susp_sand_bed); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
155 f.setSuspSandBedRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
156 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
157 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
158 public void setSuspSediment(double km, double susp_sediment, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
159 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
160 logger.error("suspsed/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
161 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
162 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
163 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
164 f.setSuspSediment(susp_sediment); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
165 f.setSuspSedimentRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
166 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
167 |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
168 public void setLoadTotal(double km, double total) { |
6952
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
169 setLoadTotal(km, total, null); |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
170 } |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
171 |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
172 public void setLoadTotal(double km, double total, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
173 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
174 logger.error("loadtotal/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
175 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
176 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
177 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
178 f.setLoadTotal(total); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
179 f.setLoadTotalRange(range); |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
180 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
181 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
182 public void setTotal(double km, double total, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
183 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
184 logger.error("total/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
185 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
186 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
187 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
188 f.setTotal(total); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
189 f.setTotalRange(range); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
190 } |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
191 |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
192 public void setUnknown(double km, double unknown, Range range) { |
7013
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
193 if (range == null) { |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
194 logger.error("unknown/range is null!"); |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
195 return; |
998a9710007e
issue1465: Do not allow null ranges for fraction values, logger.error instead.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6989
diff
changeset
|
196 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
197 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
198 f.setUnknown(unknown); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
199 f.setUnknownRange(range); |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
200 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
201 |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
202 public String getUnit() { |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
203 return unit; |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
204 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
205 |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
206 public void setUnit(String unit) { |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
207 this.unit = unit; |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
208 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
209 |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
210 public boolean hasCoarse() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
211 for (SedimentLoadFraction slf : kms.values()) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
212 if (slf.getCoarse() > 0d) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
213 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
214 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
215 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
216 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
217 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
218 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
219 public boolean hasFineMiddle() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
220 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
221 if (slf.getFineMiddle() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
222 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
223 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
224 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
225 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
226 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
227 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
228 public boolean hasSand() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
229 for (SedimentLoadFraction slf : kms.values()) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
230 if (slf.getSand() > 0d) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
231 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
232 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
233 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
234 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
235 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
236 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
237 public boolean hasSuspSand() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
238 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
239 if (slf.getSuspSand() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
240 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
241 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
242 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
243 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
244 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
245 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
246 public boolean hasSuspSediment() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
247 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
248 if (slf.getSuspSediment() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
249 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
250 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
251 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
252 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
253 } |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
254 |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
255 public boolean hasTotalLoad() { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
256 for (SedimentLoadFraction slf : kms.values()) { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
257 if (slf.getLoadTotal() > 0d) { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
258 return true; |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
259 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
260 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
261 return false; |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
262 } |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
263 } |
5662
7e3cde8b564c
Cosmetics, docs, vimlines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4551
diff
changeset
|
264 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |