Mercurial > dive4elements > river
view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationAccess.java @ 9369:1a4d2ce77423
radio choice fix
author | gernotbelger |
---|---|
date | Thu, 02 Aug 2018 17:39:13 +0200 |
parents | 0dcd1cd41915 |
children | 929d645691ae |
line wrap: on
line source
/* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde * Software engineering by * Björnsen Beratende Ingenieure GmbH * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt * * This file is Free Software under the GNU AGPL (>=v3) * and comes with ABSOLUTELY NO WARRANTY! Check out the * documentation coming with Dive4Elements River for details. */ package org.dive4elements.river.artifacts.sinfo.flood_duration; import org.apache.log4j.Logger; import org.dive4elements.river.artifacts.access.RangeAccess; import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; import org.dive4elements.river.artifacts.sinfo.SinfoCalcMode; import org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice.RiversideChoiceKey; /** * Access to the flood duration calculation type specific SInfo artifact data. * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent * reference to the artifact instance. * Hence we do NOT cache any data. * * @author Gernot Belger */ final class FloodDurationAccess extends RangeAccess { private static Logger log = Logger.getLogger(FloodDurationAccess.class); public FloodDurationAccess(final SINFOArtifact artifact) { super(artifact); /* assert calculation mode */ final SinfoCalcMode calculationMode = artifact.getCalculationMode(); assert (calculationMode == SinfoCalcMode.sinfo_calc_flood_duration); } @Override public Double getStep() { return super.getStep(); } public RiversideChoiceKey getRiverside() { return RiversideChoiceKey.fromKey(super.getString("riverside")); } }