changeset 5458:e667c127b600

Removed column 'fraction' from sq relation parser and model.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 27 Mar 2013 13:02:53 +0100
parents 1b676aefaf3a
children 7c646d4d5103 c2bd97cd127f de3c77d35fef
files flys-backend/src/main/java/de/intevation/flys/importer/ImportSQRelationValue.java flys-backend/src/main/java/de/intevation/flys/importer/parsers/SQRelationParser.java flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java
diffstat 3 files changed, 2 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportSQRelationValue.java	Wed Mar 27 13:01:53 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportSQRelationValue.java	Wed Mar 27 13:02:53 2013 +0100
@@ -23,7 +23,6 @@
     private SQRelationValue peer;
 
     private String parameter;
-    private String fraction;
 
     private Double km;
     private Double a;
@@ -38,7 +37,6 @@
 
     public ImportSQRelationValue(
         String parameter,
-        String fraction,
         Double km,
         Double a,
         Double b,
@@ -50,7 +48,6 @@
         Double cDuan
     ) {
         this.parameter = parameter;
-        this.fraction  = fraction;
         this.km        = km;
         this.a         = a;
         this.b         = b;
@@ -91,7 +88,6 @@
                 "from SQRelationValue " +
                 "   where sqRelation=:owner " +
                 "   and parameter=:parameter" +
-                "   and fraction=:fraction" +
                 "   and measurementStation=:measurementStation" +
                 "   and a=:a" +
                 "   and b=:b" +
@@ -102,7 +98,6 @@
 
             query2.setParameter("owner", owner);
             query2.setString("parameter", parameter);
-            query2.setString("fraction", fraction);
             query2.setParameter("measurementStation", result.get(0));
             query2.setBigDecimal("a", toBigDecimal(a));
             query2.setBigDecimal("b", toBigDecimal(b));
@@ -117,7 +112,6 @@
                 peer = new SQRelationValue(
                     owner,
                     parameter,
-                    fraction,
                     result.get(0),
                     a,
                     b,
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SQRelationParser.java	Wed Mar 27 13:01:53 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/SQRelationParser.java	Wed Mar 27 13:02:53 2013 +0100
@@ -119,14 +119,13 @@
         Integer nOutlier = parseInteger(cols[11], line);
         Double cFer = parseDouble(cols[12], line);
         Double cDuan = parseDouble(cols[13], line);
-        if (km == null || a == null || b == null) {
-            log.error("Incomplete SQ-relation row (missing km, a or b): "
+        if (km == null || a == null || b == null || cols[1].length() == 0) {
+            log.error("Incomplete SQ-relation row (missing km, a, b or parameter): "
                 + line);
             return;
         }
         current.addValue(new ImportSQRelationValue(
             cols[1],
-            cols[2],
             km,
             a,
             b,
--- a/flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java	Wed Mar 27 13:01:53 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java	Wed Mar 27 13:02:53 2013 +0100
@@ -22,7 +22,6 @@
     private SQRelation sqRelation;
 
     private String parameter;
-    private String fraction;
 
     private MeasurementStation measurementStation;
 
@@ -43,7 +42,6 @@
     public SQRelationValue(
         SQRelation         sqRelation,
         String             parameter,
-        String             fraction,
         MeasurementStation measurementStation,
         Double             a,
         Double             b,
@@ -56,7 +54,6 @@
     ) {
         this.sqRelation         = sqRelation;
         this.parameter          = parameter;
-        this.fraction           = fraction;
         this.measurementStation = measurementStation;
         this.a                  = a;
         this.b                  = b;
@@ -107,17 +104,6 @@
         this.parameter = parameter;
     }
 
-
-    @Column(name = "fraction")
-    public String getFraction() {
-        return fraction;
-    }
-
-    public void setFraction(String fraction) {
-        this.fraction = fraction;
-    }
-
-
     @OneToOne
     @JoinColumn(name = "measurement_station_id")
     public MeasurementStation getMeasurementStation() {

http://dive4elements.wald.intevation.org