annotate artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java @ 8354:9f9857f6c464

Added y axis label to discharge processors.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 01 Oct 2014 13:40:04 +0200
parents 436512d9bd94
children abef2584c9a7 e1ff1263d79a
rev   line source
8206
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 package org.dive4elements.river.exports.process;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3 import java.awt.BasicStroke;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4 import java.awt.Color;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5 import java.text.DateFormat;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6 import java.util.ArrayList;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7 import java.util.List;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 import org.apache.log4j.Logger;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
8354
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
11 import org.dive4elements.artifacts.CallMeta;
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
12 import org.dive4elements.river.artifacts.D4EArtifact;
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
13 import org.dive4elements.river.artifacts.access.RiverAccess;
8206
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 import org.dive4elements.river.artifacts.model.FacetTypes;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 import org.dive4elements.river.artifacts.model.NamedDouble;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 import org.dive4elements.river.artifacts.model.QWDDateRange;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 import org.dive4elements.river.artifacts.model.WQKms;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 import org.dive4elements.river.artifacts.model.fixings.FixFunction;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19 import org.dive4elements.river.artifacts.model.fixings.FixWQCurveFacet;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 import org.dive4elements.river.artifacts.model.fixings.QWD;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 import org.dive4elements.river.artifacts.model.fixings.QWI;
8354
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
22 import org.dive4elements.river.artifacts.resources.Resources;
8206
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 import org.dive4elements.river.exports.DiagramGenerator;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 import org.dive4elements.river.exports.StyledSeriesBuilder;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 import org.dive4elements.river.exports.fixings.FixChartGenerator;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 import org.dive4elements.river.exports.fixings.FixWQCurveGenerator;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 import org.dive4elements.river.java2d.ShapeUtils;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 import org.dive4elements.river.jfree.CollisionFreeXYTextAnnotation;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 import org.dive4elements.river.jfree.JFreeUtil;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30 import org.dive4elements.river.jfree.RiverAnnotation;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 import org.dive4elements.river.jfree.StickyAxisAnnotation;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32 import org.dive4elements.river.jfree.StyledXYSeries;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 import org.dive4elements.river.themes.ThemeDocument;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34 import org.jfree.chart.annotations.XYTextAnnotation;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35 import org.jfree.chart.plot.Marker;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
36 import org.jfree.chart.plot.ValueMarker;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 import org.jfree.data.xy.XYSeries;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
38 import org.jfree.ui.RectangleAnchor;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
39 import org.jfree.ui.RectangleInsets;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40 import org.jfree.ui.TextAnchor;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
42
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
43 public class FixWQProcessor
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44 extends DefaultProcessor
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
45 implements FacetTypes
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48 private static Logger logger = Logger.getLogger(FixWQProcessor.class);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
49
8354
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
50 private String I18N_AXIS_LABEL = "chart.discharge.curve.yaxis.label";
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
51
8206
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52 public FixWQProcessor() {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
53 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
54
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
55 @Override
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
56 public void doOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
57 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
58 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
59 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
60 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
61 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
62 // TODO: Simplyfy this processor and move general facets/data to
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
63 // MiscDischargeProcessor or something...
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
64 String facetType = bundle.getFacetName();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
65 logger.debug("facet: " + facetType + " name: " + bundle.getFacetDescription());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
66 if(facetType.startsWith(FIX_SECTOR_AVERAGE_WQ)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
67 doSectorAverageOut(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
68 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
69 else if(FIX_ANALYSIS_EVENTS_WQ.equals(facetType)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
70 || FIX_REFERENCE_EVENTS_WQ.equals(facetType)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
71 || FIX_EVENTS.equals(facetType)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
72 doEventsOut(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
73 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
74 else if(FIX_WQ_CURVE.equals(facetType)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
75 doWQCurveOut(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
76 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
77 else if(FIX_OUTLIER.equals(facetType)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
78 doOutlierOut(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
79 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
80 else if(QSECTOR.equals(facetType)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
81 doQSectorOut(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
82 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
83 else if(STATIC_WKMS_MARKS.equals(facetType) ||
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
84 STATIC_WKMS.equals(facetType) ||
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
85 HEIGHTMARKS_POINTS.equals(facetType) ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
86 doWAnnotations(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
87 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
88 else if (LONGITUDINAL_W.equals(facetType)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
89 || STATIC_WKMS_INTERPOL.equals(facetType)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
90 || FIX_WQ_LS.equals(facetType)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
91 doWQOut(generator, bundle, theme, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
92 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
93 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
94
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
95 /** Add sector average points to chart. */
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
96 protected void doSectorAverageOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
97 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
98 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
99 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
100 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
101 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
102 logger.debug("doSectorAverageOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
103 QWDDateRange qwdd = (QWDDateRange)bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
104 QWD qwd = qwdd != null ? qwdd.getQWD() : null;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
105
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
106 if(qwd != null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
107 XYSeries series = new StyledXYSeries(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
108 bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
109 false, true,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
110 theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
111 DateFormat dateFormat = DateFormat.getDateInstance(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
112 DateFormat.SHORT);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
113
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
114 //TODO: W in cm at Gauge!!!
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
115 series.add(qwd.getQ(), qwd.getW(), false);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
116
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
117 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
118 dateFormat.format(qwd.getDate()),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
119 qwd.getQ(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
120 qwd.getW());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
121 List<XYTextAnnotation> annos = new ArrayList<XYTextAnnotation>();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
122 annos.add(anno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
123 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
124
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
125 if (visible && theme != null && theme.parseShowPointLabel()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
126 RiverAnnotation flysAnno =
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
127 new RiverAnnotation(null, null, null, theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
128 flysAnno.setTextAnnotations(annos);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
129 generator.addAnnotations(flysAnno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
130 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
131 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
132 else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
133 logger.debug("doSectorAverageOut: qwd == null");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
134 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
135 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
136
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
137
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
138 /** Add analysis event points to chart. */
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
139 protected void doEventsOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
140 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
141 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
142 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
143 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
144 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
145 logger.debug("doAnalysisEventsOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
146
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
147 QWD qwd = (QWD)bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
148
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
149 if (qwd == null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
150 logger.debug("doAnalysisEventsOut: qwd == null");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
151 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
152 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
153 // TODO: W in cm at Gauge!!!
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
154 //double gaugeDatum = getCurrentGaugeDatum();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
155 //boolean atGauge = gaugeDatum != 0d;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
156
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
157 //double factor = atGauge ? 100d : 1d;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
158
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
159 //double w = factor*(qwd.getW()-gaugeDatum);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
160
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
161 // Force empty symbol.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
162 if (qwd.getInterpolated()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
163 theme = new ThemeDocument(theme); // prevent potential side effects.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
164 theme.setValue(ThemeDocument.USE_FILL_PAINT, "true");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
165 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
166
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
167 XYSeries series = new StyledXYSeries(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
168 bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
169 theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
170 qwd.getInterpolated()
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
171 ? ShapeUtils.INTERPOLATED_SHAPE
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
172 : ShapeUtils.MEASURED_SHAPE);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
173
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
174 series.add(qwd.getQ(), qwd.getW());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
175
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
176 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
177
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
178 if (visible && theme.parseShowPointLabel()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
179
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
180 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
181
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
182 DateFormat dateFormat = DateFormat.getDateInstance(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
183 DateFormat.SHORT);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
184 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
185 dateFormat.format(qwd.getDate()),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
186 qwd.getQ(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
187 qwd.getW());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
188 textAnnos.add(anno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
189
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
190 RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
191 flysAnno.setTextAnnotations(textAnnos);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
192 generator.addAnnotations(flysAnno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
193 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
194 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
195
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
196 /** Add reference event points to chart. */
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
197 protected void doReferenceEventsOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
198 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
199 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
200 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
201 boolean visible) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
202 logger.debug("doReferenceEventsOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
203
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
204 QWI qwd = (QWI)bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
205 if (qwd == null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
206 logger.debug("doReferenceEventsOut: qwds == null in " + bundle.getFacetDescription());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
207 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
208 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
209
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
210 // Force empty symbol.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
211 if (qwd.getInterpolated()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
212 theme = new ThemeDocument(theme); // prevent potential side effects.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
213 theme.setValue(ThemeDocument.USE_FILL_PAINT, "true");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
214 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
215
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
216 XYSeries series = new StyledXYSeries(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
217 bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
218 false, true, theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
219 qwd.getInterpolated()
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
220 ? ShapeUtils.INTERPOLATED_SHAPE
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
221 : ShapeUtils.MEASURED_SHAPE);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
222
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
223 // TODO: W in cm at gauge!!!
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
224 //double gaugeDatum = getCurrentGaugeDatum();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
225 //boolean atGauge = gaugeDatum != 0d;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
226
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
227 //double factor = atGauge ? 100d : 1d;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
228 //double w = factor*(qwd.getW()-gaugeDatum);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
229
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
230 series.add(qwd.getQ(), qwd.getW(), false);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
231
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
232 if (visible && theme.parseShowPointLabel()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
233 DateFormat dateFormat = DateFormat.getDateInstance(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
234 DateFormat.SHORT);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
235
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
236 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
237 dateFormat.format(qwd.getDate()),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
238 qwd.getQ(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
239 qwd.getW());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
240
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
241 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
242 textAnnos.add(anno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
243 RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
244 flysAnno.setTextAnnotations(textAnnos);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
245 generator.addAnnotations(flysAnno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
246 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
247
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
248 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
249 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
250
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
251 protected void doWQCurveOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
252 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
253 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
254 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
255 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
256 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
257 logger.debug("doWQCurveOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
258
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
259 FixWQCurveFacet facet = (FixWQCurveFacet)bundle.getFacet();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
260 FixFunction func = (FixFunction)facet.getData(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
261 bundle.getArtifact(), generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
262
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
263 if (func == null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
264 logger.warn("doWQCurveOut: Facet does not contain FixFunction");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
265 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
266 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
267
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
268 double maxQ = func.getMaxQ();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
269
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
270 if (maxQ > 0) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
271 StyledXYSeries series = JFreeUtil.sampleFunction2D(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
272 func.getFunction(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
273 theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
274 bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
275 500, // number of samples
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
276 0.0 , // start
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
277 maxQ); // end
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
278
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
279 //TODO: W in cm at gauge!!!
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
280 // double gaugeDatum = getCurrentGaugeDatum();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
281
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
282 // if (gaugeDatum == 0d) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
283 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
284 // }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
285 /* else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
286 StyledXYSeries series2 = JFreeUtil.sampleFunction2D(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
287 func.getFunction(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
288 doc,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
289 aaf.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
290 500, // number of samples
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
291 0.0 , // start
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
292 maxQ); // end
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
293 addAxisSeries(series2, YAXIS.W.idx, false);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
294 // Use second axis at cm if at gauge.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
295 for (int i = 0, N = series.getItemCount(); i < N; i++) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
296 series.updateByIndex(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
297 i, new Double(100d*(series.getY(i).doubleValue()-gaugeDatum)));
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
298 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
299 addAxisSeries(series, YAXIS.WCm.idx, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
300 }*/
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
301 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
302 else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
303 logger.warn("doWQCurveOut: maxQ <= 0");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
304 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
305 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
306
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
307 protected void doOutlierOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
308 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
309 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
310 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
311 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
312 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
313 logger.debug("doOutlierOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
314
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
315 QWI[] qws = (QWI[])bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
316 if(qws != null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
317 XYSeries series = new StyledXYSeries(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
318 bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
319 false, true,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
320 theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
321 DateFormat dateFormat = DateFormat.getDateInstance(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
322 DateFormat.SHORT);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
323
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
324 List<XYTextAnnotation> annos = new ArrayList<XYTextAnnotation>();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
325 //TODO: W in cm at Gauge!!!
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
326 for (QWI qw: qws) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
327 series.add(qw.getQ(), qw.getW(), false);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
328
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
329 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
330 dateFormat.format(qw.getDate()),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
331 qw.getQ(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
332 qw.getW());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
333 annos.add(anno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
334 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
335 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
336
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
337 if (visible && theme != null && theme.parseShowPointLabel()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
338 RiverAnnotation flysAnno =
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
339 new RiverAnnotation(null, null, null, theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
340 flysAnno.setTextAnnotations(annos);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
341 generator.addAnnotations(flysAnno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
342 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
343 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
344 else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
345 logger.debug("doOutlierOut: qwd == null");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
346 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
347 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
348
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
349 /** Add markers for q sectors. */
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
350 protected void doQSectorOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
351 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
352 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
353 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
354 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
355 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
356 logger.debug("doQSectorOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
357 if (!visible) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
358 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
359 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
360
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
361 Object qsectorsObj = bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
362 if (qsectorsObj == null || !(qsectorsObj instanceof List)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
363 logger.warn("No QSectors coming from data.");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
364 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
365 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
366
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
367 List<?> qsectorsList = (List<?>) qsectorsObj;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
368 if (qsectorsList.size() == 0 || !(qsectorsList.get(0) instanceof NamedDouble)) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
369 logger.warn("No QSectors coming from data.");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
370 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
371 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
372
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
373 @SuppressWarnings("unchecked")
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
374 List<NamedDouble> qsectors = (List<NamedDouble>) qsectorsList;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
375
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
376 for (NamedDouble qsector : qsectors) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
377 if (Double.isNaN(qsector.getValue())) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
378 continue;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
379 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
380 Marker m = new ValueMarker(qsector.getValue());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
381 m.setPaint(Color.black);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
382
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
383 float[] dashes = theme.parseLineStyle();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
384 int size = theme.parseLineWidth();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
385 BasicStroke stroke;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
386 if (dashes.length <= 1) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
387 stroke = new BasicStroke(size);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
388 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
389 else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
390 stroke = new BasicStroke(size,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
391 BasicStroke.CAP_BUTT,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
392 BasicStroke.JOIN_ROUND,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
393 1.0f,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
394 dashes,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
395 0.0f);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
396 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
397 m.setStroke(stroke);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
398
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
399 if (theme.parseShowLineLabel()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
400 m.setLabel(qsector.getName());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
401 m.setPaint(theme.parseTextColor());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
402 m.setLabelFont(theme.parseTextFont());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
403 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
404 Color paint = theme.parseLineColorField();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
405 if (paint != null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
406 m.setPaint(paint);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
407 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
408 m.setLabelAnchor(RectangleAnchor.TOP_LEFT);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
409 m.setLabelTextAnchor(TextAnchor.TOP_LEFT);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
410 m.setLabelOffset(new RectangleInsets(5, 5, 10, 10));
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
411 generator.addDomainMarker(m);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
412 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
413 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
414
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
415 /**
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
416 * Add W-Annotations to plot.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
417 * @param wqkms actual data (double[][]).
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
418 * @param theme theme to use.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
419 */
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
420 protected void doWAnnotations(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
421 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
422 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
423 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
424 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
425 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
426 Object data = bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
427 List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
428 if (data instanceof double[][]) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
429 logger.debug("Got double[][]");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
430 double [][] values = (double [][]) data;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
431 for (int i = 0; i< values[0].length; i++) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
432 xy.add(new StickyAxisAnnotation(bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
433 (float) values[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS));
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
434 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
435
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
436 if (visible) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
437 generator.addAnnotations(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
438 new RiverAnnotation(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
439 bundle.getFacetDescription(), xy, null, theme));
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
440 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
441 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
442 else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
443 // Assume its WKms.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
444 logger.debug("Got WKms");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
445 /* TODO
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
446 WKms wkms = (WKms) data;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
447
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
448 Double ckm =
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
449 (Double) generator.getCallContext().getContextValue(FixChartGenerator.CURRENT_KM);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
450 double location = (ckm != null)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
451 ? ckm.doubleValue()
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
452 : getRange()[0];
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
453 double w = StaticWKmsArtifact.getWAtKmLin(data, location);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
454 xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
455 (float) w, StickyAxisAnnotation.SimpleAxis.Y_AXIS));
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
456
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
457 doAnnotations(new RiverAnnotation(facet.getDescription(), xy),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
458 aandf, theme, visible);*/
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
459 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
460 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
461
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
462 /**
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
463 * Add WQ Data to plot.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
464 * @param wqkms data as double[][]
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
465 */
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
466 protected void doWQOut(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
467 DiagramGenerator generator,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
468 ArtifactAndFacet bundle,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
469 ThemeDocument theme,
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
470 boolean visible
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
471 ) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
472 logger.debug("FixWQCurveGenerator: doWQOut");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
473 Object data = bundle.getData(generator.getCallContext());
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
474 if (data instanceof WQKms) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
475 WQKms wqkms = (WQKms)data;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
476 // TODO As in doEventsOut, the value-searching should
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
477 // be delivered by the facet already (instead of in the Generator).
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
478 logger.debug("FixWQCurveGenerator: doWQOut: WQKms");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
479 XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
480 // TODO: Remove dependency to FixChartGenerator.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
481 Double ckm = (Double) generator.getCallContext().getContextValue(FixChartGenerator.CURRENT_KM);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
482 if (wqkms == null || wqkms.getKms().length == 0 || ckm == null) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
483 logger.info("addPointFromWQKms: No event data to show.");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
484 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
485 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
486 double[] kms = wqkms.getKms();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
487 // TODO W in cm at gauge!!!
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
488 //double gaugeDatum = getCurrentGaugeDatum();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
489 //double factor = (gaugeDatum == 0d) ? 1d : 100d;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
490 for (int i = 0 ; i< kms.length; i++) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
491 // TODO: Remove dependency to FixWQCurveGenerator.
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
492 if (Math.abs(kms[i] - ckm) <= FixWQCurveGenerator.EPSILON) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
493 series.add(wqkms.getQ(i), wqkms.getW(i), false);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
494 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
495 if(visible && theme.parseShowPointLabel()) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
496 List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
497 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
498 bundle.getFacetDescription(),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
499 wqkms.getQ(i),
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
500 wqkms.getW(i));
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
501 textAnnos.add(anno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
502 RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
503 flysAnno.setTextAnnotations(textAnnos);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
504 generator.addAnnotations(flysAnno);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
505 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
506 return;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
507 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
508 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
509 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
510 else {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
511 logger.debug("FixWQCurveGenerator: doWQOut: double[][]");
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
512 double [][] values = (double [][]) data;
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
513
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
514 XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), false, true, theme);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
515 StyledSeriesBuilder.addPoints(series, values, true);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
516
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
517 generator.addAxisSeries(series, axisName, visible);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
518 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
519 }
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
520
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
521 @Override
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
522 public boolean canHandle(String facettype) {
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
523 return facettype.startsWith(FIX_SECTOR_AVERAGE_WQ)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
524 || FIX_ANALYSIS_EVENTS_WQ.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
525 || FIX_REFERENCE_EVENTS_WQ.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
526 || FIX_EVENTS.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
527 || FIX_WQ_CURVE.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
528 || FIX_OUTLIER.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
529 || QSECTOR.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
530 || STATIC_WKMS_MARKS.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
531 || STATIC_WKMS.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
532 || HEIGHTMARKS_POINTS.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
533 || LONGITUDINAL_W.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
534 || STATIC_WKMS_INTERPOL.equals(facettype)
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
535 || FIX_WQ_LS.equals(facettype);
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
536 }
8354
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
537
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
538 @Override
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
539 public String getAxisLabel(DiagramGenerator generator) {
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
540 CallMeta meta = generator.getCallContext().getMeta();
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
541
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
542 RiverAccess access = new RiverAccess((D4EArtifact)generator.getMaster());
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
543 String unit = access.getRiver().getWstUnit().getName();
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
544 return Resources.getMsg(
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
545 meta,
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
546 I18N_AXIS_LABEL,
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
547 new Object[] { unit });
9f9857f6c464 Added y axis label to discharge processors.
Raimund Renkert <rrenkert@intevation.de>
parents: 8206
diff changeset
548 }
8206
436512d9bd94 Added processor for discharge curve in fixanalysis.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
549 }

http://dive4elements.wald.intevation.org