Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/exports/OutGenerator.java @ 5369:a0c807165bcd
FacetTypes: Add two new Facet types for mainvalues in hist. w/q diagrams.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 09:07:22 +0100 |
parents | 118fe1cc8cc8 |
children |
rev | line source |
---|---|
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.exports; |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
299
8940b0885865
Added a DischargeCurveGenerator that creates discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
294
diff
changeset
|
3 import java.io.IOException; |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.io.OutputStream; |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import org.w3c.dom.Document; |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1684
diff
changeset
|
8 import de.intevation.artifactdatabase.state.ArtifactAndFacet; |
1979
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
9 import de.intevation.artifactdatabase.state.Settings; |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.artifacts.Artifact; |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.artifacts.CallContext; |
3422
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
12 import de.intevation.flys.collections.FLYSArtifactCollection; |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
1962
59622ba800c8
Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1948
diff
changeset
|
14 |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 /** |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 * An OutGenerator is used to create a collected outputs of a list of Artifacts. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 * |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 */ |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 public interface OutGenerator { |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 /** |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 * Initializes the OutGenerator with meta information which are necessary |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * for the output generation. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 * @param request The incomding request document. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 * @param out The output stream. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 * @param context The CallContext that provides further information and |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 * objects used for the output generation. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 */ |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 void init(Document request, OutputStream out, CallContext context); |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 /** |
412
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
34 * This method is used to tell the OutGenerator which artifact is the master |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
35 * artifact which is used for special operations. |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
36 * |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
37 * @param master The master artifact. |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
38 */ |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
39 void setMasterArtifact(Artifact master); |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
40 |
046bd86ae41d
Improved the OutGenerator interface to set a master artifact for the out generation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
364
diff
changeset
|
41 /** |
3422
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
42 * This method is used to set the Collection of the OutGenerator. |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
43 * |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
44 * @param collection A reference to the collection. |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
45 */ |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
46 void setCollection(FLYSArtifactCollection collection); |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
47 |
118fe1cc8cc8
OutGenerators got a setCollection() method; analogous to setMasterArtifact(). Registered the SQOverviewGenerator as OutGenerator for 'sq_overview' Output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3270
diff
changeset
|
48 /** |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 * Creates the output of an Artifact and appends that single output to the |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 * total output. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 * |
3270
4ac581062c40
Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2047
diff
changeset
|
52 * @param bundle The Facet and artifact that provides information and data for the |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 * single output. |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 * @param attr A document that might contain some attributes used while |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 * producing the output. |
1684
bdb05dc9b763
Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
695
diff
changeset
|
56 * @param visible Specifies, if this output should be visible or not. |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 */ |
1944
21a4d2c677a1
Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1684
diff
changeset
|
58 void doOut(ArtifactAndFacet bundle, Document attr, boolean visible); |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 /** |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 * Writes the collected output of all artifacts specified in the |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 * <i>request</i> (see init()) document to the OutputStream <i>out</i> (see |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 * init()). |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 */ |
299
8940b0885865
Added a DischargeCurveGenerator that creates discharge curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
294
diff
changeset
|
65 void generate() throws IOException; |
1979
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
66 |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
67 /** |
2047
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
68 * This method is used to set a <i>Settings</i> object for the <i>Output</i> |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
69 * that is produced by this <i>OutGenerator</i>. |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
70 * |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
71 * @param settings The <i>Settings</i> that might be used while |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
72 * <i>Output</i> creation. |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
73 */ |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
74 void setSettings(Settings settings); |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
75 |
0318fa6f0844
Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1979
diff
changeset
|
76 /** |
1979
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
77 * Returns the Settings for the Output produced by this OutGenerator. |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
78 * |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
79 * @return the Settings for the Output produced by this OutGenerator. |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
80 */ |
a7c437c9547e
Added a getSettings() operation to OutGenerator - FLYSArtifactCollection will now evaluate all available Outputs and create initial Settings using OutGenerators if the Settings for an Output is missing.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1962
diff
changeset
|
81 Settings getSettings(); |
294
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 } |
e5e7af208857
Added an OutGenerator interface that might be used to generator collected outputs of a set of artifacts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |