Mercurial > dive4elements > river
changeset 3763:55fe9c1dc6f3
Updated minfo bed quality result objects.
flys-artifacts/trunk@5465 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 14 Sep 2012 07:45:01 +0000 |
parents | 0c978a80726a |
children | a6f5bb10eff4 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedBedQualityResult.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedLoadBedQualityResult.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedQualityResult.java |
diffstat | 4 files changed, 79 insertions(+), 66 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Sep 14 07:12:08 2012 +0000 +++ b/flys-artifacts/ChangeLog Fri Sep 14 07:45:01 2012 +0000 @@ -1,3 +1,10 @@ +2012-09-14 Raimund Renkert <raimund.renkert@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/minfo/BedQualityResult.java, + src/main/java/de/intevation/flys/artifacts/model/minfo/BedBedQualityResult.java, + src/main/java/de/intevation/flys/artifacts/model/minfo/BedLoadBedQualityResult.java: + Updated bed quality result objects. + 2012-09-14 Ingo Weinzierl <ingo@intevation.de> * doc/conf/artifacts/minfo.xml: Splitted porosity and density facets into
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedBedQualityResult.java Fri Sep 14 07:12:08 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedBedQualityResult.java Fri Sep 14 07:45:01 2012 +0000 @@ -1,69 +1,62 @@ package de.intevation.flys.artifacts.model.minfo; +import org.apache.poi.hssf.record.formula.functions.T; + +import gnu.trove.TDoubleArrayList; import de.intevation.flys.artifacts.model.DateRange; public class BedBedQualityResult extends BedQualityResult { - protected double depth1; - protected double depth2; - protected double porosityCap; - protected double porositySub; - protected double loadDensityCap; - protected double loadDensitySub; + protected TDoubleArrayList diameterCap; + protected TDoubleArrayList diameterSub; + protected TDoubleArrayList porosityCap; + protected TDoubleArrayList porositySub; + protected TDoubleArrayList loadDensityCap; + protected TDoubleArrayList loadDensitySub; public BedBedQualityResult( - DIAMETER_TYPE type, - double diameter, - double km, + String type, + TDoubleArrayList diameterCap, + TDoubleArrayList diameterSub, + TDoubleArrayList km, DateRange range, - double depth1, - double depth2, - double porosityCap, - double porositySub, - double loadDensityCap, - double loadDensitySub + TDoubleArrayList porosityCap, + TDoubleArrayList porositySub, + TDoubleArrayList loadDensityCap, + TDoubleArrayList loadDensitySub ) { - super(type, diameter, km, range); - this.depth1 = depth1; - this.depth2 = depth2; + super(type, null, km, range); + this.diameterCap = diameterCap; + this.diameterSub = diameterSub; this.porosityCap = porosityCap; - this.loadDensitySub = porositySub; + this.porositySub = porositySub; this.loadDensityCap = loadDensityCap; this.loadDensitySub = loadDensitySub; } - public double getPorosityCap() { - return porosityCap; - } - - public void setPorosityCap(double porosityCap) { - this.porosityCap = porosityCap; - } - - public double getPorositySub() { - return porositySub; - } - - public void setPorositySub(double porositySub) { - this.porositySub = porositySub; + public double getPorosityCap(int ndx) { + return porosityCap.get(ndx); } - public double getLoadDensityCap() { - return loadDensityCap; - } - - public void setLoadDensityCap(double loadDensityCap) { - this.loadDensityCap = loadDensityCap; + public double getPorositySub(int ndx) { + return porositySub.get(ndx); } - public double getLoadDensitySub() { - return loadDensitySub; + public double getLoadDensityCap(int ndx) { + return loadDensityCap.get(ndx); } - public void setLoadDensitySub(double loadDensitySub) { - this.loadDensitySub = loadDensitySub; + public double getLoadDensitySub(int ndx) { + return loadDensitySub.get(ndx); } + public double getDiameterCap(int ndx) { + return diameterCap.get(ndx); + } + + public double getDiameterSub(int ndx) { + return diameterSub.get(ndx); + } }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedLoadBedQualityResult.java Fri Sep 14 07:12:08 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedLoadBedQualityResult.java Fri Sep 14 07:45:01 2012 +0000 @@ -1,7 +1,18 @@ package de.intevation.flys.artifacts.model.minfo; +import de.intevation.flys.artifacts.model.DateRange; +import gnu.trove.TDoubleArrayList; + public class BedLoadBedQualityResult extends BedQualityResult { + public BedLoadBedQualityResult ( + String type, + TDoubleArrayList diameter, + TDoubleArrayList km, + DateRange range + ) { + super(type, diameter, km, range); + } }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedQualityResult.java Fri Sep 14 07:12:08 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedQualityResult.java Fri Sep 14 07:45:01 2012 +0000 @@ -1,5 +1,7 @@ package de.intevation.flys.artifacts.model.minfo; +import gnu.trove.TDoubleArrayList; + import java.io.Serializable; import de.intevation.flys.artifacts.model.DateRange; @@ -25,22 +27,27 @@ } protected DIAMETER_TYPE type; - protected double diameter; - protected double km; + protected TDoubleArrayList diameter; + protected TDoubleArrayList kms; protected DateRange dateRange; + protected boolean empty; public BedQualityResult () { + empty = true; } public BedQualityResult ( - DIAMETER_TYPE type, - double diameter, - double km, + String type, + TDoubleArrayList diameter, + TDoubleArrayList km, DateRange range ) { - this.type = type; + if (km.size() > 0) { + empty = false; + } + this.type = DIAMETER_TYPE.valueOf(type.toUpperCase()); this.diameter = diameter; - this.km = km; + this.kms = km; this.dateRange = range; } @@ -48,31 +55,26 @@ return this.type; } - public double getKm() { - return this.km; + public TDoubleArrayList getKms() { + return this.kms; } - public double getDiameter() { - return this.diameter; + public double getDiameter(int ndx) { + if (diameter != null) { + return this.diameter.get(ndx); + } + return Double.NaN; } public DateRange getDateRange() { return this.dateRange; } - public void setType(DIAMETER_TYPE type) { + + public void setType(DIAMETER_TYPE type) { this.type = type; } - public void setDiameter(double diameter) { - this.diameter = diameter; + public boolean isEmpty() { + return empty; } - - public void setKm(double km) { - this.km = km; - } - - public void setDateRange(DateRange dateRange) { - this.dateRange = dateRange; - } - }