Mercurial > dive4elements > river
changeset 3389:816ceb0418b9
Q is not taken from MESSUNG.Q but from MESSUNG.Q_BPEGEL
flys-artifacts/trunk@5017 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 16 Jul 2012 09:12:56 +0000 |
parents | ef3cb5421bf7 |
children | 1c9aaef89f51 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java |
diffstat | 5 files changed, 47 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Jul 16 06:31:18 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon Jul 16 09:12:56 2012 +0000 @@ -1,3 +1,15 @@ +2012-07-16 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/SQOverview.java, + src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java: + Q is not taken from MESSUNG.Q but from MESSUNG.Q_BPEGEL + + * src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java: + Fixed indentation. More macros. + + * src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java: + Removed trailing whitespace. + 2012-07-16 Ingo Weinzierl <ingo@intevation.de> * Tagged module as '2.8'.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java Mon Jul 16 06:31:18 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java Mon Jul 16 09:12:56 2012 +0000 @@ -95,7 +95,7 @@ " JOIN gewaesser g " + " ON s.gewaesserid = g.gewaesserid " + "WHERE" + - " m.q IS NOT NULL AND" + + " m.q_bpegel IS NOT NULL AND" + " g.name = :name " + "ORDER by" + " s.km, m.datum";
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java Mon Jul 16 06:31:18 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java Mon Jul 16 09:12:56 2012 +0000 @@ -30,11 +30,21 @@ return get("Q"); } - public double S_BL_S() { + public double TOTAL_BL() { // TODO: Implement me! return Double.NaN; } + public double SAND() { + // TODO: Implement me! + return Double.NaN; + } + + + public double S_BL_S() { + return SAND() * TOTAL_BL(); + } + public double S_BL_FG() { // TODO: Implement me! return Double.NaN; @@ -50,17 +60,25 @@ return Double.NaN; } - public double SIEB(int i) { - return get(String.format("SIEB%02d", i)); - } + public double S_BL_1() { + return S_BL_S() + S_BL_FG() + S_BL_CG(); + } - public double RSIEB(int i) { - return get(String.format("RSIEB%02d", i)); - } + public double S_BL_2() { + return S_SS() + S_BL_S() + S_BL_FG() + S_BL_CG(); + } - public double REST() { - return get("REST"); - } + public double SIEB(int i) { + return get(String.format("SIEB%02d", i)); + } + + public double RSIEB(int i) { + return get(String.format("RSIEB%02d", i)); + } + + public double REST() { + return get("REST"); + } @Override public String toString() {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java Mon Jul 16 06:31:18 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java Mon Jul 16 09:12:56 2012 +0000 @@ -41,10 +41,10 @@ public static final String SQL_MEASSURE = ("SELECT " + - "m.TSAND AS TSAND," + - "m.TSCHWEB AS TSCHWEB," + - "m.CSCHWEB AS CSCHWEB," + - "m.Q AS Q," + + "m.TSAND AS TSAND," + + "m.TSCHWEB AS TSCHWEB," + + "m.CSCHWEB AS CSCHWEB," + + "m.Q_BPEGEL AS Q," + "%GSIEBSATZ%," + "%SSIEBUNG% " + "FROM messung m " + @@ -56,7 +56,7 @@ "g.name = :river_name AND " + "s.km BETWEEN :location - 0.001 AND :location + 0.001 AND " + "m.datum BETWEEN :from AND :to AND " + - "m.Q IS NOT NULL") + "m.Q_BPEGEL IS NOT NULL") .replace("%GSIEBSATZ%", projection("gs", GSIEBSATZ)) .replace("%SSIEBUNG%", projection("ss", SSIEBUNG));
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java Mon Jul 16 06:31:18 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java Mon Jul 16 09:12:56 2012 +0000 @@ -148,7 +148,7 @@ } return new CalculationResult( - results.toArray(new SQResult[results.size()]), + results.toArray(new SQResult[results.size()]), this); }