changeset 3113:c04408ec4c9c

Do not automatically load q-facets outside of w_differences. flys-artifacts/trunk@4712 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 19 Jun 2012 19:30:22 +0000
parents cbb033073037
children 6c91e05a5f51
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java
diffstat 2 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Jun 19 18:41:04 2012 +0000
+++ b/flys-artifacts/ChangeLog	Tue Jun 19 19:30:22 2012 +0000
@@ -1,3 +1,8 @@
+2012-06-19	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java:
+	  Restrict q-filter facet to the differences case.
+
 2012-06-19	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* doc/conf/artifacts/waterlevel.xml: Add Q-facets to compatibility list.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Tue Jun 19 18:41:04 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Tue Jun 19 19:30:22 2012 +0000
@@ -42,7 +42,8 @@
 
     /**
      * Setup and restate longitudinal_section filterfacets to apply to the
-     * w_differences output, too.
+     * w_differences output, too. Also, for w_differences, add respective q-
+     * filter facets.
      */
     public void setup(
         String          identifier,
@@ -52,22 +53,20 @@
         Document        data)
     {
         super.setup(identifier, factory, context, callMeta, data);
+        // For w_differences, also allow q-facets.
         if(filterFacets != null) {
             List<Facet> list = new ArrayList<Facet>();
-            List<Facet> qlist = new ArrayList<Facet>();
             List<Facet> wlist = filterFacets.get("longitudinal_section");
             for (Facet f: wlist) {
                 if (!f.getName().equals("longitudinal_section.q")) {
                     DefaultFacet df = new DefaultFacet(f.getIndex(),
                         "longitudinal_section.q", ""); 
-                    qlist.add(df);
+                    list.add(df);
                 }
             }
 
-            list.addAll(qlist);
             list.addAll(wlist);
 
-            filterFacets.put("longitudinal_section", list);
             filterFacets.put("w_differences", list);
         }
     }

http://dive4elements.wald.intevation.org