Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java @ 9070:611a523fc42f
VegetationZoneAccessHelper, VegetationTablePanels verbessert
author | gernotbelger |
---|---|
date | Tue, 15 May 2018 18:04:36 +0200 |
parents | 2ed3824a3d53 |
children | e6b63b2b41b9 |
rev | line source |
---|---|
9067 | 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.flood_duration; | |
11 | |
12 import org.apache.commons.lang.math.DoubleRange; | |
13 import org.dive4elements.artifacts.CallContext; | |
14 import org.dive4elements.river.artifacts.model.Calculation; | |
15 import org.dive4elements.river.artifacts.model.CalculationResult; | |
16 import org.dive4elements.river.artifacts.resources.Resources; | |
17 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | |
18 import org.dive4elements.river.artifacts.sinfo.common.RiverInfoProvider; | |
19 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; | |
20 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; | |
21 import org.dive4elements.river.model.River; | |
22 | |
23 class FloodDurationCalculation { | |
24 | |
25 // private static Logger log = Logger.getLogger(FloodDurationCalculation.class); | |
26 | |
27 private final CallContext context; | |
28 | |
29 public FloodDurationCalculation(final CallContext context) { | |
30 this.context = context; | |
31 } | |
32 | |
33 public CalculationResult calculate(final SINFOArtifact sinfo) { | |
34 | |
35 final String user = CalculationUtils.findArtifactUser(this.context, sinfo); | |
36 | |
37 /* access input data */ | |
38 final FloodDurationAccess access = new FloodDurationAccess(sinfo); | |
39 final River river = access.getRiver(); | |
40 final RiverInfo riverInfo = new RiverInfo(river); | |
41 | |
42 final DoubleRange calcRange = access.getRange(); | |
43 | |
44 /* calculate results for each diff pair */ | |
45 final Calculation problems = new Calculation(); | |
46 | |
47 final RiverInfoProvider infoProvider = RiverInfoProvider.forRange(this.context, river, calcRange); | |
48 | |
49 final String calcModeLabel = Resources.getMsg(this.context.getMeta(), sinfo.getCalculationMode().name()); | |
50 | |
51 final String riverside = access.getRiverside(); | |
9070
611a523fc42f
VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents:
9067
diff
changeset
|
52 |
611a523fc42f
VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents:
9067
diff
changeset
|
53 // TODO: mis- ups.. re-use WINFO Artifact as in TkhState |
611a523fc42f
VegetationZoneAccessHelper, VegetationTablePanels verbessert
gernotbelger
parents:
9067
diff
changeset
|
54 |
9067 | 55 final double step = access.getStep(); |
56 final boolean wspl = access.getWspl(); | |
57 final Boolean wqisfree = access.getWqIsFree(); | |
58 final Boolean wqIsQ = access.getWqIsQ(); | |
59 final Boolean wqIsRange = access.getWqIsRange(); | |
60 final Double wqFrom = access.getWqFrom(); | |
61 final Double wqTo = access.getWqTo(); | |
62 final Double wqStep = access.getWqStep(); | |
63 final double[] wqSingle = access.getWqSingle(); | |
64 | |
65 return null; // new CalculationResult(results, problems); | |
66 } | |
67 | |
68 } |