teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model.minfo; rrenkert@4372: teichmann@5831: import org.dive4elements.river.artifacts.model.NamedObjectImpl; felix@6373: import org.dive4elements.river.artifacts.model.Range; rrenkert@4372: felix@6373: /** One part of sedimentload. */ rrenkert@4372: public class SedimentLoadFraction rrenkert@4372: extends NamedObjectImpl rrenkert@4372: { rrenkert@4372: double sand; felix@6376: double fineMiddle; rrenkert@4372: double coarse; felix@6376: double suspSand; felix@6376: double suspSandBed; felix@6376: double suspSediment; rrenkert@4546: double loadTotal; rrenkert@4372: double total; rrenkert@6391: double unknown; felix@6373: /** Values are valid within this km range. */ teichmann@6970: Range sandRange; teichmann@6970: Range fineMiddleRange; teichmann@6970: Range coarseRange; teichmann@6970: Range suspSandRange; teichmann@6970: Range suspSandBedRange; teichmann@6970: Range suspSedimentRange; teichmann@6970: Range loadTotalRange; teichmann@6970: Range totalRange; teichmann@6970: Range unknownRange; rrenkert@4372: rrenkert@4372: public SedimentLoadFraction() { rrenkert@4372: sand = 0d; felix@6376: fineMiddle = 0d; rrenkert@4372: coarse = 0d; felix@6376: suspSand = 0d; felix@6376: suspSandBed = 0d; felix@6376: suspSediment = 0d; rrenkert@4546: loadTotal = 0d; rrenkert@6391: unknown = 0d; rrenkert@4372: } rrenkert@4372: rrenkert@4372: public double getSand() { rrenkert@4372: return sand; rrenkert@4372: } rrenkert@4372: rrenkert@4372: public void setSand(double sand) { rrenkert@4372: this.sand = sand; rrenkert@4372: } rrenkert@4372: felix@6373: public void setSandRange(Range range) { felix@6373: this.sandRange = range; felix@6373: } felix@6373: felix@6373: public Range getSandRange() { felix@6373: return this.sandRange; felix@6373: } felix@6373: felix@6376: public double getFineMiddle() { felix@6376: return fineMiddle; rrenkert@4372: } rrenkert@4372: felix@6376: public void setFineMiddle(double fineMiddle) { felix@6376: this.fineMiddle = fineMiddle; rrenkert@4372: } rrenkert@4372: felix@6373: public void setFineMiddleRange(Range range) { felix@6373: this.fineMiddleRange = range; felix@6373: } felix@6373: felix@6373: public Range getFineMiddleRange() { felix@6373: return this.fineMiddleRange; felix@6373: } felix@6373: rrenkert@4372: public double getCoarse() { rrenkert@4372: return coarse; rrenkert@4372: } rrenkert@4372: rrenkert@4372: public void setCoarse(double coarse) { rrenkert@4372: this.coarse = coarse; rrenkert@4372: } rrenkert@4372: felix@6373: public Range getCoarseRange() { felix@6373: return this.coarseRange; felix@6373: } felix@6373: felix@6373: public void setCoarseRange(Range range) { felix@6373: this.coarseRange = range; felix@6373: } felix@6373: felix@6376: public double getSuspSand() { felix@6376: return suspSand; rrenkert@4372: } rrenkert@4372: felix@6376: public void setSuspSand(double suspSand) { felix@6376: this.suspSand = suspSand; rrenkert@4372: } rrenkert@4372: felix@6373: public void setSuspSandRange(Range range) { felix@6373: this.suspSandRange = range; felix@6373: } felix@6373: felix@6373: public Range getSuspSandRange() { felix@6373: return this.suspSandRange; felix@6373: } felix@6373: felix@6376: public double getSuspSandBed() { felix@6376: return suspSandBed; rrenkert@4372: } rrenkert@4372: felix@6376: public void setSuspSandBed(double suspSandBed) { felix@6376: this.suspSandBed = suspSandBed; rrenkert@4372: } rrenkert@4372: felix@6373: public void setSuspSandBedRange(Range range) { felix@6373: this.suspSandRange = range; felix@6373: } felix@6373: felix@6373: public Range getSuspSandBedRange() { felix@6373: return this.suspSandRange; felix@6373: } felix@6373: felix@6376: public double getSuspSediment() { felix@6376: return suspSediment; rrenkert@4372: } rrenkert@4372: felix@6376: public void setSuspSediment(double suspSediment) { felix@6376: this.suspSediment = suspSediment; rrenkert@4372: } rrenkert@4372: felix@6373: public void setSuspSedimentRange(Range range) { felix@6373: this.suspSedimentRange = range; felix@6373: } felix@6373: felix@6373: public Range getSuspSedimentRange() { felix@6373: return this.suspSedimentRange; felix@6373: } felix@6373: rrenkert@4372: public double getTotal() { rrenkert@4372: return total; rrenkert@4372: } rrenkert@4372: rrenkert@4372: public void setTotal(double total) { rrenkert@4372: this.total = total; rrenkert@4372: } rrenkert@4546: felix@6373: public void setTotalRange(Range range) { felix@6373: this.totalRange = range; felix@6373: } felix@6373: felix@6373: public Range getTotalRange() { felix@6373: return this.totalRange; felix@6373: } felix@6373: rrenkert@4546: public double getLoadTotal() { rrenkert@4546: return loadTotal; rrenkert@4546: } rrenkert@4546: rrenkert@4546: public void setLoadTotal(double total) { rrenkert@4546: this.loadTotal = total; rrenkert@4546: } felix@6373: felix@6956: public Range getLoadTotalRange() { felix@6956: return this.loadTotalRange; felix@6956: } felix@6956: felix@6373: public void setLoadTotalRange(Range range) { felix@6373: this.loadTotalRange = range; felix@6373: } rrenkert@6391: rrenkert@6391: public double getUnknown() { rrenkert@6391: return unknown; rrenkert@6391: } rrenkert@6391: rrenkert@6391: public void setUnknown(double unknown) { rrenkert@6391: this.unknown = unknown; rrenkert@6391: } rrenkert@6391: rrenkert@6391: public Range getUnknownRange() { rrenkert@6391: return unknownRange; rrenkert@6391: } rrenkert@6391: rrenkert@6391: public void setUnknownRange(Range unknownRange) { rrenkert@6391: this.unknownRange = unknownRange; rrenkert@6391: } teichmann@6970: teichmann@6970: /** Returns true if all fraction values except SuspSediment are unset. */ teichmann@6970: public boolean hasOnlySuspValues() { teichmann@6970: return teichmann@6970: getSuspSediment() != 0d && teichmann@6970: getCoarse() == 0d && teichmann@6970: getFineMiddle() == 0d && teichmann@6970: getSand() == 0d && teichmann@6970: getSuspSand() == 0d; teichmann@6970: } teichmann@6970: teichmann@6970: /** Returns true if all fraction values except SuspSediment are set. */ teichmann@6970: public boolean hasButSuspValues() { teichmann@6970: return teichmann@6970: getSuspSediment() == 0d && teichmann@6970: getCoarse() != 0d && teichmann@6970: getFineMiddle() != 0d && teichmann@6970: getSand() != 0d && teichmann@6970: getSuspSand() != 0d; teichmann@6970: } teichmann@6970: teichmann@6970: /** Returns true if all fraction needed for total calculation are set. */ teichmann@6970: public boolean isComplete() { teichmann@6970: return teichmann@6970: getCoarse() != 0d && teichmann@6970: getFineMiddle() != 0d && teichmann@6970: getSand() != 0d && teichmann@6970: getSuspSand() != 0d && teichmann@6970: getSuspSediment() != 0d; teichmann@6970: } rrenkert@4372: } felix@6373: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :