Mercurial > dive4elements > river
view artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/util/CalculationUtils.java @ 8915:d9dbf0b74bc2
Refaktoring of flow depth calculation, extracting tkh part. First implementation of tkh calculation.
author | gernotbelger |
---|---|
date | Wed, 28 Feb 2018 17:27:15 +0100 |
parents | |
children | 7c7f73e5e01e |
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.util; import org.dive4elements.artifacts.Artifact; import org.dive4elements.artifacts.ArtifactDatabase; import org.dive4elements.artifacts.CallContext; /** * @author Gernot Belger */ public final class CalculationUtils { private CalculationUtils() { throw new UnsupportedOperationException("Helper class"); } /** * Find the the user of the given artifact, sadly this is not part of the calling context, so instead we determine the * owner oft the artifact * * @param artifact * @param context */ public static String findArtifactUser(final CallContext context, final Artifact artifact) { final ArtifactDatabase database = context.getDatabase(); return database.findArtifactUser(artifact.identifier()); } }