Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java @ 4611:526fd442e0e5
Add pdf export to GaugeDischargeCurveArtifact
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 30 Nov 2012 16:07:27 +0100 |
parents | 319565a48182 |
children |
comparison
equal
deleted
inserted
replaced
4610:497bc73ca64a | 4611:526fd442e0e5 |
---|---|
49 "at"; | 49 "at"; |
50 public static final String GAUGE_DISCHARGE_CURVE_OUT = | 50 public static final String GAUGE_DISCHARGE_CURVE_OUT = |
51 "discharge_curve"; | 51 "discharge_curve"; |
52 public static final String GAUGE_DISCHARGE_CURVE_AT_EXPORT_OUT = | 52 public static final String GAUGE_DISCHARGE_CURVE_AT_EXPORT_OUT = |
53 "computed_dischargecurve_at_export"; | 53 "computed_dischargecurve_at_export"; |
54 public static final String GAUGE_DISCHARGE_CURVE_CSV_OUT = | 54 public static final String GAUGE_DISCHARGE_CURVE_EXPORT_OUT = |
55 "computed_dischargecurve_export"; | 55 "computed_dischargecurve_export"; |
56 public static final String GAUGE_DISCHARGE_CURVE_CSV_FACET = | 56 public static final String GAUGE_DISCHARGE_CURVE_CSV_FACET = |
57 "csv"; | 57 "csv"; |
58 public static final String GAUGE_DISCHARGE_CURVE_PDF_FACET = | |
59 "pdf"; | |
58 | 60 |
59 private Facet atexportfacet; | 61 private Facet atexportfacet; |
60 private Facet curvefacet; | 62 private Facet curvefacet; |
61 private Facet csvfacet; | 63 private Facet csvfacet; |
64 private Facet pdffacet; | |
62 | 65 |
63 /** | 66 /** |
64 * Setup initializes the data by extracting the river and gauge from | 67 * Setup initializes the data by extracting the river and gauge from |
65 * the XML Document. | 68 * the XML Document. |
66 */ | 69 */ |
122 "facet.gauge_discharge_curve.description", | 125 "facet.gauge_discharge_curve.description", |
123 "Discharge curve on gauge", | 126 "Discharge curve on gauge", |
124 rivername, | 127 rivername, |
125 gaugename); | 128 gaugename); |
126 | 129 |
127 List<Facet> fs = new ArrayList<Facet>(3); | 130 List<Facet> fs = new ArrayList<Facet>(4); |
128 curvefacet = new GaugeDischargeCurveFacet( | 131 curvefacet = new GaugeDischargeCurveFacet( |
129 GAUGE_DISCHARGE_CURVE_FACET, description); | 132 GAUGE_DISCHARGE_CURVE_FACET, description); |
130 fs.add(curvefacet); | 133 fs.add(curvefacet); |
131 | 134 |
132 description = Resources.format(callmeta, | 135 description = Resources.format(callmeta, |
144 rivername, | 147 rivername, |
145 gaugename); | 148 gaugename); |
146 csvfacet = new GaugeDischargeCurveFacet( | 149 csvfacet = new GaugeDischargeCurveFacet( |
147 GAUGE_DISCHARGE_CURVE_CSV_FACET, description); | 150 GAUGE_DISCHARGE_CURVE_CSV_FACET, description); |
148 fs.add(csvfacet); | 151 fs.add(csvfacet); |
152 | |
153 description = Resources.format(callmeta, | |
154 "facet.computed_dischargecurve_export.pdf", | |
155 "Discharge curve PDF export on gauge", | |
156 rivername, | |
157 gaugename); | |
158 pdffacet = new GaugeDischargeCurveFacet( | |
159 GAUGE_DISCHARGE_CURVE_PDF_FACET, description); | |
160 fs.add(pdffacet); | |
149 | 161 |
150 addFacets(STATIC_STATE_NAME, fs); | 162 addFacets(STATIC_STATE_NAME, fs); |
151 | 163 |
152 super.setup(identifier, factory, context, callmeta, data); | 164 super.setup(identifier, factory, context, callmeta, data); |
153 } | 165 } |
180 "text/plain", | 192 "text/plain", |
181 fs, | 193 fs, |
182 "export"); | 194 "export"); |
183 state.addOutput(output); | 195 state.addOutput(output); |
184 | 196 |
185 fs = new ArrayList<Facet>(1); | 197 fs = new ArrayList<Facet>(2); |
186 fs.add(csvfacet); | 198 fs.add(csvfacet); |
199 fs.add(pdffacet); | |
187 output = new DefaultOutput( | 200 output = new DefaultOutput( |
188 GAUGE_DISCHARGE_CURVE_CSV_OUT, | 201 GAUGE_DISCHARGE_CURVE_EXPORT_OUT, |
189 "output.computed_dischargecurve_export", | 202 "output.computed_dischargecurve_export", |
190 "text/plain", | 203 "text/plain", |
191 fs, | 204 fs, |
192 "export"); | 205 "export"); |
193 state.addOutput(output); | 206 state.addOutput(output); |