# HG changeset patch # User Sascha L. Teichmann # Date 1342429976 0 # Node ID 816ceb0418b9687f2705064f91ddcbc3679690db # Parent ef3cb5421bf7d9173489273082b87879eb012098 Q is not taken from MESSUNG.Q but from MESSUNG.Q_BPEGEL flys-artifacts/trunk@5017 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r ef3cb5421bf7 -r 816ceb0418b9 flys-artifacts/ChangeLog --- 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 + + * 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 * Tagged module as '2.8'. diff -r ef3cb5421bf7 -r 816ceb0418b9 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/SQOverview.java --- 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"; diff -r ef3cb5421bf7 -r 816ceb0418b9 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java --- 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() { diff -r ef3cb5421bf7 -r 816ceb0418b9 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java --- 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)); diff -r ef3cb5421bf7 -r 816ceb0418b9 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java --- 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); }