changeset 3922:e1d3f6bccf2b

S/Q: More symbols in reconstruction of Excel macros. flys-artifacts/trunk@5606 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 27 Sep 2012 08:51:51 +0000
parents deff2c337111
children 9fac337192c9
files flys-artifacts/ChangeLog 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/Measurements.java
diffstat 4 files changed, 29 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Sep 26 11:03:29 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Sep 27 08:51:51 2012 +0000
@@ -1,3 +1,12 @@
+2012-09-27	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/sq/Measurements.java
+	* src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java:
+	  Add more symbols.
+
+	* src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java:
+	  Adjust symbols.
+
 2012-09-26	Björn Ricks	<bjoern.ricks@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java	Wed Sep 26 11:03:29 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurement.java	Thu Sep 27 08:51:51 2012 +0000
@@ -32,32 +32,34 @@
 
     public double TOTAL_BL() {
         // TODO: Implement me!
-        return Double.NaN;
+        return get("TGESCHIEBE");
     }
 
-    public double SAND() {
+    public double BL_G() {
         // TODO: Implement me!
         return Double.NaN;
     }
 
-
-    public double S_BL_S() {
-        return SAND() * TOTAL_BL();
-    }
-
-    public double S_BL_FG() {
+    public double BL_C() {
         // TODO: Implement me!
         return Double.NaN;
     }
 
-    public double S_BL_CG() {
+    public double BL_S() {
         // TODO: Implement me!
         return Double.NaN;
     }
 
-    public double S_BL() {
-        // TODO: Implement me!
-        return Double.NaN;
+    public double S_BL_S() {
+        return TOTAL_BL() * BL_S();
+    }
+
+    public double S_BL_FG() {
+        return TOTAL_BL() * BL_G();
+    }
+
+    public double S_BL_CG() {
+        return TOTAL_BL() * BL_C();
     }
 
     public double S_BL_1() {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java	Wed Sep 26 11:03:29 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/MeasurementFactory.java	Thu Sep 27 08:51:51 2012 +0000
@@ -41,10 +41,11 @@
 
     public static final String SQL_MEASSURE =
         ("SELECT " +
-            "m.TSAND    AS TSAND,"   +
-            "m.TSCHWEB  AS TSCHWEB," +
-            "m.CSCHWEB  AS CSCHWEB," +
-            "m.Q_BPEGEL AS Q_BPEGEL " +
+            "m.TSAND      AS TSAND,"   +
+            "m.TSCHWEB    AS TSCHWEB," +
+            "m.CSCHWEB    AS CSCHWEB," +
+            "m.Q_BPEGEL   AS Q_BPEGEL," +
+            "m.TGESCHIEBE AS TGESCHIEBE " +
         //    ", %GSIEBSATZ% " +
         //    "%SSIEBUNG% " +
         "FROM messung m " +
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurements.java	Wed Sep 26 11:03:29 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Measurements.java	Thu Sep 27 08:51:51 2012 +0000
@@ -51,7 +51,7 @@
     public static final SExtractor S_BL_EXTRACTOR = new SExtractor() {
         @Override
         public double getS(Measurement measument) {
-            return measument.S_BL();
+            return measument.BL_S();
         }
     };
 

http://dive4elements.wald.intevation.org