comparison artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java @ 6140:60b94dec104b

Add handling of bound artifacts. When an artifact is bound to an out its facets will only be shown in that Out. They will be removed in the blackboard pass and marked as incompatible by the AttributeWriter
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 31 May 2013 15:29:30 +0200
parents af13ceeba52a
children d4a3031448d3
comparison
equal deleted inserted replaced
6139:7c2a30198592 6140:60b94dec104b
186 boolean debug = logger.isDebugEnabled(); 186 boolean debug = logger.isDebugEnabled();
187 if (debug) { 187 if (debug) {
188 logger.debug("Compatible facets are " + compatibleFacets); 188 logger.debug("Compatible facets are " + compatibleFacets);
189 } 189 }
190 190
191 for (int i = 0; i < num; i++) { 191 for (Facet fac: newFacets) {
192 ManagedFacet facet = (ManagedFacet) newFacets.get(i); 192 ManagedFacet facet = (ManagedFacet) fac;
193 193
194 if (debug) { 194 if (debug) {
195 logger.debug("Try to add Facet: " + facet.getName()); 195 logger.debug("Try to add Facet: " + facet.getName());
196 } 196 }
197 197
198 if (!compatibleFacets.contains(facet.getName())) { 198 if (!compatibleFacets.contains(facet.getName())) {
199 logger.warn("Have incompatible facet, skip: " + facet.getName()); 199 logger.debug("Have incompatible facet, skip: " + facet.getName());
200 continue; 200 continue;
201 } 201 } else if (facet.getBoundToOut() != null &&
202 else { 202 !facet.getBoundToOut().equals(outputName)) {
203 logger.debug("Skip facet " + facet.getName() +
204 " because it is bound to: " + facet.getBoundToOut());
205 continue;
206 } else {
207 logger.debug("Facet is bound to: " + facet.getBoundToOut());
203 logger.debug("Have compatible facet: " + facet.getName()); 208 logger.debug("Have compatible facet: " + facet.getName());
204 } 209 }
205 210
206 ManagedFacet picked = pickFacet(facet, oldFacets); 211 ManagedFacet picked = pickFacet(facet, oldFacets);
207 212

http://dive4elements.wald.intevation.org