comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java @ 3297:79c8e0d9fdea

SQ relation: Use only first time period. flys-artifacts/trunk@4982 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 13 Jul 2012 10:12:45 +0000
parents 36f3b53d5cfc
children 02d5731b43a2
comparison
equal deleted inserted replaced
3296:45af081061e7 3297:79c8e0d9fdea
38 if (location == null) { 38 if (location == null) {
39 // TODO: i18n 39 // TODO: i18n
40 addProblem("sq.missing.location"); 40 addProblem("sq.missing.location");
41 } 41 }
42 42
43 if (periods == null) { 43 if (periods == null || periods.length == 0) {
44 // TODO: i18n 44 // TODO: i18n
45 addProblem("sq.missing.periods"); 45 addProblem("sq.missing.periods");
46 } 46 }
47 47
48 if (outliers == null) { 48 if (outliers == null) {
77 77
78 protected CalculationResult internalCalculate() { 78 protected CalculationResult internalCalculate() {
79 79
80 boolean debug = log.isDebugEnabled(); 80 boolean debug = log.isDebugEnabled();
81 81
82 for (DateRange period: periods) { 82 // XXX: We can only produce one SQResult.
83 Measurements measurements = 83 DateRange period = periods[0];
84 MeasurementFactory.getMeasurements(river, location, period);
85 84
86 if (debug) { 85 Measurements measurements =
87 log.debug(measurements.toString()); 86 MeasurementFactory.getMeasurements(river, location, period);
88 } 87
88 if (debug) {
89 log.debug(measurements.toString());
89 } 90 }
90 91
91 // TODO: Implement me! 92 SQFractionResult [] fractionResults =
93 new SQFractionResult[SQResult.NUMBER_FRACTIONS];
92 94
93 SQResult [] result = null; 95 for (int i = 0; i < fractionResults.length; ++i) {
96 // TODO: Implement me!
97 }
94 98
95 return new CalculationResult(result, this); 99 return new CalculationResult(new SQResult(fractionResults), this);
96 } 100 }
97 } 101 }
98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 102 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org