comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoad.java @ 4296:3051bc28ac43

Added data object and factory for sediment load calculation. The factory provides two methods to get sediment load data: The first is to get an array of loads for a specific range at a river, these loads contain the time and description. The second is to get a single sediment load with time, description and data values.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 29 Oct 2012 12:14:50 +0100
parents
children 6a65e7ef43c0
comparison
equal deleted inserted replaced
4295:2a64d42a75e6 4296:3051bc28ac43
1 package de.intevation.flys.artifacts.model.minfo;
2
3 import gnu.trove.TDoubleArrayList;
4
5 import java.util.Date;
6
7 import org.apache.log4j.Logger;
8
9 import de.intevation.flys.artifacts.model.NamedObjectImpl;
10
11
12 public class SedimentLoad
13 extends NamedObjectImpl
14 {
15 private static Logger log = Logger.getLogger(BedHeight.class);
16
17 protected String description;
18 protected Date start;
19 protected Date end;
20 protected boolean isEpoch;
21
22 protected TDoubleArrayList sand_values;
23 protected TDoubleArrayList fine_middle_values;
24 protected TDoubleArrayList coarse_values;
25 protected TDoubleArrayList susp_sediment_values;
26 protected TDoubleArrayList susp_sand_bed_values;
27
28
29 public SedimentLoad() {
30 }
31
32 public SedimentLoad(
33 String description,
34 Date start,
35 Date end,
36 boolean isEpoch
37 ) {
38 this.description = description;
39 this.start = start;
40 this.end = end;
41 this.isEpoch = isEpoch;
42 }
43
44 public String getDescription() {
45 return description;
46 }
47
48 public void setDescription(String description) {
49 this.description = description;
50 }
51
52 public Date getStart() {
53 return start;
54 }
55
56 public void setStart(Date start) {
57 this.start = start;
58 }
59
60 public Date getEnd() {
61 return end;
62 }
63
64 public void setEnd(Date end) {
65 this.end = end;
66 }
67
68 public boolean isEpoch() {
69 return isEpoch;
70 }
71
72 public void setEpoch(boolean isEpoch) {
73 this.isEpoch = isEpoch;
74 }
75
76 public void addSandValue(double value) {
77 this.sand_values.add(value);
78 }
79
80 public void addSandValues(TDoubleArrayList values) {
81 this.sand_values.add(values.toNativeArray());
82 }
83
84 public TDoubleArrayList getSandValues() {
85 return this.sand_values;
86 }
87
88 public void addFineMiddleValue(double value) {
89 this.fine_middle_values.add(value);
90 }
91
92 public void addFineMiddleValues(TDoubleArrayList values) {
93 this.fine_middle_values.add(values.toNativeArray());
94 }
95
96 public TDoubleArrayList getFineMiddleValues() {
97 return this.fine_middle_values;
98 }
99
100 public void addCoarseValue(double value) {
101 this.coarse_values.add(value);
102 }
103
104 public void addCoarseValues(TDoubleArrayList values) {
105 this.coarse_values.add(values.toNativeArray());
106 }
107
108 public TDoubleArrayList getCoarseValues() {
109 return this.coarse_values;
110 }
111
112 public void addSuspSedimentValue(double value) {
113 this.susp_sediment_values.add(value);
114 }
115
116 public void addSuspSedimentValues(TDoubleArrayList values) {
117 this.susp_sediment_values.add(values.toNativeArray());
118 }
119
120 public TDoubleArrayList getSuspSedimentValues() {
121 return this.susp_sediment_values;
122 }
123
124 public void addSuspSandBedValue(double value) {
125 this.susp_sand_bed_values.add(value);
126 }
127
128 public void addSuspSandBedValues(TDoubleArrayList values) {
129 this.susp_sand_bed_values.add(values.toNativeArray());
130 }
131
132 public TDoubleArrayList getSuspSandBedValues() {
133 return this.susp_sand_bed_values;
134 }
135 }

http://dive4elements.wald.intevation.org