Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 3315:e2d355da4bd6
FLYSArtifactCollection: Lowered log level.
flys-artifacts/trunk@5005 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 15 Jul 2012 16:00:55 +0000 |
parents | b92e86a78895 |
children | 2495b24147ff |
comparison
equal
deleted
inserted
replaced
3314:fbeed0ded014 | 3315:e2d355da4bd6 |
---|---|
84 | 84 |
85 Document oldAttrs = getAttribute(); | 85 Document oldAttrs = getAttribute(); |
86 AttributeParser parser = new AttributeParser(oldAttrs); | 86 AttributeParser parser = new AttributeParser(oldAttrs); |
87 | 87 |
88 try { | 88 try { |
89 String[] aUUIDs = getArtifactUUIDs(context); | 89 String[] aUUIDs = getArtifactUUIDs(context); |
90 | 90 |
91 oldAttrs = removeAttributes(oldAttrs, context); | 91 oldAttrs = removeAttributes(oldAttrs, context); |
92 parser = new AttributeParser(oldAttrs); | 92 parser = new AttributeParser(oldAttrs); |
93 | 93 |
94 CollectionAttribute newAttr = mergeAttributes( | 94 CollectionAttribute newAttr = mergeAttributes( |
98 saveCollectionAttribute(db, context, newAttr); | 98 saveCollectionAttribute(db, context, newAttr); |
99 } | 99 } |
100 | 100 |
101 helper.setAttribute(newAttr); | 101 helper.setAttribute(newAttr); |
102 | 102 |
103 // Make it an empty array if null. | 103 if (aUUIDs != null) { |
104 if (aUUIDs == null) { | 104 for (String uuid: aUUIDs) { |
105 aUUIDs = new String[] {}; | 105 helper.addArtifact(uuid); |
106 } | 106 } |
107 | |
108 for (String uuid: aUUIDs) { | |
109 helper.addArtifact(uuid); | |
110 } | 107 } |
111 } | 108 } |
112 catch (ArtifactDatabaseException ade) { | 109 catch (ArtifactDatabaseException ade) { |
113 log.error("Error while merging attribute documents.", ade); | 110 log.error("Error while merging attribute documents.", ade); |
114 | 111 |
332 Document format, | 329 Document format, |
333 OutputStream out, | 330 OutputStream out, |
334 CallContext context) | 331 CallContext context) |
335 throws IOException | 332 throws IOException |
336 { | 333 { |
334 boolean debug = log.isDebugEnabled(); | |
335 | |
337 long reqBegin = System.currentTimeMillis(); | 336 long reqBegin = System.currentTimeMillis(); |
338 | 337 |
339 log.info("FLYSArtifactCollection.out"); | 338 if (debug) { |
339 log.debug("FLYSArtifactCollection.out"); | |
340 } | |
340 | 341 |
341 String name = XMLUtils.xpathString( | 342 String name = XMLUtils.xpathString( |
342 format, XPATH_OUT_NAME, ArtifactNamespaceContext.INSTANCE); | 343 format, XPATH_OUT_NAME, ArtifactNamespaceContext.INSTANCE); |
343 | 344 |
344 String subtype = XMLUtils.xpathString( | 345 String subtype = XMLUtils.xpathString( |
345 format, XPATH_OUT_TYPE, ArtifactNamespaceContext.INSTANCE); | 346 format, XPATH_OUT_TYPE, ArtifactNamespaceContext.INSTANCE); |
346 | 347 |
347 log.info("-> Output name = " + name); | 348 if (debug) { |
348 log.info("-> Output type = " + type); | 349 log.debug("-> Output name = " + name); |
349 log.info("-> Output subtype = " + subtype); | 350 log.debug("-> Output type = " + type); |
351 log.debug("-> Output subtype = " + subtype); | |
352 } | |
350 | 353 |
351 OutGenerator generator = null; | 354 OutGenerator generator = null; |
352 if (type != null | 355 if (type != null |
353 && type.length() > 0 | 356 && type.length() > 0 |
354 && type.indexOf("chartinfo") > 0) | 357 && type.indexOf("chartinfo") > 0) |