Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java @ 7593:60a5fc522ec4
Rename the Global Facet filter to reduce ambiguity with the old facet filter
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 21 Nov 2013 15:37:43 +0100 |
parents | 965dbf2d4c44 |
children | da412a6c4f39 |
comparison
equal
deleted
inserted
replaced
7592:c2acc840963b | 7593:60a5fc522ec4 |
---|---|
1285 } | 1285 } |
1286 if (debug) { | 1286 if (debug) { |
1287 log.debug("State '" + stateId + "' has facets " + fs); | 1287 log.debug("State '" + stateId + "' has facets " + fs); |
1288 } | 1288 } |
1289 | 1289 |
1290 List<Output> gen = generateOutputs(list, filterFacets(fs)); | 1290 List<Output> gen = generateOutputs(list, applyGlobalFilterFacets(fs)); |
1291 | 1291 |
1292 if (debug) { | 1292 if (debug) { |
1293 log.debug("State '" + stateId + "' has " + gen.size() + " outs"); | 1293 log.debug("State '" + stateId + "' has " + gen.size() + " outs"); |
1294 } | 1294 } |
1295 | 1295 |
1296 return gen; | 1296 return gen; |
1297 } | 1297 } |
1298 | 1298 |
1299 /** If we use a facet filter that bases the list of compatible facets | 1299 /** If we use a facet filter that bases the list of compatible facets |
1300 * on the output this artifact is bound to then this returns true */ | 1300 * on the output this artifact is bound to then this returns true */ |
1301 public boolean usesOutputFacetFilter() { | 1301 public boolean usesOutputGlobalFacetFilter() { |
1302 if (boundToOut == null || boundToOut.isEmpty()) { | 1302 if (boundToOut == null || boundToOut.isEmpty()) { |
1303 return false; | 1303 return false; |
1304 } | 1304 } |
1305 | 1305 |
1306 FacetFilter facetFilter = | 1306 FacetFilter facetFilter = |
1311 } | 1311 } |
1312 | 1312 |
1313 /** If a global facet filter and a bounded out are defined | 1313 /** If a global facet filter and a bounded out are defined |
1314 * use them to eliminate unwished facets. | 1314 * use them to eliminate unwished facets. |
1315 */ | 1315 */ |
1316 protected List<Facet> filterFacets(List<Facet> facets) { | 1316 protected List<Facet> applyGlobalFilterFacets(List<Facet> facets) { |
1317 if (!usesOutputFacetFilter()) { | 1317 if (!usesOutputGlobalFacetFilter()) { |
1318 return facets; | 1318 return facets; |
1319 } | 1319 } |
1320 | 1320 |
1321 FacetFilter facetFilter = | 1321 FacetFilter facetFilter = |
1322 (FacetFilter)RiverContextFactory.getGlobalContext() | 1322 (FacetFilter)RiverContextFactory.getGlobalContext() |
1346 if (debug) { | 1346 if (debug) { |
1347 log.debug("generateOutputs for Artifact " + getName() + " " | 1347 log.debug("generateOutputs for Artifact " + getName() + " " |
1348 + identifier()); | 1348 + identifier()); |
1349 } | 1349 } |
1350 | 1350 |
1351 boolean useFacetFilter = usesOutputFacetFilter(); | 1351 boolean useFacetFilter = usesOutputGlobalFacetFilter(); |
1352 | 1352 |
1353 for (Output out: list) { | 1353 for (Output out: list) { |
1354 if (debug) { | 1354 if (debug) { |
1355 log.debug("check facets for output: " + out.getName()); | 1355 log.debug("check facets for output: " + out.getName()); |
1356 } | 1356 } |