Mercurial > dive4elements > river
changeset 4537:d337c67b6845
Handle also sounding width generated via the datacage in MiddleBedHeightGenerator
Add processor for BedHeight data and add new axis for sounding widths.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 15 Nov 2012 16:27:56 +0100 |
parents | ce4ff444f215 |
children | 8cd4b019f150 |
files | flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java |
diffstat | 1 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java Thu Nov 15 16:21:21 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java Thu Nov 15 16:27:56 2012 +0100 @@ -5,6 +5,7 @@ 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.BedheightProcessor; import de.intevation.flys.exports.process.Processor; import de.intevation.flys.exports.process.WOutProcessor; import de.intevation.flys.jfree.FLYSAnnotation; @@ -26,7 +27,7 @@ implements FacetTypes { public enum YAXIS { - H(0), W(1); + H(0), W(1), P(2); protected int idx; private YAXIS(int c) { idx = c; @@ -61,6 +62,9 @@ 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]"; + public static final String I18N_P_YAXIS_LABEL_DEFAULT = "Gepeilte Breite [m]"; + public static final String I18N_P_YAXIS_LABEL = + "chart.bedheight_middle.sounding.yaxis.label"; @Override protected YAxisWalker getYAxisWalker() { @@ -118,6 +122,9 @@ else if (index == YAXIS.W.idx) { label = msg(I18N_W_YAXIS_LABEL, I18N_W_YAXIS_LABEL_DEFAULT); } + else if (index == YAXIS.P.idx) { + label = msg(I18N_P_YAXIS_LABEL, I18N_P_YAXIS_LABEL_DEFAULT); + } return label; } @@ -157,6 +164,9 @@ return; } + Processor woutp = new WOutProcessor(); + Processor bedp = new BedheightProcessor(); + if (name.equals(MIDDLE_BED_HEIGHT_SINGLE) || name.equals(MIDDLE_BED_HEIGHT_EPOCH)) { doHeightOut( (MiddleBedHeightData) artifactAndFacet.getData(context), @@ -186,14 +196,14 @@ visible, YAXIS.H.idx); } + else if (bedp.canHandle(name)) { + bedp.doOut(this, artifactAndFacet, attr, visible, YAXIS.P.idx); + } + else if (woutp.canHandle(name)) { + woutp.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx); + } else { - Processor processor = new WOutProcessor(); - if (processor.canHandle(name)) { - processor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx); - } - else { - logger.warn("Unknown facet name: " + name); - } + logger.warn("Unknown facet name: " + name); } }