diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 412:046bd86ae41d

Improved the OutGenerator interface to set a master artifact for the out generation. flys-artifacts/trunk@1874 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 10 May 2011 10:26:26 +0000
parents a67748ad4d61
children 9c565eb46f06
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Tue May 10 07:40:06 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Tue May 10 10:26:26 2011 +0000
@@ -147,6 +147,8 @@
 
         generator.init(format, out, context);
 
+        // TODO Determine the correct master artifact here!
+
         try {
             doOut(generator, name, type, getAttribute(context, name), context);
         }
@@ -203,8 +205,14 @@
                     continue;
                 }
 
+                // TODO Remove the following two lines of code! The master
+                // artifact has to be determined correctly after
+                // OutGenerator.init is called!
+                Artifact artifact = getArtifact(art, context);
+                generator.setMasterArtifact(artifact);
+
                 generator.doOut(
-                    getArtifact(art, context),
+                    artifact,
                     facetName,
                     getFacetThemeFromAttribute(
                         art,

http://dive4elements.wald.intevation.org