[Dive4elements-commits] [PATCH] Fixed facet activities

Wald Commits scm-commit at wald.intevation.org
Wed Jan 9 13:17:40 CET 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1357733829 -3600
# Node ID c0d6391bec6fb7a993f3a5460ca5b29add81a58c
# Parent  8b609ea08128d79d08475a45b8c31c0929beb79a
Fixed facet activities.

Return true for active facets only if the facet name is known.

diff -r 8b609ea08128 -r c0d6391bec6f flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java	Wed Jan 09 09:19:32 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java	Wed Jan 09 13:17:09 2013 +0100
@@ -276,13 +276,19 @@
                     String   output
                 ) {
                     String name = facet.getName();
-                    if (name.equals(FLOW_VELOCITY_MAINCHANNEL) ||
+                    if (name.equals(FLOW_VELOCITY_MAINCHANNEL_FILTERED) ||
+                        name.equals(FLOW_VELOCITY_TAU_FILTERED) ||
+                        name.equals(FLOW_VELOCITY_DISCHARGE) ||
+                        name.equals(FLOW_VELOCITY_TOTALCHANNEL_FILTERED)) {
+                        return Boolean.TRUE;
+                    }
+                    else if (name.equals(FLOW_VELOCITY_MAINCHANNEL) ||
                         name.equals(FLOW_VELOCITY_TAU) ||
                         name.equals(FLOW_VELOCITY_TOTALCHANNEL)) {
                         return Boolean.FALSE;
                     }
                     else {
-                        return Boolean.TRUE;
+                        return null;
                     }
                 }
             });
diff -r 8b609ea08128 -r c0d6391bec6f flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/DifferencesState.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/DifferencesState.java	Wed Jan 09 09:19:32 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/DifferencesState.java	Wed Jan 09 13:17:09 2013 +0100
@@ -384,8 +384,18 @@
                         name.equals(BED_DIFFERENCE_YEAR_HEIGHT2)) {
                         return Boolean.FALSE;
                     }
+                    else if (name.equals(BED_DIFFERENCE_MORPH_WIDTH) ||
+                        name.equals(BED_DIFFERENCE_EPOCH_FILTERED) ||
+                        name.equals(BED_DIFFERENCE_EPOCH_HEIGHT1_FILTERED) ||
+                        name.equals(BED_DIFFERENCE_EPOCH_HEIGHT2_FILTERED) ||
+                        name.equals(BED_DIFFERENCE_HEIGHT_YEAR_FILTERED) ||
+                        name.equals(BED_DIFFERENCE_YEAR_FILTERED) ||
+                        name.equals(BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED) ||
+                        name.equals(BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED)){
+                        return Boolean.TRUE;
+                    }
                     else {
-                        return Boolean.TRUE;
+                        return null;
                     }
                 }
             });


More information about the Dive4elements-commits mailing list