diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/SedimentLoad.java	Mon Oct 29 12:14:50 2012 +0100
@@ -0,0 +1,135 @@
+package de.intevation.flys.artifacts.model.minfo;
+
+import gnu.trove.TDoubleArrayList;
+
+import java.util.Date;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.flys.artifacts.model.NamedObjectImpl;
+
+
+public class SedimentLoad
+extends NamedObjectImpl
+{
+    private static Logger log = Logger.getLogger(BedHeight.class);
+
+    protected String description;
+    protected Date start;
+    protected Date end;
+    protected boolean isEpoch;
+
+    protected TDoubleArrayList sand_values;
+    protected TDoubleArrayList fine_middle_values;
+    protected TDoubleArrayList coarse_values;
+    protected TDoubleArrayList susp_sediment_values;
+    protected TDoubleArrayList susp_sand_bed_values;
+
+
+    public SedimentLoad() {
+    }
+
+    public SedimentLoad(
+        String description,
+        Date start,
+        Date end,
+        boolean isEpoch
+    ) {
+        this.description = description;
+        this.start = start;
+        this.end = end;
+        this.isEpoch = isEpoch;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Date getStart() {
+        return start;
+    }
+
+    public void setStart(Date start) {
+        this.start = start;
+    }
+
+    public Date getEnd() {
+        return end;
+    }
+
+    public void setEnd(Date end) {
+        this.end = end;
+    }
+
+    public boolean isEpoch() {
+        return isEpoch;
+    }
+
+    public void setEpoch(boolean isEpoch) {
+        this.isEpoch = isEpoch;
+    }
+
+    public void addSandValue(double value) {
+        this.sand_values.add(value);
+    }
+
+    public void addSandValues(TDoubleArrayList values) {
+        this.sand_values.add(values.toNativeArray());
+    }
+
+    public TDoubleArrayList getSandValues() {
+        return this.sand_values;
+    }
+
+    public void addFineMiddleValue(double value) {
+        this.fine_middle_values.add(value);
+    }
+
+    public void addFineMiddleValues(TDoubleArrayList values) {
+        this.fine_middle_values.add(values.toNativeArray());
+    }
+
+    public TDoubleArrayList getFineMiddleValues() {
+        return this.fine_middle_values;
+    }
+
+    public void addCoarseValue(double value) {
+        this.coarse_values.add(value);
+    }
+
+    public void addCoarseValues(TDoubleArrayList values) {
+        this.coarse_values.add(values.toNativeArray());
+    }
+
+    public TDoubleArrayList getCoarseValues() {
+        return this.coarse_values;
+    }
+
+    public void addSuspSedimentValue(double value) {
+        this.susp_sediment_values.add(value);
+    }
+
+    public void addSuspSedimentValues(TDoubleArrayList values) {
+        this.susp_sediment_values.add(values.toNativeArray());
+    }
+
+   public TDoubleArrayList getSuspSedimentValues() {
+        return this.susp_sediment_values;
+    }
+
+    public void addSuspSandBedValue(double value) {
+        this.susp_sand_bed_values.add(value);
+    }
+
+    public void addSuspSandBedValues(TDoubleArrayList values) {
+        this.susp_sand_bed_values.add(values.toNativeArray());
+    }
+
+    public TDoubleArrayList getSuspSandBedValues() {
+        return this.susp_sand_bed_values;
+    }
+}

http://dive4elements.wald.intevation.org