comparison artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
1 package org.dive4elements.river.exports;
2
3 import java.io.IOException;
4 import java.io.OutputStream;
5
6 import org.w3c.dom.Document;
7
8 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
9 import org.dive4elements.artifactdatabase.state.Settings;
10 import org.dive4elements.artifacts.Artifact;
11 import org.dive4elements.artifacts.CallContext;
12 import org.dive4elements.river.collections.FLYSArtifactCollection;
13
14
15 /**
16 * An OutGenerator is used to create a collected outputs of a list of Artifacts.
17 *
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
19 */
20 public interface OutGenerator {
21
22 /**
23 * Initializes the OutGenerator with meta information which are necessary
24 * for the output generation.
25 *
26 * @param request The incomding request document.
27 * @param out The output stream.
28 * @param context The CallContext that provides further information and
29 * objects used for the output generation.
30 */
31 void init(Document request, OutputStream out, CallContext context);
32
33 /**
34 * This method is used to tell the OutGenerator which artifact is the master
35 * artifact which is used for special operations.
36 *
37 * @param master The master artifact.
38 */
39 void setMasterArtifact(Artifact master);
40
41 /**
42 * This method is used to set the Collection of the OutGenerator.
43 *
44 * @param collection A reference to the collection.
45 */
46 void setCollection(FLYSArtifactCollection collection);
47
48 /**
49 * Creates the output of an Artifact and appends that single output to the
50 * total output.
51 *
52 * @param bundle The Facet and artifact that provides information and data for the
53 * single output.
54 * @param attr A document that might contain some attributes used while
55 * producing the output.
56 * @param visible Specifies, if this output should be visible or not.
57 */
58 void doOut(ArtifactAndFacet bundle, Document attr, boolean visible);
59
60 /**
61 * Writes the collected output of all artifacts specified in the
62 * <i>request</i> (see init()) document to the OutputStream <i>out</i> (see
63 * init()).
64 */
65 void generate() throws IOException;
66
67 /**
68 * This method is used to set a <i>Settings</i> object for the <i>Output</i>
69 * that is produced by this <i>OutGenerator</i>.
70 *
71 * @param settings The <i>Settings</i> that might be used while
72 * <i>Output</i> creation.
73 */
74 void setSettings(Settings settings);
75
76 /**
77 * Returns the Settings for the Output produced by this OutGenerator.
78 *
79 * @return the Settings for the Output produced by this OutGenerator.
80 */
81 Settings getSettings();
82 }
83 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org