Mercurial > dive4elements > river
changeset 4449:f3c4976874f2
Add datacage for minfo and longitudinal_section.w from fixanalysis
Also use the new WOutProcessor to generate the corresponding curves.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 07 Nov 2012 15:58:03 +0100 |
parents | 9425b7c51b73 |
children | 0074c113bb95 |
files | flys-artifacts/doc/conf/artifacts/minfo.xml flys-artifacts/doc/conf/meta-data.xml flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java |
diffstat | 3 files changed, 59 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/artifacts/minfo.xml Wed Nov 07 15:56:28 2012 +0100 +++ b/flys-artifacts/doc/conf/artifacts/minfo.xml Wed Nov 07 15:58:03 2012 +0100 @@ -165,6 +165,7 @@ <facets> <facet name="bedheight_middle.single" description="A facet for total channels"/> <facet name="bedheight_middle.epoch" description="A facet for total channels"/> + <facet name="longitudinal_section.w" description="Datacage facet"/> </facets> </outputmode> <outputmode name="bedheight_middle_export" description="output.bedheight_middle_export" mime-type="text/plain" type="export">
--- a/flys-artifacts/doc/conf/meta-data.xml Wed Nov 07 15:56:28 2012 +0100 +++ b/flys-artifacts/doc/conf/meta-data.xml Wed Nov 07 15:58:03 2012 +0100 @@ -1985,6 +1985,44 @@ </fix_longitudinal_section_curve> </dc:if> + <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')"> + <fix_vollmer_wq_curve> + <dc:elements> + <dc:context> + <dc:statement> + SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation + FROM master_artifacts m + WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) + AND EXISTS ( + SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) + </dc:statement> + <dc:elements> + <dc:context> + <dc:statement> + SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description + FROM outs as o, facets as f, artifacts as a + WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points') + and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} + </dc:statement> + <fix_vollmer_wq_curve> + <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> + <dc:elements> + <dc:element name="${facet_name}"> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="factory" value="fixanalysis"/> + <dc:attribute name="artifact-id" value="${aid}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="out" value="longitudinal_section"/> + </dc:element> + </dc:elements> + </fix_vollmer_wq_curve> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </fix_vollmer_wq_curve> + </dc:if> + </dc:context> </old_calculations>
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java Wed Nov 07 15:56:28 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java Wed Nov 07 15:58:03 2012 +0100 @@ -5,6 +5,8 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.MiddleBedHeightData; +import de.intevation.flys.exports.process.Processor; +import de.intevation.flys.exports.process.WOutProcessor; import de.intevation.flys.jfree.FLYSAnnotation; import de.intevation.flys.jfree.StyledXYSeries; import de.intevation.flys.utils.FLYSUtils; @@ -20,11 +22,11 @@ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class MiddleBedHeightGenerator -extends XYChartGenerator +extends XYChartGenerator implements FacetTypes { public enum YAXIS { - H(0); + H(0), W(1); protected int idx; private YAXIS(int c) { idx = c; @@ -56,8 +58,9 @@ public static final String I18N_CHART_TITLE_DEFAULT = "Mittlere Sohlhöhe"; public static final String I18N_XAXIS_LABEL_DEFAULT = "km"; public static final String I18N_YAXIS_LABEL_DEFAULT = "mittlere Sohlhöhen [müNN]"; - - + public static final String I18N_W_YAXIS_LABEL = + "chart.longitudinal.section.yaxis.label"; + public static final String I18N_W_YAXIS_LABEL_DEFAULT = "W [NN + m]"; @Override protected YAxisWalker getYAxisWalker() { @@ -112,6 +115,9 @@ if (index == YAXIS.H.idx) { label = getHAxisLabel(); } + else if (index == YAXIS.W.idx) { + label = msg(I18N_W_YAXIS_LABEL, I18N_W_YAXIS_LABEL_DEFAULT); + } return label; } @@ -181,8 +187,13 @@ YAXIS.H.idx); } else { - logger.warn("Unknown facet name: " + name); - return; + Processor processor = new WOutProcessor(); + if (processor.canHandle(name)) { + processor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx); + } + else { + logger.warn("Unknown facet name: " + name); + } } } @@ -216,6 +227,9 @@ if (FacetTypes.IS.H(facetName)) { return YAXIS.H.idx; } + else if (FacetTypes.IS.W(facetName)) { + return YAXIS.W.idx; + } else { logger.warn("Could not find axis for facet " + facetName); return YAXIS.H.idx;