Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixRealizingCalculationExtended.java @ 8883:a536e1aacf0f
Further work on SINFO-FlowDepth
author | gernotbelger |
---|---|
date | Fri, 09 Feb 2018 18:07:22 +0100 |
parents | |
children | d9f2ce1d6bef |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixRealizingCalculationExtended.java Fri Feb 09 18:07:22 2018 +0100 @@ -0,0 +1,45 @@ +/** 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.model.fixings; + +import java.util.Date; +import java.util.List; + +import org.dive4elements.river.artifacts.access.FixRealizingAccess; +import org.dive4elements.river.artifacts.model.FixingsOverview; +import org.dive4elements.river.artifacts.model.FixingsOverviewFactory; + +/** + * REMARK: this inheritance is only needed, beause changing the orignal calculation will probably break the + * serialization of the artifact.... + * + * @author Gernot Belger + */ +public class FixRealizingCalculationExtended extends FixRealizingCalculation { + private static final long serialVersionUID = 1L; + + public FixRealizingCalculationExtended(final FixRealizingAccess fixAccess) { + super(fixAccess); + } + + // FIXME: implement + // FIXME: check if this breaks serialization + public int determineMeanYear() { + final FixingsOverview overview = FixingsOverviewFactory.getOverview(this.river); + final ColumnCache cc = new ColumnCache(); + + final List<Column> columns = getEventColumns(overview, cc); + for (final Column column : columns) { + final Date date = column.getDate(); + } + + return 1999; + } +}