changeset 1995:f114c0d55d19

Little optimisation when writing CollectionAttributes flys-artifacts/trunk@3432 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 16 Dec 2011 10:08:39 +0000
parents 3e703d134bbe
children c6432e8ea31e
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Dec 16 09:56:32 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Dec 16 10:08:39 2011 +0000
@@ -1,3 +1,8 @@
+2011-12-16	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/collections/AttributeWriter.java:
+	  Directly fetch key/value pairs when writing a collection attribute.
+
 2011-12-16  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/ChartSettings.java: Added new
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java	Fri Dec 16 09:56:32 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java	Fri Dec 16 10:08:39 2011 +0000
@@ -90,8 +90,9 @@
      * @return document with merged outputs as described.
      */
     protected CollectionAttribute write() {
-        for (String outName: newAttr.keySet()) {
-            Output a = newAttr.get(outName);
+        for (Map.Entry<String, Output> entry: newAttr.entrySet()) {
+            String outName = entry.getKey();
+            Output a       = entry.getValue();
             attribute.clearFacets(outName);
 
             writeOutput(a.getName(), newFacets, oldFacets);

http://dive4elements.wald.intevation.org