comparison 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
comparison
equal deleted inserted replaced
411:6ab62e5b05b5 412:046bd86ae41d
145 return; 145 return;
146 } 146 }
147 147
148 generator.init(format, out, context); 148 generator.init(format, out, context);
149 149
150 // TODO Determine the correct master artifact here!
151
150 try { 152 try {
151 doOut(generator, name, type, getAttribute(context, name), context); 153 doOut(generator, name, type, getAttribute(context, name), context);
152 } 154 }
153 catch (ArtifactDatabaseException adbe) { 155 catch (ArtifactDatabaseException adbe) {
154 log.error(adbe, adbe); 156 log.error(adbe, adbe);
201 203
202 if (outName.equals("export") && !facetName.equals(facet)) { 204 if (outName.equals("export") && !facetName.equals(facet)) {
203 continue; 205 continue;
204 } 206 }
205 207
208 // TODO Remove the following two lines of code! The master
209 // artifact has to be determined correctly after
210 // OutGenerator.init is called!
211 Artifact artifact = getArtifact(art, context);
212 generator.setMasterArtifact(artifact);
213
206 generator.doOut( 214 generator.doOut(
207 getArtifact(art, context), 215 artifact,
208 facetName, 216 facetName,
209 getFacetThemeFromAttribute( 217 getFacetThemeFromAttribute(
210 art, 218 art,
211 outName, 219 outName,
212 facetName, 220 facetName,

http://dive4elements.wald.intevation.org