comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataResult.java @ 8131:fae48b3c09d1

Add period to sedimentloaddataresult fraction Period is the validity of the result. It is either a single year or a range of years (epoch). As this is only used for presentation purposes the type is a string so that years and epochs need not be handled differently.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 25 Aug 2014 19:59:14 +0200
parents f01c65261963
children 58e3fed51e9e
comparison
equal deleted inserted replaced
8130:bbad52b073a4 8131:fae48b3c09d1
15 implements Serializable 15 implements Serializable
16 { 16 {
17 17
18 public static class Fraction implements Serializable { 18 public static class Fraction implements Serializable {
19 private String name; 19 private String name;
20 private String unit; 20 /* Period is the validity of the result. It is either a single
21 * year or a range of years (epoch). As this is only used for
22 * presentation purposes the type is a string so that years
23 * and epochs need not be handled differently.*/
24 private String period;
21 private double [][] data; 25 private double [][] data;
22 26
23 public Fraction() { 27 public Fraction() {
24 } 28 }
25 29
26 public Fraction(String name, double [][] data) { 30 public Fraction(String name, double [][] data, String period) {
27 this.name = name; 31 this.name = name;
28 this.data = data; 32 this.data = data;
29 this.unit = "ta"; // TODO take from calculation 33 this.period = period;
30 } 34 }
31 35
32 public String getName() { 36 public String getName() {
33 return name; 37 return name;
34 } 38 }
43 47
44 public void setData(double [][] data) { 48 public void setData(double [][] data) {
45 this.data = data; 49 this.data = data;
46 } 50 }
47 51
48 public String getUnit() { 52 public void setPeriod(String period) {
49 return unit; 53 this.period = period;
50 } 54 }
51 55
52 public void setUnit(String unit) { 56 public String getPeriod() {
53 this.unit = unit; 57 return period;
54 } 58 }
55 59
56 } // class Fraction 60 } // class Fraction
57 61
58 private List<Fraction> fractions; 62 private List<Fraction> fractions;

http://dive4elements.wald.intevation.org