diff 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
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataResult.java	Mon Aug 25 19:58:00 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataResult.java	Mon Aug 25 19:59:14 2014 +0200
@@ -17,16 +17,20 @@
 
     public static class Fraction implements Serializable {
         private String      name;
-        private String      unit;
+        /* 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.*/
+        private String      period;
         private double [][] data;
 
         public Fraction() {
         }
 
-        public Fraction(String name, double [][] data) {
+        public Fraction(String name, double [][] data, String period) {
             this.name = name;
             this.data = data;
-            this.unit = "ta"; // TODO take from calculation
+            this.period = period;
         }
 
         public String getName() {
@@ -45,12 +49,12 @@
             this.data = data;
         }
 
-        public String getUnit() {
-            return unit;
+        public void setPeriod(String period) {
+            this.period = period;
         }
 
-        public void setUnit(String unit) {
-            this.unit = unit;
+        public String getPeriod() {
+            return period;
         }
 
     } // class Fraction

http://dive4elements.wald.intevation.org