comparison artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java @ 7178:12248d9eb326 3.0.16

Only filter the facets for unbound outs
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 26 Sep 2013 19:15:17 +0200
parents fbbba09ac6a8
children 744df5a03337
comparison
equal deleted inserted replaced
7177:336d7690b38c 7178:12248d9eb326
1303 1303
1304 boolean debug = log.isDebugEnabled(); 1304 boolean debug = log.isDebugEnabled();
1305 1305
1306 for (Output out: list) { 1306 for (Output out: list) {
1307 log.debug("check facets for output: " + out.getName()); 1307 log.debug("check facets for output: " + out.getName());
1308 String outName = out.getName();
1308 Output o = new DefaultOutput( 1309 Output o = new DefaultOutput(
1309 out.getName(), 1310 outName,
1310 out.getDescription(), 1311 out.getDescription(),
1311 out.getMimeType(), 1312 out.getMimeType(),
1312 out.getType()); 1313 out.getType());
1313 1314
1314 Set<String> outTypes = new HashSet<String>(); 1315 Set<String> outTypes = new HashSet<String>();
1321 1322
1322 boolean facetAdded = false; 1323 boolean facetAdded = false;
1323 for (Facet f: fs) { 1324 for (Facet f: fs) {
1324 String type = f.getName(); 1325 String type = f.getName();
1325 1326
1326 if (outTypes.contains(type)) { 1327 /* Match the facets to the output configuration.
1328 * This is only done when we are not already bound to an out.
1329 * If we are bound we come from the datacage so the user has
1330 * explicitly requested our nice and shiny facets. And who
1331 * are we to deny them to him. */
1332 if (outTypes.contains(type) ||
1333 (boundToOut != null &&
1334 boundToOut.equals(outName))) {
1327 if (debug) { 1335 if (debug) {
1328 log.debug("Add facet " + f); 1336 log.debug("Add facet " + f);
1329 } 1337 }
1330 facetAdded = true; 1338 facetAdded = true;
1331 o.addFacet(f); 1339 o.addFacet(f);

http://dive4elements.wald.intevation.org