Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java @ 9625:07f02019065e
Nachtrag Pos. 20: infrastructure query added, calculation updated for extended access class
author | mschaefer |
---|---|
date | Mon, 14 Oct 2019 08:14:58 +0200 |
parents | 02ca823ec9c6 |
children |
comparison
equal
deleted
inserted
replaced
9624:02ca823ec9c6 | 9625:07f02019065e |
---|---|
8 * documentation coming with Dive4Elements River for details. | 8 * documentation coming with Dive4Elements River for details. |
9 */ | 9 */ |
10 package org.dive4elements.river.artifacts.sinfo.flood_duration; | 10 package org.dive4elements.river.artifacts.sinfo.flood_duration; |
11 | 11 |
12 import java.util.List; | 12 import java.util.List; |
13 import java.util.Set; | |
14 | 13 |
15 import org.apache.commons.lang.math.DoubleRange; | 14 import org.apache.commons.lang.math.DoubleRange; |
16 import org.dive4elements.artifacts.CallContext; | 15 import org.dive4elements.artifacts.CallContext; |
17 import org.dive4elements.river.artifacts.WINFOArtifact; | 16 import org.dive4elements.river.artifacts.WINFOArtifact; |
18 import org.dive4elements.river.artifacts.model.Calculation; | 17 import org.dive4elements.river.artifacts.model.Calculation; |
24 import org.dive4elements.river.artifacts.sinfo.flood_duration.InfrastructureServerClientXChange.Element; | 23 import org.dive4elements.river.artifacts.sinfo.flood_duration.InfrastructureServerClientXChange.Element; |
25 import org.dive4elements.river.artifacts.sinfo.tkhstate.WinfoArtifactWrapper; | 24 import org.dive4elements.river.artifacts.sinfo.tkhstate.WinfoArtifactWrapper; |
26 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; | 25 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; |
27 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; | 26 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; |
28 import org.dive4elements.river.model.River; | 27 import org.dive4elements.river.model.River; |
29 import org.dive4elements.river.model.sinfo.Infrastructure; | |
30 | 28 |
31 /** | 29 /** |
32 * Calculation of the flood durations of the infrastructures of the km range of a river | 30 * Calculation of the flood durations of the infrastructures of the km range of a river |
33 * | 31 * |
34 * @author Matthias Schäfer | 32 * @author Matthias Schäfer |
76 private void calculateResult(final String label, final DoubleRange calcRange, final RiverInfoProvider riverInfoProvider, final FloodDurationAccess access, | 74 private void calculateResult(final String label, final DoubleRange calcRange, final RiverInfoProvider riverInfoProvider, final FloodDurationAccess access, |
77 final Calculation problems, final WINFOArtifact winfo, final FloodDurationCalculationResults results) { | 75 final Calculation problems, final WINFOArtifact winfo, final FloodDurationCalculationResults results) { |
78 | 76 |
79 final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, riverInfoProvider); | 77 final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, riverInfoProvider); |
80 | 78 |
81 // FIXME: fetch from access (fetchInfrastructureTypes only for test purposes) | 79 final List<Element> infrastructureChoices = access.getInfrastructureChoices(); |
82 final List<Element> infrastructureChoicesnew = access.getInfrastructureChoices(); | |
83 // int groupID =; | |
84 // int annottionTypeId =; | |
85 | 80 |
86 // Deprecated denke ich. | 81 /* |
87 final Set<String> infrastructureChoices = Infrastructure.fetchInfrastructureTypes(riverInfoProvider.getRiver(), calcRange.getMinimumDouble(), | 82 * zum testen: |
88 calcRange.getMaximumDouble(), access.getRiverside().getAttributeKey()); | 83 * final Set<String> infrastructureChoicesTest = Infrastructure.fetchInfrastructureTypes(riverInfoProvider.getRiver(), |
84 * calcRange.getMinimumDouble(), calcRange.getMaximumDouble(), access.getRiverside().getAttributeKey()); | |
85 */ | |
89 | 86 |
90 calculator.execute(problems, label, calcRange, access.getRiverside().getAttributeKey(), infrastructureChoices, access.getIsWspl(), winfo, results); | 87 calculator.execute(problems, label, calcRange, access.getRiverside().getAttributeKey(), infrastructureChoices, access.getIsWspl(), winfo, results); |
91 } | 88 } |
92 | 89 |
93 /** | 90 /** |