Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java @ 9323:86d2cbfe7f7f
bundu bezugswst excel metadaten
author | gernotbelger |
---|---|
date | Fri, 27 Jul 2018 13:29:34 +0200 |
parents | 7b2b086e45f0 |
children | 0a0937f33bb5 |
comparison
equal
deleted
inserted
replaced
9322:a49fe0ebb297 | 9323:86d2cbfe7f7f |
---|---|
17 import org.dive4elements.river.artifacts.bundu.BunduResultType; | 17 import org.dive4elements.river.artifacts.bundu.BunduResultType; |
18 import org.dive4elements.river.artifacts.common.GeneralResultType; | 18 import org.dive4elements.river.artifacts.common.GeneralResultType; |
19 import org.dive4elements.river.artifacts.common.ResultRow; | 19 import org.dive4elements.river.artifacts.common.ResultRow; |
20 import org.dive4elements.river.artifacts.model.CalculationResult; | 20 import org.dive4elements.river.artifacts.model.CalculationResult; |
21 import org.dive4elements.river.artifacts.resources.Resources; | 21 import org.dive4elements.river.artifacts.resources.Resources; |
22 import org.dive4elements.river.artifacts.sinfo.util.BedHeightInfo; | |
22 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; | 23 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils; |
23 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; | 24 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo; |
25 import org.dive4elements.river.artifacts.sinfo.util.WstInfo; | |
24 import org.dive4elements.river.model.River; | 26 import org.dive4elements.river.model.River; |
25 | 27 |
26 class BezugswstCalculation { | 28 class BezugswstCalculation { |
27 | 29 |
28 // private static Logger log = Logger.getLogger(FloodDurationCalculation.class); | 30 // private static Logger log = Logger.getLogger(FloodDurationCalculation.class); |
43 final River river = access.getRiver(); | 45 final River river = access.getRiver(); |
44 final RiverInfo riverInfo = new RiverInfo(river); | 46 final RiverInfo riverInfo = new RiverInfo(river); |
45 final String calcModeLabel = Resources.getMsg(this.context.getMeta(), "bundu_bezugswst"); | 47 final String calcModeLabel = Resources.getMsg(this.context.getMeta(), "bundu_bezugswst"); |
46 final BezugswstCalculationResults results = new BezugswstCalculationResults(calcModeLabel, user, riverInfo, access.getRange()); | 48 final BezugswstCalculationResults results = new BezugswstCalculationResults(calcModeLabel, user, riverInfo, access.getRange()); |
47 | 49 |
50 // TODO: get wst, sounding for river | |
51 final WstInfo wstInfo = null; | |
52 final BedHeightInfo sounding = null; | |
53 // final int wspYear = waterlevel.getYear(); | |
54 // final WstInfo wstInfo = new WstInfo(wspLabel, wspYear, riverInfo.getReferenceGauge()); | |
55 final String function = access.getFunction(); | |
56 final boolean preprocessing = access.getPreprocessing();// nullpointer dürfen nicht entstehen; Fehler läge woanders | |
57 final int startYear = access.getStartYear(); | |
58 final int endYear = access.getBezugsJahr(); | |
59 final Integer ud = access.getUd(); | |
60 final double[] qs = access.getQs(); | |
61 final Double missingVolFrom = access.getMissingVolFrom(); | |
62 final Double missingVolTo = access.getMissingVolTo(); | |
48 final List<ResultRow> list = new ArrayList<>(); | 63 final List<ResultRow> list = new ArrayList<>(); |
49 final ResultRow row = ResultRow.create(); | 64 final ResultRow row = ResultRow.create(); |
50 row.putValue(GeneralResultType.station, 666.666); | 65 row.putValue(GeneralResultType.station, 666.666); |
51 row.putValue(BunduResultType.bezugswst, 22.15); | 66 row.putValue(BunduResultType.bezugswst, 22.15); |
52 row.putValue(GeneralResultType.dischargeQwithUnit, 77.666); | 67 row.putValue(GeneralResultType.dischargeQwithUnit, 77.666); |
53 row.putValue(GeneralResultType.waterlevelLabel, "GLQ"); | 68 row.putValue(GeneralResultType.waterlevelLabel, "GLQ"); |
54 row.putValue(GeneralResultType.gaugeLabel, "Bonn"); | 69 row.putValue(GeneralResultType.gaugeLabel, "Bonn"); |
55 row.putValue(GeneralResultType.location, "keine Lage"); | 70 row.putValue(GeneralResultType.location, "keine Lage"); |
56 list.add(row); | 71 list.add(row); |
57 | 72 |
58 final BezugswstCalculationResult result = new BezugswstCalculationResult("label? was fürn label?", list); | 73 final BezugswstCalculationResult result = new BezugswstCalculationResult("label? was fürn label?", list, sounding, wstInfo, function, preprocessing, |
74 startYear, endYear, ud, qs, missingVolFrom, missingVolTo); | |
59 results.addResult(result, null); | 75 results.addResult(result, null); |
60 return new CalculationResult(results, null);// problems); | 76 return new CalculationResult(results, null);// problems); |
61 } | 77 } |
62 | 78 |
63 /** | 79 /** |