Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
8914:e3519c3e7a0a | 8915:d9dbf0b74bc2 |
---|---|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.artifacts.sinfo.util; | |
11 | |
12 import org.dive4elements.artifacts.Artifact; | |
13 import org.dive4elements.artifacts.ArtifactDatabase; | |
14 import org.dive4elements.artifacts.CallContext; | |
15 | |
16 /** | |
17 * @author Gernot Belger | |
18 */ | |
19 public final class CalculationUtils { | |
20 | |
21 | |
22 private CalculationUtils() { | |
23 throw new UnsupportedOperationException("Helper class"); | |
24 } | |
25 | |
26 /** | |
27 * Find the the user of the given artifact, sadly this is not part of the calling context, so instead we determine the | |
28 * owner oft the artifact | |
29 * | |
30 * @param artifact | |
31 * @param context | |
32 */ | |
33 public static String findArtifactUser(final CallContext context, final Artifact artifact) { | |
34 final ArtifactDatabase database = context.getDatabase(); | |
35 return database.findArtifactUser(artifact.identifier()); | |
36 } | |
37 } |