comparison artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java @ 8225:724081af301c

Pass request document to the context injectors.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 08 Sep 2014 16:14:43 +0200
parents 1d3d61c8f596
children 4d99606a844e
comparison
equal deleted inserted replaced
8224:18c737ec098b 8225:724081af301c
328 return null; 328 return null;
329 } 329 }
330 330
331 // XXX NOTE: the outGen is not able to process its generate() operation, 331 // XXX NOTE: the outGen is not able to process its generate() operation,
332 // because it has no OutputStream set! 332 // because it has no OutputStream set!
333 outGen.init(out, XMLUtils.newDocument(), null, getContext()); 333 Document dummy = XMLUtils.newDocument();
334 outGen.init(out, dummy, null, getContext());
334 prepareMasterArtifact(outGen); 335 prepareMasterArtifact(outGen);
335 336
336 try { 337 try {
337 Document outAttr = getAttribute(attr, out); 338 Document outAttr = getAttribute(attr, out);
338 OutputHelper helper = new OutputHelper(identifier()); 339 OutputHelper helper = new OutputHelper(identifier());
339 helper.doOut(outGen, out, out, outAttr, getContext()); 340 helper.doOut(outGen, out, out, outAttr, getContext(), dummy);
340 } 341 }
341 catch (ArtifactDatabaseException adbe) { 342 catch (ArtifactDatabaseException adbe) {
342 log.error(adbe, adbe); 343 log.error(adbe, adbe);
343 } 344 }
344 catch (IOException ioe) { 345 catch (IOException ioe) {
420 421
421 try { 422 try {
422 Document attr = getAttribute(cAttr, name); 423 Document attr = getAttribute(cAttr, name);
423 OutputHelper helper = new OutputHelper(identifier()); 424 OutputHelper helper = new OutputHelper(identifier());
424 if (name.equals("sq_overview")) { 425 if (name.equals("sq_overview")) {
425 helper.doOut(generator, name, subtype, format, context); 426 helper.doOut(generator, name, subtype, format, context, format);
426 } 427 }
427 helper.doOut(generator, name, subtype, attr, context); 428 helper.doOut(generator, name, subtype, attr, context, format);
428 generator.generate(); 429 generator.generate();
429 } 430 }
430 catch (ArtifactDatabaseException adbe) { 431 catch (ArtifactDatabaseException adbe) {
431 log.error(adbe, adbe); 432 log.error(adbe, adbe);
432 } 433 }

http://dive4elements.wald.intevation.org