ingo@2702: package de.intevation.flys.artifacts.model; ingo@2702: ingo@2702: import java.io.Serializable; ingo@2702: ingo@2702: import gnu.trove.TDoubleArrayList; ingo@2702: ingo@2702: ingo@2702: public class FlowVelocityData implements Serializable { ingo@2702: ingo@2702: private TDoubleArrayList km; ingo@2702: private TDoubleArrayList vMain; ingo@2702: private TDoubleArrayList vTotal; ingo@2702: private TDoubleArrayList tauMain; ingo@2702: private TDoubleArrayList q; ingo@2702: private String zone; rrenkert@4622: private String type; ingo@2702: ingo@2702: protected FlowVelocityData() { ingo@2702: this.km = new TDoubleArrayList(); ingo@2702: this.vMain = new TDoubleArrayList(); ingo@2702: this.vTotal = new TDoubleArrayList(); ingo@2702: this.tauMain = new TDoubleArrayList(); ingo@2702: this.q = new TDoubleArrayList(); ingo@2702: } ingo@2702: ingo@2702: ingo@2702: public void addKM(double km) { ingo@2702: this.km.add(km); ingo@2702: } ingo@2702: ingo@2702: public double getKM(int idx) { ingo@2702: return km.get(idx); ingo@2702: } ingo@2702: ingo@2702: public void addVMain(double vMain) { ingo@2702: this.vMain.add(vMain); ingo@2702: } ingo@2702: ingo@2702: public double getVMain(int idx) { ingo@2702: return vMain.get(idx); ingo@2702: } ingo@2702: ingo@2702: public void addVTotal(double vTotal) { ingo@2702: this.vTotal.add(vTotal); ingo@2702: } ingo@2702: ingo@2702: public double getVTotal(int idx) { ingo@2702: return vTotal.get(idx); ingo@2702: } ingo@2702: ingo@2702: public void addTauMain(double tauMain) { ingo@2702: this.tauMain.add(tauMain); ingo@2702: } ingo@2702: ingo@2702: public double getTauMain(int idx) { ingo@2702: return tauMain.get(idx); ingo@2702: } ingo@2702: ingo@2702: public void addQ(double q) { ingo@2702: this.q.add(q); ingo@2702: } ingo@2702: ingo@2702: public double getQ(int idx) { ingo@2702: return q.get(idx); ingo@2702: } ingo@2702: ingo@2702: public void setZone(String zone) { ingo@2702: this.zone = zone; ingo@2702: } ingo@2702: ingo@2702: public String getZone() { ingo@2702: return zone; ingo@2702: } ingo@2702: rrenkert@4622: public void setType(String type) { rrenkert@4622: this.type = type; rrenkert@4622: } rrenkert@4622: rrenkert@4622: public String getType() { rrenkert@4622: return this.type; rrenkert@4622: } rrenkert@4622: ingo@2702: public int size() { ingo@2702: return km.size(); ingo@2702: } ingo@2706: ingo@2706: ingo@2706: public double[][] getMainChannelPoints() { ingo@2706: double[][] points = new double[2][size()]; ingo@2706: ingo@2706: for (int i = 0, n = size(); i < n; i++) { ingo@2706: points[0][i] = getKM(i); ingo@2706: points[1][i] = getVMain(i); ingo@2706: } ingo@2706: ingo@2706: return points; ingo@2706: } ingo@2706: ingo@2706: ingo@2706: public double[][] getTotalChannelPoints() { ingo@2706: double[][] points = new double[2][size()]; ingo@2706: ingo@2706: for (int i = 0, n = size(); i < n; i++) { ingo@2706: points[0][i] = getKM(i); ingo@2706: points[1][i] = getVTotal(i); ingo@2706: } ingo@2706: ingo@2706: return points; ingo@2706: } ingo@2706: ingo@2706: felix@4467: public double[][] getQPoints() { felix@4467: double[][] points = new double[2][size()]; felix@4467: felix@4467: for (int i = 0, n = size(); i < n; i++) { felix@4467: points[0][i] = getKM(i); felix@4467: points[1][i] = getQ(i); felix@4467: } felix@4467: felix@4467: return points; felix@4467: } felix@4467: felix@4467: ingo@2706: public double[][] getTauPoints() { ingo@2706: double[][] points = new double[2][size()]; ingo@2706: ingo@2706: for (int i = 0, n = size(); i < n; i++) { ingo@2706: points[0][i] = getKM(i); ingo@2706: points[1][i] = getTauMain(i); ingo@2706: } ingo@2706: ingo@2706: return points; ingo@2706: } ingo@2702: } sascha@3083: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :