Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoad.java @ 6989:2b022ca95b3b
Removed obsolete imports.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 11 Sep 2013 15:30:38 +0200 |
parents | 7be97faf5848 |
children | 998a9710007e |
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 |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 |
5787 | 21 /** 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
|
22 public class SedimentLoad |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 extends NamedObjectImpl |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 protected String description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 protected Date start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 protected Date end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 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
|
29 protected String unit; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 |
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
|
31 protected Map<Double, SedimentLoadFraction> kms; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 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
|
34 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
|
35 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 public SedimentLoad( |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 String description, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 Date start, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 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
|
41 boolean isEpoch, |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
42 String unit |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
43 ) { |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
44 this(); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
45 this.description = description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 this.start = start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 this.end = end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 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
|
49 this.unit = unit; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
50 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 public String getDescription() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 return description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
56 public void setDescription(String description) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
57 this.description = description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
60 public Date getStart() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
61 return start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
62 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
63 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
64 public void setStart(Date start) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
65 this.start = start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
68 public Date getEnd() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
69 return end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
70 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
71 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
72 public void setEnd(Date end) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
73 this.end = end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
74 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
75 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
76 public boolean isEpoch() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
77 return isEpoch; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
78 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
79 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 public void setEpoch(boolean isEpoch) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
81 this.isEpoch = isEpoch; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
82 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
83 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
84 public Set<Double> getKms() { |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
85 return kms.keySet(); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
86 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
87 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
88 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
|
89 kms.put(km, fraction); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
90 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
91 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
92 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
|
93 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
|
94 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
|
95 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
|
96 kms.put(km, f); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
97 } |
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
|
98 return f; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
99 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
100 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
101 public void setCoarse(double km, double coarse, Range 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
|
102 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
|
103 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
|
104 f.setCoarseRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
105 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
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 setFineMiddle(double km, double fine_middle, Range 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
|
108 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
|
109 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
|
110 f.setFineMiddleRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
111 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
112 |
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
|
113 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
114 public void setSand(double km, double sand, Range 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
|
115 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
|
116 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
|
117 f.setSandRange(range); |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
118 } |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
119 |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
120 public void setSuspSand(double km, double susp_sand, Range 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
|
121 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
|
122 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
|
123 f.setSuspSandRange(range); |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
124 } |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
125 |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
126 public void setSuspSandBed(double km, double susp_sand_bed, Range 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
|
127 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
|
128 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
|
129 f.setSuspSandBedRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
130 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
131 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
132 public void setSuspSediment(double km, double susp_sediment, Range 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
|
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.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
|
135 f.setSuspSedimentRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
136 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
137 |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
138 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
|
139 setLoadTotal(km, total, null); |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
140 } |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
141 |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
142 public void setLoadTotal(double km, double total, Range 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
|
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.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
|
145 f.setLoadTotalRange(range); |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
146 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
147 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
148 public void setTotal(double km, double total, Range 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
|
149 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
|
150 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
|
151 f.setTotalRange(range); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
152 } |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
153 |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
154 public void setUnknown(double km, double unknown, Range 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
|
155 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
|
156 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
|
157 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
|
158 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
159 |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
160 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
|
161 return unit; |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
162 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
163 |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
164 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
|
165 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
|
166 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
167 |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
168 public boolean hasCoarse() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
169 for (SedimentLoadFraction slf : kms.values()) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
170 if (slf.getCoarse() > 0d) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
171 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
172 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
173 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
174 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
175 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
176 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
177 public boolean hasFineMiddle() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
178 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
179 if (slf.getFineMiddle() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
180 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
181 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
182 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
183 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
184 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
185 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
186 public boolean hasSand() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
187 for (SedimentLoadFraction slf : kms.values()) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
188 if (slf.getSand() > 0d) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
189 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
190 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
191 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
192 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
193 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
194 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
195 public boolean hasSuspSand() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
196 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
197 if (slf.getSuspSand() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
198 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
199 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
200 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
201 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
202 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
203 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
204 public boolean hasSuspSediment() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
205 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
206 if (slf.getSuspSediment() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
207 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
208 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
209 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
210 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
211 } |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
212 |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
213 public boolean hasTotalLoad() { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
214 for (SedimentLoadFraction slf : kms.values()) { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
215 if (slf.getLoadTotal() > 0d) { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
216 return true; |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
217 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
218 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
219 return false; |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
220 } |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
221 } |
5662
7e3cde8b564c
Cosmetics, docs, vimlines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4551
diff
changeset
|
222 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |