comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthRow.java @ 8915:d9dbf0b74bc2

Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
author gernotbelger
date Wed, 28 Feb 2018 17:27:15 +0100
parents cc86b0f9b3c3
children 82998242ba84
comparison
equal deleted inserted replaced
8914:e3519c3e7a0a 8915:d9dbf0b74bc2
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the 7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
8 * documentation coming with Dive4Elements River for details. 8 * documentation coming with Dive4Elements River for details.
9 */ 9 */
10 package org.dive4elements.river.artifacts.sinfo.flowdepth; 10 package org.dive4elements.river.artifacts.sinfo.flowdepth;
11 11
12 import java.io.Serializable; 12 import org.dive4elements.river.artifacts.sinfo.common.AbstractSInfoResultRow;
13 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.Tkh;
13 14
14 /** 15 /**
15 * Part of {@link FlowDepthCalculationResult} which represents one calculated row of flow depth data. 16 * Part of {@link FlowDepthCalculationResult} which represents one calculated row of flow depth data.
16 * 17 *
17 * @author Gernot Belger 18 * @author Gernot Belger
18 */ 19 */
19 final class FlowDepthRow implements Serializable { 20 final class FlowDepthRow extends AbstractSInfoResultRow {
20 private static final long serialVersionUID = 1L; 21 private static final long serialVersionUID = 1L;
21
22 private final double station;
23 22
24 private final double flowDepth; 23 private final double flowDepth;
25 24
26 private final double flowDepthWithTkh; 25 private final double flowDepthWithTkh;
27 26
28 private final SoilKind tkhKind; 27 private final String soundingLabel;
29 28
30 private final double tkh; 29 public FlowDepthRow(final double flowDepth, final double flowDepthWithTkh, final Tkh tkh, final String waterlevelLabel,
30 final String gauge, final String soundingLabel, final String location) {
31 31
32 private final double tkhUp; 32 super(tkh, waterlevelLabel, gauge, location);
33 33
34 private final double tkhDown;
35
36 private final double waterlevel;
37
38 private final double discharge;
39
40 private final String waterlevelLabel;
41
42 private final String gauge;
43
44 private final double meanBedHeight;
45
46 private final String soundageLabel;
47
48 private final String location;
49
50 public FlowDepthRow(final double station, final double flowDepth, final double flowDepthWithTkh, final SoilKind tkhKind, final double tkh,
51 final double tkhUp, final double tkhDown,
52 final double waterlevel, final double discharge, final String waterlevelLabel, final String gauge, final double meanBedHeight,
53 final String soundageLabel, final String location) {
54 this.station = station;
55 this.flowDepth = flowDepth; 34 this.flowDepth = flowDepth;
56 this.flowDepthWithTkh = flowDepthWithTkh; 35 this.flowDepthWithTkh = flowDepthWithTkh;
57 this.tkhKind = tkhKind; 36 this.soundingLabel = soundingLabel;
58 this.tkh = tkh;
59 this.tkhUp = tkhUp;
60 this.tkhDown = tkhDown;
61 this.waterlevel = waterlevel;
62 this.discharge = discharge;
63 this.waterlevelLabel = waterlevelLabel;
64 this.gauge = gauge;
65 this.meanBedHeight = meanBedHeight;
66 this.soundageLabel = soundageLabel;
67 this.location = location;
68 }
69
70 public double getStation() {
71 return this.station;
72 } 37 }
73 38
74 public double getFlowDepth() { 39 public double getFlowDepth() {
75 return this.flowDepth; 40 return this.flowDepth;
76 } 41 }
77 42
78 public double getFlowDepthWithTkh() { 43 public double getFlowDepthWithTkh() {
79 return this.flowDepthWithTkh; 44 return this.flowDepthWithTkh;
80 } 45 }
81 46
82 public SoilKind getTkhKind() {
83 return this.tkhKind;
84 }
85
86 public double getTkh() {
87 return this.tkh;
88 }
89
90 public double getTkhUp() {
91 return this.tkhUp;
92 }
93
94 public double getTkhDown() {
95 return this.tkhDown;
96 }
97
98 public double getWaterlevel() {
99 return this.waterlevel;
100 }
101
102 public double getDischarge() {
103 return this.discharge;
104 }
105
106 public String getWaterlevelLabel() {
107 return this.waterlevelLabel;
108 }
109
110 public String getGauge() {
111 return this.gauge;
112 }
113
114 public double getMeanBedHeight() {
115 return this.meanBedHeight;
116 }
117
118 public String getSoundageLabel() { 47 public String getSoundageLabel() {
119 return this.soundageLabel; 48 return this.soundingLabel;
120 }
121
122 public String getLocation() {
123 return this.location;
124 } 49 }
125 } 50 }

http://dive4elements.wald.intevation.org