annotate artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java @ 7705:f1257717fa4b

(issue1594) Move Bed differences absolute height into the correct processor This also fixes that the filtered data of Height2 was never shown because of a to wide else clause.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 17 Dec 2013 18:27:13 +0100
parents fab06617afb2
children 272cbcd94688
rev   line source
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 *
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 */
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9 package org.dive4elements.river.exports.process;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import java.util.List;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13 import org.apache.log4j.Logger;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14 import org.jfree.data.xy.XYSeries;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import org.dive4elements.artifacts.CallContext;
7591
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
18 import org.dive4elements.river.artifacts.D4EArtifact;
7391
9513d1af7d58 Renamed artifacts/**/BedHeight(Single) to BedHeight(Single)Data, to resolve
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7390
diff changeset
19 import org.dive4elements.river.artifacts.model.minfo.BedHeightSingleData;
7705
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
20 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearResult;
7394
5eafd73312ae BedHeight(Sounding)Processor: Use FacetTypes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7391
diff changeset
21 import org.dive4elements.river.artifacts.model.FacetTypes;
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22 import org.dive4elements.river.exports.XYChartGenerator;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23 import org.dive4elements.river.exports.DiagramGenerator;
7705
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
24 import org.dive4elements.river.exports.StyledSeriesBuilder;
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25 import org.dive4elements.river.jfree.StyledXYSeries;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26 import org.dive4elements.river.model.BedHeightSingleValue;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 import org.dive4elements.river.themes.ThemeDocument;
7591
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
28 import org.dive4elements.river.utils.RiverUtils;
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30 public class BedHeightProcessor extends DefaultProcessor {
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 private final static Logger logger =
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33 Logger.getLogger(BedHeightProcessor.class);
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 public static final String I18N_AXIS_LABEL_DEFAULT
7395
5126cadaed58 BedHeightProcessor: Set axis label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7394
diff changeset
36 = "Sohlhoehe [m]";
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 public static final String I18N_AXIS_LABEL =
7395
5126cadaed58 BedHeightProcessor: Set axis label.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7394
diff changeset
38 "chart.bedheight.height.yaxis.label";
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39
7705
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
40 protected static double GAP_TOLERANCE = 0.101d;
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
41
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
42 @Override
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 public void doOut(
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44 DiagramGenerator generator,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 ArtifactAndFacet bundle,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 ThemeDocument theme,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 boolean visible) {
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48 XYSeries series = prepareSeries(bundle, theme, generator.getCallContext());
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 generator.addAxisSeries(series, axisName, visible);
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 @Override
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53 public void doOut(
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54 XYChartGenerator generator,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
55 ArtifactAndFacet bundle,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 ThemeDocument theme,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 boolean visible,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58 int index
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59 ) {
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
60 XYSeries series = prepareSeries(bundle, theme, generator.getCallContext());
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
61 generator.addAxisSeries(series, index, visible);
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
62 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
63
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
64 /** Prepare an series, independent of axis. */
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
65 private XYSeries prepareSeries(ArtifactAndFacet bundle,
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
66 ThemeDocument theme, CallContext context) {
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
67 Object data = bundle.getData(context);
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
68 XYSeries series = new StyledXYSeries(bundle.getFacetDescription(),
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
69 theme);
7705
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
70 if (data instanceof BedDiffYearResult) {
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
71 BedDiffYearResult bData = (BedDiffYearResult) data;
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
72
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
73 double[][] points;
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
74 String facetType = bundle.getFacetName();
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
75
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
76 if (FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1.equals(facetType) ||
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
77 FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED.equals(facetType)) {
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
78 points = bData.getHeights1Data();
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
79 } else {
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
80 points = bData.getHeights2Data();
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
81 }
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
82 StyledSeriesBuilder.addPointsFactorY(series,
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
83 points,
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
84 false,
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
85 GAP_TOLERANCE,
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
86 1d);
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
87 } else if (data instanceof BedHeightSingleData) {
7391
9513d1af7d58 Renamed artifacts/**/BedHeight(Single) to BedHeight(Single)Data, to resolve
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7390
diff changeset
88 BedHeightSingleData bData = (BedHeightSingleData)data;
7396
a94b6e057daa BedHeightProcessor: Finally display heights, not widths.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7395
diff changeset
89 double[] heights = bData.getHeights();
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
90 double[] stations = bData.getStations().toNativeArray();
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
91
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
92 logger.debug("doBedheightSingleOut");
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
93
7396
a94b6e057daa BedHeightProcessor: Finally display heights, not widths.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7395
diff changeset
94 for (int i = 0; i < heights.length; i++) {
a94b6e057daa BedHeightProcessor: Finally display heights, not widths.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7395
diff changeset
95 series.add(stations[i], heights[i], false);
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
96 }
7705
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
97 }
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
98 else if (data instanceof List<?>) {
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
99 List<BedHeightSingleValue> bData = (List<BedHeightSingleValue>)data;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
100
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
101 logger.debug("doBedheightSingleValueOut");
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
102
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
103 for(BedHeightSingleValue bvalue: bData) {
7396
a94b6e057daa BedHeightProcessor: Finally display heights, not widths.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 7395
diff changeset
104 series.add(bvalue.getStation(), bvalue.getHeight());
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
105 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
106 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
107 else {
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
108 logger.error("Unknown data type " + data.getClass());
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
109 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
110 return series;
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
111 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
114 @Override
7705
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
115 public boolean canHandle(String facetType) {
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
116 return FacetTypes.BEDHEIGHT.equals(facetType)
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
117 || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1.equals(facetType)
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
118 || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT2.equals(facetType)
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
119 || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED.equals(facetType)
f1257717fa4b (issue1594) Move Bed differences absolute height into the correct processor
Andre Heinecke <aheinecke@intevation.de>
parents: 7591
diff changeset
120 || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED.equals(facetType);
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
123 @Override
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124 public String getAxisLabel(DiagramGenerator generator) {
7591
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
125 D4EArtifact flys = (D4EArtifact) generator.getMaster();
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
126
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
127 String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
128
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
129 return generator.msg(
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
130 I18N_AXIS_LABEL,
7591
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
131 I18N_AXIS_LABEL_DEFAULT,
fab06617afb2 issue1225 Add i18n for bedheight and use wst height system as unit
Andre Heinecke <aheinecke@intevation.de>
parents: 7396
diff changeset
132 new Object[] { unit });
7390
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
133 }
45e3bb00ce1a Stub for new BedHeightProcessor.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 }

http://dive4elements.wald.intevation.org