Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java @ 5867:59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:23:01 +0200 |
parents | 9a6741ccf6d4 |
children | af13ceeba52a |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
9 package org.dive4elements.river.exports.sq; |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 import java.awt.image.BufferedImage; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 import java.io.IOException; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 import java.io.OutputStream; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 import java.util.ArrayList; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 import java.util.HashMap; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 import java.util.List; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 import java.util.Map; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 import javax.imageio.ImageIO; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 import javax.xml.xpath.XPathConstants; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 import org.apache.log4j.Logger; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 import org.jfree.chart.ChartRenderingInfo; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 import org.jfree.chart.JFreeChart; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 import org.w3c.dom.Document; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 import org.w3c.dom.Element; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 import org.w3c.dom.Node; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
29 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
30 import org.dive4elements.artifactdatabase.state.Settings; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
31 import org.dive4elements.artifacts.Artifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
32 import org.dive4elements.artifacts.ArtifactDatabaseException; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
33 import org.dive4elements.artifacts.CallContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
34 import org.dive4elements.artifacts.common.ArtifactNamespaceContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
35 import org.dive4elements.artifacts.common.utils.XMLUtils; |
5866
9a6741ccf6d4
FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
36 import org.dive4elements.river.artifacts.context.RiverContext; |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5866
diff
changeset
|
37 import org.dive4elements.river.collections.D4EArtifactCollection; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
38 import org.dive4elements.river.exports.ChartGenerator; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
39 import org.dive4elements.river.exports.OutGenerator; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3425
diff
changeset
|
40 import org.dive4elements.river.exports.OutputHelper; |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 public class SQOverviewGenerator |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 implements OutGenerator |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 private static Logger logger = Logger.getLogger(SQOverviewGenerator.class); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 public static final String XPATH_CHART_SIZE = |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 "/art:action/art:attributes/art:size"; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5866
diff
changeset
|
50 protected D4EArtifactCollection collection; |
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:
3304
diff
changeset
|
51 |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 protected Artifact master; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 protected Settings settings; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 protected Document request; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 protected OutputStream out; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 protected CallContext context; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 protected List<JFreeChart> charts; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 /** |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 * Produce output. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 * @param artifactAndFacet current facet and artifact. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 * @param attr theme for facet |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 */ |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
69 @Override |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 public void doOut( |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 ArtifactAndFacet artifactAndFacet, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 Document attr, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 boolean visible |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 ) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 logger.debug("doOut()"); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 String name = artifactAndFacet.getData(context).toString(); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 if(name != null) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 logger.debug("name: " + name); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 ChartGenerator g = |
5866
9a6741ccf6d4
FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
81 (ChartGenerator)RiverContext.getOutGenerator( |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 context, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 name, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 null); |
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:
3304
diff
changeset
|
85 |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
86 if (g == null) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 logger.debug("generator is null."); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
88 return; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 } |
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:
3304
diff
changeset
|
90 |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
91 OutputHelper helper = new OutputHelper(master.identifier()); |
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:
3304
diff
changeset
|
92 Document collectionAttribute = collection.getAttribute(); |
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:
3304
diff
changeset
|
93 |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 try { |
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:
3304
diff
changeset
|
95 Document cAttr = getAttribute(context, collectionAttribute, name); |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
96 g.init(request, out, context); |
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:
3304
diff
changeset
|
97 |
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:
3304
diff
changeset
|
98 helper.doOut(g, name, name, cAttr, context); |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
99 JFreeChart chart = g.generateChart(); |
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
100 chart.removeLegend(); |
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
101 charts.add(chart); |
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:
3304
diff
changeset
|
102 } |
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:
3304
diff
changeset
|
103 catch (IOException e) { |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
104 logger.warn(e); |
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:
3304
diff
changeset
|
105 } |
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:
3304
diff
changeset
|
106 catch (ArtifactDatabaseException e) { |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 logger.warn(e); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
108 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
109 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
110 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
112 @Override |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
113 public void init(Document request, OutputStream out, CallContext context) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
114 this.request = request; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
115 this.out = out; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
116 this.context = context; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
117 charts = new ArrayList<JFreeChart>(); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
118 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
119 |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
120 @Override |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
121 public void setMasterArtifact(Artifact master) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
122 this.master = master; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
123 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
124 |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
125 @Override |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5866
diff
changeset
|
126 public void setCollection(D4EArtifactCollection collection) { |
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:
3304
diff
changeset
|
127 this.collection = 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:
3304
diff
changeset
|
128 } |
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:
3304
diff
changeset
|
129 |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
130 @Override |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
131 public void generate() throws IOException { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
132 logger.debug("SQOverviewGenerator.generate"); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
133 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
134 int[] size = getSize(); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
135 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
136 if (size == null) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
137 size = new int[] {400, 600}; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
138 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
139 BufferedImage result = |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
140 new BufferedImage(size[0], size[1], BufferedImage.TYPE_INT_RGB); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
141 for (int i = 0; i < charts.size(); i++) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
142 logger.debug("index: " + i); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
143 JFreeChart chart = charts.get(i); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
144 ChartRenderingInfo info = new ChartRenderingInfo(); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
145 BufferedImage img = |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
146 chart.createBufferedImage(size[0]/2, size[1]/3, info); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
147 int horPos = 0; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
148 int vertPos = 0; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
149 if (i % 2 == 1) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
150 horPos = size[0]/2; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
151 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
152 if (i > 1) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
153 vertPos = (size[1] / 3) * (i / 2); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
154 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
155 result.createGraphics().drawImage(img, horPos, vertPos, null); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
156 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
157 ImageIO.write(result, "png", out); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
158 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
159 |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
160 @Override |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
161 public void setSettings(Settings settings) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
162 this.settings = settings; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
163 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
164 |
3425
7babd4e92c8b
Disabled legends in SQ relation overview generator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3424
diff
changeset
|
165 @Override |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
166 public Settings getSettings() { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
167 return this.settings; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
168 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
169 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
170 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
171 /** |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
172 * Returns the "attribute" (part of description document) for a specific |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
173 * output type. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
174 * |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
175 * @param context The CallContext object. |
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:
3304
diff
changeset
|
176 * @param attr The xml attribute saved at the collection. |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
177 * @param output The name of the desired output type. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
178 * |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
179 * @return the attribute for the desired output type. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
180 */ |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
181 protected Document getAttribute( |
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:
3304
diff
changeset
|
182 CallContext context, |
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:
3304
diff
changeset
|
183 Document attr, |
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:
3304
diff
changeset
|
184 String output) |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
185 throws ArtifactDatabaseException |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
186 { |
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:
3304
diff
changeset
|
187 logger.debug("find specific XML node for Output: " + output); |
3296
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
188 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
189 Map<String, String> vars = new HashMap<String, String>(); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
190 vars.put("output", output); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
191 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
192 Node out = (Node) XMLUtils.xpath( |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
193 attr, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
194 "art:attribute/art:outputs/art:output[@name=$output]", |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
195 XPathConstants.NODE, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
196 ArtifactNamespaceContext.INSTANCE, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
197 vars); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
198 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
199 if (out != null) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
200 Document o = XMLUtils.newDocument(); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
201 o.appendChild(o.importNode(out, true)); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
202 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
203 return o; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
204 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
205 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
206 return null; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
207 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
208 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
209 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
210 /** |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
211 * Returns the size of a chart export as array which has been specified by |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
212 * the incoming request document. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
213 * |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
214 * @return the size of a chart as [width, height] or null if no width or |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
215 * height are given in the request document. |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
216 */ |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
217 protected int[] getSize() { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
218 int[] size = new int[2]; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
219 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
220 Element sizeEl = (Element)XMLUtils.xpath( |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
221 request, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
222 XPATH_CHART_SIZE, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
223 XPathConstants.NODE, |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
224 ArtifactNamespaceContext.INSTANCE); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
225 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
226 if (sizeEl != null) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
227 String uri = ArtifactNamespaceContext.NAMESPACE_URI; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
228 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
229 String w = sizeEl.getAttributeNS(uri, "width"); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
230 String h = sizeEl.getAttributeNS(uri, "height"); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
231 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
232 if (w.length() > 0 && h.length() > 0) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
233 try { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
234 size[0] = Integer.parseInt(w); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
235 size[1] = Integer.parseInt(h); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
236 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
237 catch (NumberFormatException nfe) { |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
238 logger.warn("Wrong values for chart width/height."); |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
239 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
240 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
241 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
242 |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
243 return size[0] > 0 && size[1] > 0 ? size : null; |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
244 } |
45af081061e7
Added overview output for sq relation. Currently the overview generator is
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
245 } |
3304
02d5731b43a2
SQ relation: Build a valid SQResult.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3296
diff
changeset
|
246 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |