Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java @ 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 | a5fb0a2dfe2f |
children | 368d1837ce5d |
comparison
equal
deleted
inserted
replaced
3112:cbb033073037 | 3113:c04408ec4c9c |
---|---|
40 } | 40 } |
41 | 41 |
42 | 42 |
43 /** | 43 /** |
44 * Setup and restate longitudinal_section filterfacets to apply to the | 44 * Setup and restate longitudinal_section filterfacets to apply to the |
45 * w_differences output, too. | 45 * w_differences output, too. Also, for w_differences, add respective q- |
46 * filter facets. | |
46 */ | 47 */ |
47 public void setup( | 48 public void setup( |
48 String identifier, | 49 String identifier, |
49 ArtifactFactory factory, | 50 ArtifactFactory factory, |
50 Object context, | 51 Object context, |
51 CallMeta callMeta, | 52 CallMeta callMeta, |
52 Document data) | 53 Document data) |
53 { | 54 { |
54 super.setup(identifier, factory, context, callMeta, data); | 55 super.setup(identifier, factory, context, callMeta, data); |
56 // For w_differences, also allow q-facets. | |
55 if(filterFacets != null) { | 57 if(filterFacets != null) { |
56 List<Facet> list = new ArrayList<Facet>(); | 58 List<Facet> list = new ArrayList<Facet>(); |
57 List<Facet> qlist = new ArrayList<Facet>(); | |
58 List<Facet> wlist = filterFacets.get("longitudinal_section"); | 59 List<Facet> wlist = filterFacets.get("longitudinal_section"); |
59 for (Facet f: wlist) { | 60 for (Facet f: wlist) { |
60 if (!f.getName().equals("longitudinal_section.q")) { | 61 if (!f.getName().equals("longitudinal_section.q")) { |
61 DefaultFacet df = new DefaultFacet(f.getIndex(), | 62 DefaultFacet df = new DefaultFacet(f.getIndex(), |
62 "longitudinal_section.q", ""); | 63 "longitudinal_section.q", ""); |
63 qlist.add(df); | 64 list.add(df); |
64 } | 65 } |
65 } | 66 } |
66 | 67 |
67 list.addAll(qlist); | |
68 list.addAll(wlist); | 68 list.addAll(wlist); |
69 | 69 |
70 filterFacets.put("longitudinal_section", list); | |
71 filterFacets.put("w_differences", list); | 70 filterFacets.put("w_differences", list); |
72 } | 71 } |
73 } | 72 } |
74 | 73 |
75 | 74 |