Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 705:853dceead0f4
Only generate facets when needed.
flys-artifacts/trunk@2157 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 18 Jun 2011 17:03:17 +0000 |
parents | eab5e5089d77 |
children | ddd8b37d5cd3 |
comparison
equal
deleted
inserted
replaced
704:eab5e5089d77 | 705:853dceead0f4 |
---|---|
242 Output o = new DefaultOutput( | 242 Output o = new DefaultOutput( |
243 out.getName(), | 243 out.getName(), |
244 out.getDescription(), | 244 out.getDescription(), |
245 out.getMimeType()); | 245 out.getMimeType()); |
246 | 246 |
247 Set<String> outtype = new HashSet<String>(); | 247 Set<String> outTypes = new HashSet<String>(); |
248 | 248 |
249 for (Facet f: out.getFacets()) { | 249 for (Facet f: out.getFacets()) { |
250 outtype.add(f.getName()); | 250 outTypes.add(f.getName()); |
251 } | 251 } |
252 | 252 |
253 for (Facet f: fs) { | 253 for (Facet f: fs) { |
254 String type = f.getName(); | 254 String type = f.getName(); |
255 | 255 |
256 if(outtype.contains(type)) { | 256 if (outTypes.contains(type)) { |
257 o.addFacet(f); | 257 o.addFacet(f); |
258 } | 258 } |
259 } | 259 } |
260 | 260 |
261 generated.add(o); | 261 generated.add(o); |