# HG changeset patch # User Björn Ricks # Date 1352300283 -3600 # Node ID f3c4976874f2224306426e0ba22b5651a2513e13 # Parent 9425b7c51b737e9086d46852e095a554f3bc31e6 Add datacage for minfo and longitudinal_section.w from fixanalysis Also use the new WOutProcessor to generate the corresponding curves. diff -r 9425b7c51b73 -r f3c4976874f2 flys-artifacts/doc/conf/artifacts/minfo.xml --- 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 @@ + diff -r 9425b7c51b73 -r f3c4976874f2 flys-artifacts/doc/conf/meta-data.xml --- 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 @@ + + + + + + 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}) + + + + + 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} + + + + + + + + + + + + + + + + + + + + diff -r 9425b7c51b73 -r f3c4976874f2 flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java --- 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 Ingo Weinzierl */ 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;