diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java @ 4041:75a90d9d2024

Register new calculation mode 'extreme'.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 05 Oct 2012 10:11:08 +0200
parents d548e2e13524
children eb5564662e19
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java	Fri Oct 05 10:09:07 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/CalculationSelect.java	Fri Oct 05 10:11:08 2012 +0200
@@ -58,6 +58,10 @@
     public static final String CALCULATION_HISTORICAL_DISCHARGE_CURVE =
         "calc.historical.discharge.curve";
 
+    /** Constant value for the extreme W curve calculation. */
+    public static final String CALCULATION_EXTREME =
+        "calc.extreme.curve";
+
     /** An array that holds all available calculation modes. */
     public static final String[] CALCULATIONS = {
         CALCULATION_SURFACE_CURVE,
@@ -67,7 +71,8 @@
         CALCULATION_DURATION_CURVE,
         CALCULATION_DISCHARGE_LONGITUDINAL_CURVE,
         CALCULATION_W_DIFFERENCES,
-        CALCULATION_REFERENCE_CURVE };
+        CALCULATION_REFERENCE_CURVE,
+        CALCULATION_EXTREME};
 
 
     /** Error message that is thrown if no mode has been chosen. */
@@ -84,6 +89,7 @@
     }
 
 
+    /** Create choices (i18ned). */
     @Override
     protected Element[] createItems(
         XMLUtils.ElementCreator cr,
@@ -107,6 +113,7 @@
     }
 
 
+    /** Validate the chosen calculation. */
     @Override
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException

http://dive4elements.wald.intevation.org