[Dive4elements-commits] [PATCH 2 of 2] Add pdf export to GaugeDischargeCurveArtifact
Wald Commits
scm-commit at wald.intevation.org
Fri Nov 30 16:07:32 CET 2012
# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1354288047 -3600
# Node ID 526fd442e0e52f98d8b41f0f38bae4c1245a81a1
# Parent 497bc73ca64aa3be76f8825f6a13f1ab9e45e3fa
Add pdf export to GaugeDischargeCurveArtifact
diff -r 497bc73ca64a -r 526fd442e0e5 flys-artifacts/doc/conf/artifacts/gaugedischargecurve.xml
--- a/flys-artifacts/doc/conf/artifacts/gaugedischargecurve.xml Fri Nov 30 16:06:03 2012 +0100
+++ b/flys-artifacts/doc/conf/artifacts/gaugedischargecurve.xml Fri Nov 30 16:07:27 2012 +0100
@@ -19,6 +19,7 @@
<outputmode name="computed_dischargecurve_export" description="output.computed_dischargecurve_export" mime-type="text/plain" type="export">
<facets>
<facet name="csv" description="facet.computed_dischargecurve_export.csv" />
+ <facet name="pdf" description="facet.computed_dischargecurve_export.pdf" />
</facets>
</outputmode>
</outputmodes>
diff -r 497bc73ca64a -r 526fd442e0e5 flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java Fri Nov 30 16:06:03 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeCurveArtifact.java Fri Nov 30 16:07:27 2012 +0100
@@ -51,14 +51,17 @@
"discharge_curve";
public static final String GAUGE_DISCHARGE_CURVE_AT_EXPORT_OUT =
"computed_dischargecurve_at_export";
- public static final String GAUGE_DISCHARGE_CURVE_CSV_OUT =
+ public static final String GAUGE_DISCHARGE_CURVE_EXPORT_OUT =
"computed_dischargecurve_export";
public static final String GAUGE_DISCHARGE_CURVE_CSV_FACET =
"csv";
+ public static final String GAUGE_DISCHARGE_CURVE_PDF_FACET =
+ "pdf";
private Facet atexportfacet;
private Facet curvefacet;
private Facet csvfacet;
+ private Facet pdffacet;
/**
* Setup initializes the data by extracting the river and gauge from
@@ -124,7 +127,7 @@
rivername,
gaugename);
- List<Facet> fs = new ArrayList<Facet>(3);
+ List<Facet> fs = new ArrayList<Facet>(4);
curvefacet = new GaugeDischargeCurveFacet(
GAUGE_DISCHARGE_CURVE_FACET, description);
fs.add(curvefacet);
@@ -147,6 +150,15 @@
GAUGE_DISCHARGE_CURVE_CSV_FACET, description);
fs.add(csvfacet);
+ description = Resources.format(callmeta,
+ "facet.computed_dischargecurve_export.pdf",
+ "Discharge curve PDF export on gauge",
+ rivername,
+ gaugename);
+ pdffacet = new GaugeDischargeCurveFacet(
+ GAUGE_DISCHARGE_CURVE_PDF_FACET, description);
+ fs.add(pdffacet);
+
addFacets(STATIC_STATE_NAME, fs);
super.setup(identifier, factory, context, callmeta, data);
@@ -182,10 +194,11 @@
"export");
state.addOutput(output);
- fs = new ArrayList<Facet>(1);
+ fs = new ArrayList<Facet>(2);
fs.add(csvfacet);
+ fs.add(pdffacet);
output = new DefaultOutput(
- GAUGE_DISCHARGE_CURVE_CSV_OUT,
+ GAUGE_DISCHARGE_CURVE_EXPORT_OUT,
"output.computed_dischargecurve_export",
"text/plain",
fs,
More information about the Dive4elements-commits
mailing list