Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoad.java @ 6392:9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 21 Jun 2013 15:35:44 +0200 |
parents | 8d6f23243d1d |
children | e6a8255d0764 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoad.java Fri Jun 21 15:33:06 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoad.java Fri Jun 21 15:35:44 2013 +0200 @@ -24,6 +24,7 @@ protected Date start; protected Date end; protected boolean isEpoch; + protected String unit; protected HashMap<Double, SedimentLoadFraction> kms; @@ -35,13 +36,15 @@ String description, Date start, Date end, - boolean isEpoch + boolean isEpoch, + String unit ) { this(); this.description = description; this.start = start; this.end = end; this.isEpoch = isEpoch; + this.unit = unit; } public String getDescription() { @@ -192,6 +195,27 @@ } } + public void setUnknown(double km, double unknown, Range range) { + if (kms.containsKey(km)) { + kms.get(km).setUnknown(unknown); + kms.get(km).setUnknownRange(range); + } + else { + SedimentLoadFraction f = new SedimentLoadFraction(); + f.setUnknown(unknown); + f.setUnknownRange(range); + kms.put(km, f); + } + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + public boolean hasCoarse() { for (SedimentLoadFraction slf : kms.values()) { if (slf.getCoarse() > 0d) {