# HG changeset patch # User Felix Wolfsteller # Date 1340131235 0 # Node ID a5fb0a2dfe2f7a1ca20e07965145ab966bcca4dc # Parent 88d49a0a55f0f50ec94a35b9a2fc58a269255c70 Load q-type facets with w-facets for differences' base data. flys-artifacts/trunk@4710 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 88d49a0a55f0 -r a5fb0a2dfe2f flys-artifacts/doc/conf/artifacts/waterlevel.xml --- a/flys-artifacts/doc/conf/artifacts/waterlevel.xml Tue Jun 19 15:40:33 2012 +0000 +++ b/flys-artifacts/doc/conf/artifacts/waterlevel.xml Tue Jun 19 18:40:35 2012 +0000 @@ -8,6 +8,7 @@ + diff -r 88d49a0a55f0 -r a5fb0a2dfe2f flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java Tue Jun 19 15:40:33 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java Tue Jun 19 18:40:35 2012 +0000 @@ -1,5 +1,6 @@ package de.intevation.flys.artifacts; +import de.intevation.artifactdatabase.state.DefaultFacet; import de.intevation.artifactdatabase.state.Facet; import de.intevation.artifacts.Artifact; @@ -52,9 +53,22 @@ { super.setup(identifier, factory, context, callMeta, data); if(filterFacets != null) { - filterFacets.put( - "w_differences", - filterFacets.get("longitudinal_section")); + List list = new ArrayList(); + List qlist = new ArrayList(); + List 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.addAll(qlist); + list.addAll(wlist); + + filterFacets.put("longitudinal_section", list); + filterFacets.put("w_differences", list); } }