Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java @ 5831:bd047b71ab37
Repaired internal references
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:06:39 +0200 |
parents | flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java@118fe1cc8cc8 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java Thu Apr 25 12:06:39 2013 +0200 @@ -0,0 +1,83 @@ +package org.dive4elements.river.exports; + +import java.io.IOException; +import java.io.OutputStream; + +import org.w3c.dom.Document; + +import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; +import org.dive4elements.artifactdatabase.state.Settings; +import org.dive4elements.artifacts.Artifact; +import org.dive4elements.artifacts.CallContext; +import org.dive4elements.river.collections.FLYSArtifactCollection; + + +/** + * An OutGenerator is used to create a collected outputs of a list of Artifacts. + * + * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> + */ +public interface OutGenerator { + + /** + * Initializes the OutGenerator with meta information which are necessary + * for the output generation. + * + * @param request The incomding request document. + * @param out The output stream. + * @param context The CallContext that provides further information and + * objects used for the output generation. + */ + void init(Document request, OutputStream out, CallContext context); + + /** + * This method is used to tell the OutGenerator which artifact is the master + * artifact which is used for special operations. + * + * @param master The master artifact. + */ + void setMasterArtifact(Artifact master); + + /** + * This method is used to set the Collection of the OutGenerator. + * + * @param collection A reference to the collection. + */ + void setCollection(FLYSArtifactCollection collection); + + /** + * Creates the output of an Artifact and appends that single output to the + * total output. + * + * @param bundle The Facet and artifact that provides information and data for the + * single output. + * @param attr A document that might contain some attributes used while + * producing the output. + * @param visible Specifies, if this output should be visible or not. + */ + void doOut(ArtifactAndFacet bundle, Document attr, boolean visible); + + /** + * Writes the collected output of all artifacts specified in the + * <i>request</i> (see init()) document to the OutputStream <i>out</i> (see + * init()). + */ + void generate() throws IOException; + + /** + * This method is used to set a <i>Settings</i> object for the <i>Output</i> + * that is produced by this <i>OutGenerator</i>. + * + * @param settings The <i>Settings</i> that might be used while + * <i>Output</i> creation. + */ + void setSettings(Settings settings); + + /** + * Returns the Settings for the Output produced by this OutGenerator. + * + * @return the Settings for the Output produced by this OutGenerator. + */ + Settings getSettings(); +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :