diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java @ 5396:aaf810d4ec82

Use new state 'outlier mehtod selection' in SQ-relation. The outlier method is no more configurable in conf.xml. The user can now select the method in SQ-relation parameters.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 25 Mar 2013 12:40:26 +0100
parents ba2f0bff0697
children
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java	Mon Mar 25 12:35:08 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/SQRelationCalculation.java	Mon Mar 25 12:40:26 2013 +0100
@@ -28,6 +28,7 @@
     protected double    location;
     protected DateRange period;
     protected double    outliers;
+    private   String    method;
 
     public SQRelationCalculation() {
     }
@@ -38,6 +39,7 @@
         Double    location = access.getLocation();
         DateRange period   = access.getPeriod();
         Double    outliers = access.getOutliers();
+        String    method   = access.getOutlierMethod();
 
         //river = "Rhein";
 
@@ -61,11 +63,17 @@
             addProblem("sq.missing.outliers");
         }
 
+        if (method == null) {
+            //TODO: i18n
+            addProblem("sq.missing.method");
+        }
+
         if (!hasProblems()) {
             this.river    = river;
             this.location = location;
             this.period   = period;
             this.outliers = outliers;
+            this.method   = method;
         }
     }
 
@@ -140,6 +148,7 @@
 
         boolean success = new Fitting(function, outliers).fit(
             sqs,
+            method,
             new Fitting.Callback() {
                 @Override
                 public void afterIteration(

http://dive4elements.wald.intevation.org