# HG changeset patch # User Sascha L. Teichmann # Date 1343059191 0 # Node ID 22790758b1327981f292ba576ba0afd38af0ac83 # Parent fc351f12b906528dcc4dc2f18f6af6fc15510be7 FixA/Vollmer: return the result now. flys-artifacts/trunk@5113 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r fc351f12b906 -r 22790758b132 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon Jul 23 15:24:14 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon Jul 23 15:59:51 2012 +0000 @@ -1,3 +1,21 @@ +2012-07-23 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/artifacts/model/fixings/FixResult.java: + New base class for fixing analysis results. + + * src/main/java/de/intevation/flys/artifacts/model/fixings/FixAnalysisResult.java, + src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingResult.java: + Inherits from FixResult. + + * src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingCalculation.java: + Calculation returns FixRealizingResult. + + * src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java: + Remove superfluous import. + + * src/main/java/de/intevation/flys/artifacts/model/Calculation4.java: + Cosmetics. + 2012-07-23 Sascha L. Teichmann * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: diff -r fc351f12b906 -r 22790758b132 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation4.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation4.java Mon Jul 23 15:24:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation4.java Mon Jul 23 15:59:51 2012 +0000 @@ -232,7 +232,7 @@ } protected String createName(int index) { - // TODO: I18N + // TODO: i18n StringBuilder sb = new StringBuilder(isQ ? "Q" : "W"); sb.append(" benutzerdefiniert ("); for (int i = 0, N = segments.size(); i < N; ++i) { diff -r fc351f12b906 -r 22790758b132 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixAnalysisResult.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixAnalysisResult.java Mon Jul 23 15:24:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixAnalysisResult.java Mon Jul 23 15:59:51 2012 +0000 @@ -4,14 +4,9 @@ import de.intevation.flys.utils.KMIndex; -import java.io.Serializable; - public class FixAnalysisResult -implements Serializable +extends FixResult { - protected Parameters parameters; - protected KMIndex referenced; - protected KMIndex outliers; protected KMIndex analysisPeriods; public FixAnalysisResult() { @@ -23,9 +18,7 @@ KMIndex outliers, KMIndex analysisPeriods ) { - this.parameters = parameters; - this.referenced = referenced; - this.outliers = outliers; + super(parameters, referenced, outliers); this.analysisPeriods = analysisPeriods; } @@ -44,14 +37,6 @@ return result; } - public Parameters getParameters() { - return parameters; - } - - public void setParameters(Parameters parameters) { - this.parameters = parameters; - } - public KMIndex getAnalysisPeriods() { return analysisPeriods; } @@ -59,21 +44,5 @@ public void setAnalysisPeriods(KMIndex analysisPeriods) { this.analysisPeriods = analysisPeriods; } - - public KMIndex getReferenced() { - return referenced; - } - - public void setReferenced(KMIndex referenced) { - this.referenced = referenced; - } - - public KMIndex getOutliers() { - return outliers; - } - - public void setOutliers(KMIndex outliers) { - this.outliers = outliers; - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r fc351f12b906 -r 22790758b132 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingCalculation.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingCalculation.java Mon Jul 23 15:24:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingCalculation.java Mon Jul 23 15:59:51 2012 +0000 @@ -132,7 +132,13 @@ results[i].setName(createName(i)); } - return new CalculationResult(this); + FixRealizingResult frr = new FixRealizingResult( + parameters, + fitResult.getReferenced(), + fitResult.getOutliers(), + results); + + return new CalculationResult(frr, this); } protected String createName(int index) { diff -r fc351f12b906 -r 22790758b132 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingResult.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixRealizingResult.java Mon Jul 23 15:59:51 2012 +0000 @@ -0,0 +1,35 @@ +package de.intevation.flys.artifacts.model.fixings; + +import de.intevation.flys.artifacts.model.WQKms; + +import de.intevation.flys.artifacts.model.Parameters; + +import de.intevation.flys.utils.KMIndex; + +public class FixRealizingResult +extends FixResult +{ + public WQKms [] wqkms; + + public FixRealizingResult() { + } + + public FixRealizingResult( + Parameters parameters, + KMIndex referenced, + KMIndex outliers, + WQKms [] wqkms + ) { + super(parameters, referenced, outliers); + this.wqkms = wqkms; + } + + public WQKms [] getWQKms() { + return wqkms; + } + + public void setWQKms(WQKms [] wqkms) { + this.wqkms = wqkms; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r fc351f12b906 -r 22790758b132 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixResult.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixResult.java Mon Jul 23 15:59:51 2012 +0000 @@ -0,0 +1,53 @@ +package de.intevation.flys.artifacts.model.fixings; + +import de.intevation.flys.artifacts.model.Parameters; + +import de.intevation.flys.utils.KMIndex; + +import java.io.Serializable; + +public class FixResult +implements Serializable +{ + protected Parameters parameters; + protected KMIndex referenced; + protected KMIndex outliers; + + public FixResult() { + } + + public FixResult( + Parameters parameters, + KMIndex referenced, + KMIndex outliers + ) { + this.parameters = parameters; + this.referenced = referenced; + this.outliers = outliers; + } + + public KMIndex getReferenced() { + return referenced; + } + + public void setReferenced(KMIndex referenced) { + this.referenced = referenced; + } + + public KMIndex getOutliers() { + return outliers; + } + + public void setOutliers(KMIndex outliers) { + this.outliers = outliers; + } + + public Parameters getParameters() { + return parameters; + } + + public void setParameters(Parameters parameters) { + this.parameters = parameters; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r fc351f12b906 -r 22790758b132 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Mon Jul 23 15:24:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Mon Jul 23 15:59:51 2012 +0000 @@ -22,7 +22,6 @@ import de.intevation.flys.model.River; import de.intevation.flys.model.Wst; -import de.intevation.flys.artifacts.WINFOArtifact; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.RangeWithValues;