comparison flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java @ 294:e5e7af208857

Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts. flys-artifacts/trunk@1632 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 31 Mar 2011 10:54:07 +0000
parents
children 8940b0885865
comparison
equal deleted inserted replaced
293:3419b1c8ca28 294:e5e7af208857
1 package de.intevation.flys.exports;
2
3 import java.io.OutputStream;
4
5 import org.w3c.dom.Document;
6
7 import de.intevation.artifacts.Artifact;
8 import de.intevation.artifacts.CallContext;
9
10
11 /**
12 * An OutGenerator is used to create a collected outputs of a list of Artifacts.
13 *
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
15 */
16 public interface OutGenerator {
17
18 /**
19 * Initializes the OutGenerator with meta information which are necessary
20 * for the output generation.
21 *
22 * @param request The incomding request document.
23 * @param out The output stream.
24 * @param context The CallContext that provides further information and
25 * objects used for the output generation.
26 */
27 void init(Document request, OutputStream out, CallContext context);
28
29 /**
30 * Creates the output of an Artifact and appends that single output to the
31 * total output.
32 *
33 * @param artifact The artifact that provides information and data for the
34 * single output.
35 * @param attr A document that might contain some attributes used while
36 * producing the output.
37 */
38 void doOut(Artifact artifact, Document attr);
39
40 /**
41 * Writes the collected output of all artifacts specified in the
42 * <i>request</i> (see init()) document to the OutputStream <i>out</i> (see
43 * init()).
44 */
45 void generate();
46 }
47 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org