comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationCalculation.java @ 9070:611a523fc42f

VegetationZoneAccessHelper, VegetationTablePanels verbessert
author gernotbelger
date Tue, 15 May 2018 18:04:36 +0200
parents 1ffd38826175
children 431f1c269be5
comparison
equal deleted inserted replaced
9069:1ffd38826175 9070:611a523fc42f
9 */ 9 */
10 package org.dive4elements.river.artifacts.uinfo.inundationduration; 10 package org.dive4elements.river.artifacts.uinfo.inundationduration;
11 11
12 import java.util.ArrayList; 12 import java.util.ArrayList;
13 import java.util.Collection; 13 import java.util.Collection;
14 import java.util.List;
14 15
15 import org.apache.commons.lang.math.DoubleRange; 16 import org.apache.commons.lang.math.DoubleRange;
16 import org.dive4elements.artifacts.CallContext; 17 import org.dive4elements.artifacts.CallContext;
17 import org.dive4elements.river.artifacts.access.RiverAccess; 18 import org.dive4elements.river.artifacts.access.RiverAccess;
18 import org.dive4elements.river.artifacts.common.ResultRow; 19 import org.dive4elements.river.artifacts.common.ResultRow;
21 import org.dive4elements.river.artifacts.resources.Resources; 22 import org.dive4elements.river.artifacts.resources.Resources;
22 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType; 23 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
23 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; 24 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils;
24 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; 25 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
25 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; 26 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact;
27 import org.dive4elements.river.artifacts.uinfo.vegetationzones.VegetationZoneAccessHelper;
26 import org.dive4elements.river.model.River; 28 import org.dive4elements.river.model.River;
27 29
28 /** 30 /**
29 * @author Domenico Nardi Tironi 31 * @author Domenico Nardi Tironi
30 * 32 *
42 44
43 final String calcModeLabel = Resources.getMsg(this.context.getMeta(), uinfo.getCalculationMode().name()); 45 final String calcModeLabel = Resources.getMsg(this.context.getMeta(), uinfo.getCalculationMode().name());
44 final String user = CalculationUtils.findArtifactUser(this.context, uinfo); 46 final String user = CalculationUtils.findArtifactUser(this.context, uinfo);
45 47
46 final RiverAccess access = new RiverAccess(uinfo); 48 final RiverAccess access = new RiverAccess(uinfo);
47 final River river = access.getRiver();
48 final DoubleRange calcRange = null;
49 final RiverInfo riverInfo = new RiverInfo(river);
50 49
51 final InundationDurationAccess indurax = new InundationDurationAccess(uinfo); 50 final InundationDurationAccess indurax = new InundationDurationAccess(uinfo);
51 final River river = indurax.getRiver();
52 final RiverInfo riverInfo = new RiverInfo(river);
53 final DoubleRange calcRange = indurax.getRange();
52 final int[] totalEpoch = indurax.getTotalEpoch(); 54 final int[] totalEpoch = indurax.getTotalEpoch();
53 final Integer year = indurax.getYear(); // null bei year -> Integer.. evtl ungünstig.. evtl. anders lösen 55 final Integer year = indurax.getYear(); // null bei year -> Integer.. evtl ungünstig.. evtl. anders lösen
54 final DoubleRange range = indurax.getRange(); 56 final DoubleRange range = indurax.getRange();
55 final Double sedimentHeight = indurax.getSedimentHeight(); 57 final Double sedimentHeight = indurax.getSedimentHeight();
58 final String zonesRaw = indurax.getVegZones();
59 final List<VegetationZoneAccessHelper> zones = VegetationZoneAccessHelper.parse(zonesRaw);
56 60
57 final InundationDurationCalculationResults results = new InundationDurationCalculationResults(calcModeLabel, user, riverInfo, calcRange); 61 final InundationDurationCalculationResults results = new InundationDurationCalculationResults(calcModeLabel, user, riverInfo, calcRange);
58 62
59 final Collection<ResultRow> rows = new ArrayList<>(); 63 final Collection<ResultRow> rows = new ArrayList<>();
60 64

http://dive4elements.wald.intevation.org