annotate flys-artifacts/src/main/java/de/intevation/flys/exports/FlowVelocityGenerator.java @ 5645:696d710470f5

flys/issue1077: Show loads as step line, therefore transform data in SedimentLoadFacet to stretch as in the measurement stations bounds. Deal with this new kind of data in the Generator.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 10 Apr 2013 09:35:07 +0200
parents 38acd82feeac
children
rev   line source
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.exports;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
4626
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
3 import java.util.Arrays;
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
4
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import org.apache.log4j.Logger;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import org.jfree.data.xy.XYSeries;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import org.w3c.dom.Document;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import de.intevation.artifactdatabase.state.ArtifactAndFacet;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import de.intevation.artifactdatabase.state.Facet;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import de.intevation.flys.artifacts.FLYSArtifact;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
4626
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
16 import de.intevation.flys.artifacts.access.FlowVelocityAccess;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 import de.intevation.flys.artifacts.model.FacetTypes;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 import de.intevation.flys.artifacts.model.FlowVelocityData;
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
19 import de.intevation.flys.artifacts.model.minfo.BedDiameterResult;
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
20 import de.intevation.flys.artifacts.model.minfo.BedloadDiameterResult;
4464
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
21 import de.intevation.flys.model.FlowVelocityMeasurementValue;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
4626
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
23 import de.intevation.flys.jfree.Bounds;
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
24 import de.intevation.flys.jfree.DoubleBounds;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 import de.intevation.flys.jfree.FLYSAnnotation;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 import de.intevation.flys.jfree.StyledXYSeries;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 import de.intevation.flys.utils.FLYSUtils;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 * An OutGenerator that generates flow velocity curves.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 *
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 public class FlowVelocityGenerator
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 extends XYChartGenerator
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 implements FacetTypes
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 public enum YAXIS {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 V(0),
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
42 T(1),
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
43 Q(2),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
44 D(3);
4457
e7252480ded3 FlowVelocityGenerator: Added TODO about 3rd and 4th axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4395
diff changeset
45 /* TODO Q and Density will come as 4th and 3rd axis. */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 protected int idx;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 private YAXIS(int c) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 idx = c;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 /** The logger that is used in this generator. */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 private static Logger logger = Logger.getLogger(FlowVelocityGenerator.class);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 /** Key to look up internationalized String for annotations label. */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 public static final String I18N_ANNOTATIONS_LABEL =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 "chart.flow_velocity.annotations.label";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 * Key to look up internationalized String for LongitudinalSection diagrams
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 * titles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 public static final String I18N_CHART_TITLE =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 "chart.flow_velocity.section.title";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 * Key to look up internationalized String for LongitudinalSection diagrams
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 * subtitles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 public static final String I18N_CHART_SUBTITLE =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 "chart.flow_velocity.section.subtitle";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 * Key to look up internationalized String for LongitudinalSection diagrams
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 * short subtitles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 public static final String I18N_CHART_SHORT_SUBTITLE =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 "chart.flow_velocity.section.shortsubtitle";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 public static final String I18N_XAXIS_LABEL =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 "chart.flow_velocity.section.xaxis.label";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 public static final String I18N_YAXIS_LABEL =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 "chart.flow_velocity.section.yaxis.label";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 public static final String I18N_2YAXIS_LABEL =
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87 "chart.flow_velocity.section.yaxis.second.label";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
89 public static final String I18N_3YAXIS_LABEL =
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
90 "chart.flow_velocity.section.yaxis.third.label";
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
91 public static final String I18N_4YAXIS_LABEL = "chart.bedquality.yaxis.label.diameter";
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
92
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93 public static final String I18N_CHART_TITLE_DEFAULT = "Geschwindigkeit- und Schubspannung";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94 public static final String I18N_XAXIS_LABEL_DEFAULT = "km";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
95 public static final String I18N_YAXIS_LABEL_DEFAULT = "Geschwindigkeit v [m/s]";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96 public static final String I18N_2YAXIS_LABEL_DEFAULT = "Schubspannung Tau [N]";
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
97 public static final String I18N_3YAXIS_LABEL_DEFAULT = "Q [m³/s]";
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
98 public static final String I18N_4YAXIS_LABEL_DEFAULT = "Durchmesser [mm]";
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 protected YAxisWalker getYAxisWalker() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 return new YAxisWalker() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104 public int length() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 return YAXIS.values().length;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109 public String getId(int idx) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 YAXIS[] yaxes = YAXIS.values();
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
111 return yaxes[idx].toString();
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113 };
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 * Returns the default title for this chart.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 *
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 * @return the default title for this chart.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
121 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
122 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
123 public String getDefaultChartTitle() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
124 Object[] args = new Object[] {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
125 getRiverName()
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
126 };
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
127
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
128 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT, args);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
129 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
130
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
131
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
132 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133 * Get internationalized label for the x axis.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
134 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
135 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
136 protected String getDefaultXAxisLabel() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
137 FLYSArtifact flys = (FLYSArtifact) master;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
138
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
139 return msg(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
140 I18N_XAXIS_LABEL,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
141 I18N_XAXIS_LABEL_DEFAULT,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
142 new Object[] { FLYSUtils.getRiver(flys).getName() });
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
143 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
144
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
145
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
146 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
147 protected String getDefaultYAxisLabel(int index) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
148 String label = "default";
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
149
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
150 if (index == YAXIS.V.idx) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
151 label = getVAxisLabel();
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
152 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
153 else if (index == YAXIS.T.idx) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
154 label = getTAxisLabel();
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
155 }
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
156 else if (index == YAXIS.Q.idx) {
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
157 label = getQAxisLabel();
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
158 }
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
159 else if (index == YAXIS.D.idx) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
160 label = getDAxisLabel();
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
161 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
162
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
163 return label;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
164 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
165
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
166
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
167 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
168 * Get internationalized label for the y axis.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
169 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
170 protected String getVAxisLabel() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
171 return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
172 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
173
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
174
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
175 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
176 * Get internationalized label for the y axis.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
177 */
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
178 protected String getQAxisLabel() {
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
179 return msg(I18N_3YAXIS_LABEL, I18N_3YAXIS_LABEL_DEFAULT);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
180 }
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
181
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
182 /**
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
183 * Get internationalized label for the y axis.
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
184 */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
185 protected String getTAxisLabel() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
186 return msg(I18N_2YAXIS_LABEL, I18N_2YAXIS_LABEL_DEFAULT);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
187 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
188
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
189 /**
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
190 * Get internationalized label for the y axis.
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
191 */
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
192 protected String getDAxisLabel() {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
193 return msg(I18N_4YAXIS_LABEL, I18N_4YAXIS_LABEL_DEFAULT);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
194 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
195
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
196 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
197 * Produce output.
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
198 * @param artifactAndFacet current facet.
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
199 * @param attr theme for facet
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
200 * @param visible Whether this facets data is actually visible or not.
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
201 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
202 public void doOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
203 ArtifactAndFacet artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
204 Document attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
205 boolean visible
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
206 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
207 String name = artifactAndFacet.getFacetName();
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
208
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
209 logger.debug("FlowVelocityGenerator.doOut: " + name);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
210
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
211 if (name == null) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
212 logger.error("No facet name for doOut(). No output generated!");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
213 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
214 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
215
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
216 Facet facet = artifactAndFacet.getFacet();
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
217
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
218 if (facet == null) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
219 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
220 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
221
4626
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
222 if (getXBounds(0) != null && getDomainAxisRange() != null) {
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
223 logger.debug(Arrays.toString(getDomainAxisRangeFromRequest()));
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
224 Bounds bounds =
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
225 calculateZoom(getXBounds(0), getDomainAxisRange());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
226 context.putContextValue("startkm", bounds.getLower());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
227 context.putContextValue("endkm", bounds.getUpper());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
228 }
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
229 else if (getXBounds(0) != null && getDomainAxisRange() == null) {
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
230 context.putContextValue("startkm", getXBounds(0).getLower());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
231 context.putContextValue("endkm", getXBounds(0).getUpper());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
232 }
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
233 else if (getXBounds(0) == null && getDomainAxisRange() == null) {
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
234 FLYSArtifact artifact = (FLYSArtifact)artifactAndFacet.getArtifact();
4826
a3dc382bc1ca BedHeightAccess, FlowVelocityAccess, SedimentLoadAccess: Inherit from RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4669
diff changeset
235 FlowVelocityAccess access = new FlowVelocityAccess(artifact, context);
4626
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
236 context.putContextValue("startkm", access.getLowerKM());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
237 context.putContextValue("endkm", access.getUpperKM());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
238 }
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
239 else if (getXBounds(0) == null && getDomainAxisRange() != null){
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
240 FLYSArtifact artifact = (FLYSArtifact)artifactAndFacet.getArtifact();
4826
a3dc382bc1ca BedHeightAccess, FlowVelocityAccess, SedimentLoadAccess: Inherit from RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4669
diff changeset
241 FlowVelocityAccess access = new FlowVelocityAccess(artifact, context);
4626
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
242 Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
243 Bounds bounds =
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
244 calculateZoom(b, getDomainAxisRange());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
245 context.putContextValue("startkm", bounds.getLower());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
246 context.putContextValue("endkm", bounds.getUpper());
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
247 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
248 if (name.equals(FLOW_VELOCITY_MAINCHANNEL)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
249 doMainChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
250 (FlowVelocityData) artifactAndFacet.getData(context),
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
251 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
252 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
253 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
254 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
255 else if (name.equals(FLOW_VELOCITY_TOTALCHANNEL)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
256 doTotalChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
257 (FlowVelocityData) artifactAndFacet.getData(context),
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
258 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
259 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
260 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
261 }
4669
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
262 else if (name.equals(FLOW_VELOCITY_MAINCHANNEL_FILTERED)) {
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
263 doMainChannelOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
264 (FlowVelocityData) artifactAndFacet.getData(context),
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
265 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
266 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
267 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
268 }
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
269 else if (name.equals(FLOW_VELOCITY_TOTALCHANNEL_FILTERED)) {
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
270 doTotalChannelOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
271 (FlowVelocityData) artifactAndFacet.getData(context),
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
272 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
273 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
274 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
275 }
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
276 else if (name.equals(FLOW_VELOCITY_DISCHARGE)) {
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
277 doQOut(
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
278 (FlowVelocityData) artifactAndFacet.getData(context),
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
279 artifactAndFacet,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
280 attr,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
281 visible);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
282 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
283 else if (name.equals(FLOW_VELOCITY_TAU)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
284 doTauOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
285 (FlowVelocityData) artifactAndFacet.getData(context),
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
286 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
287 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
288 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
289 }
4669
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
290 else if (name.equals(FLOW_VELOCITY_TAU_FILTERED)) {
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
291 doTauOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
292 (FlowVelocityData) artifactAndFacet.getData(context),
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
293 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
294 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
295 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
296 }
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
297
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
298 else if (name.equals(FLOW_VELOCITY_ANNOTATION)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
299 doAnnotations(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
300 (FLYSAnnotation) artifactAndFacet.getData(context),
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
301 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
302 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
303 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
304 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
305 else if (FacetTypes.IS.AREA(name)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
306 doArea(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
307 artifactAndFacet.getData(context),
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
308 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
309 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
310 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
311 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
312 else if (FacetTypes.IS.MANUALPOINTS(name)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
313 doPoints(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
314 artifactAndFacet.getData(context),
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
315 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
316 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
317 visible,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
318 YAXIS.V.idx);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
319 }
4395
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
320 else if (name.equals(LONGITUDINAL_ANNOTATION)) {
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
321 doAnnotations(
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
322 (FLYSAnnotation) artifactAndFacet.getData(context),
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
323 artifactAndFacet,
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
324 attr,
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
325 visible);
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
326 }
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
327 else if (name.equals(FLOW_VELOCITY_MEASUREMENT)) {
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
328 doVPointOut(
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
329 artifactAndFacet.getData(context),
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
330 artifactAndFacet,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
331 attr,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
332 visible);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
333 }
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
334 else if (name.equals(BED_QUALITY_BED_DIAMETER_SUBLAYER)) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
335 doBedQualitySubLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
336 (BedDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
337 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
338 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
339 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
340 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
341 else if (name.equals(BED_QUALITY_BED_DIAMETER_TOPLAYER)) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
342 doBedQualityTopLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
343 (BedDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
344 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
345 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
346 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
347 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
348 else if (name.equals(BED_QUALITY_BEDLOAD_DIAMETER)) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
349 doBedQualityLoadDiameter(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
350 (BedloadDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
351 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
352 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
353 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
354 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
355 else {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
356 logger.warn("Unknown facet name: " + name);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
357 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
358 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
359 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
360
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
361
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
362 private void doBedQualityLoadDiameter(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
363 BedloadDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
364 ArtifactAndFacet aandf,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
365 Document attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
366 boolean visible) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
367 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
368 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
369
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
370 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
371 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
372
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
373
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
374 private void doBedQualityTopLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
375 BedDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
376 ArtifactAndFacet aandf,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
377 Document attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
378 boolean visible) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
379 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
380 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
381 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
382 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
383
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
384
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
385 private void doBedQualitySubLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
386 BedDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
387 ArtifactAndFacet aandf,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
388 Document attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
389 boolean visible
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
390 ) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
391 logger.debug("Do beddiametersubout");
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
392 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
393 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
394 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
395 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
396
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
397
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
398 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
399 * Process the output for W facets in a longitudinal section curve.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
400 *
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
401 * @param data A FlowVelocityData object
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
402 * @param aandf The facet. This facet does NOT support any data objects. Use
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
403 * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
404 * data.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
405 * @param theme The theme that contains styling information.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
406 * @param visible The visibility of the curve.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
407 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
408 protected void doMainChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
409 FlowVelocityData data,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
410 ArtifactAndFacet aandf,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
411 Document theme,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
412 boolean visible
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
413 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
414 logger.debug("FlowVelocityGenerator.doMainChannelOut");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
415
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
416 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
417
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
418 StyledSeriesBuilder.addPoints(series, data.getMainChannelPoints(), true);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
419
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
420 addAxisSeries(series, YAXIS.V.idx, visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
421 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
422
4464
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
423
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
424 /** Handle VWQKms. */
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
425 protected void doVPointOut (
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
426 Object data,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
427 ArtifactAndFacet aandf,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
428 Document theme,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
429 boolean visible
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
430 ) {
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
431 logger.debug("FlowVelocityGenerator.doVPointOut");
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
432
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
433 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
434
4464
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
435 FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
436 value = (FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue)
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
437 data;
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
438
b66285ece774 For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4461
diff changeset
439 StyledSeriesBuilder.addPoints(series, new double[][] {{value.getStation()},{value.getV()}}, true);
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
440
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
441 addAxisSeries(series, YAXIS.V.idx, visible);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
442 }
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
443
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
444
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
445 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
446 * Add items to dataseries which describes the differences.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
447 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
448 protected void doTotalChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
449 FlowVelocityData data,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
450 ArtifactAndFacet aandf,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
451 Document theme,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
452 boolean visible
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
453 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
454 logger.debug("FlowVelocityGenerator.doTotalChannelOut");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
455
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
456 if (data == null) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
457 logger.warn("No data to add to FlowVelocity chart.");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
458 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
459 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
460
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
461 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
462
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
463 StyledSeriesBuilder.addPoints(series, data.getTotalChannelPoints(), true);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
464
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
465 addAxisSeries(series, YAXIS.V.idx, visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
466 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
467
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
468
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
469
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
470 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
471 * @param data A FlowVelocityData object
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
472 * @param aandf The facet. This facet does NOT support any data objects. Use
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
473 * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
474 * data.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
475 * @param theme The theme that contains styling information.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
476 * @param visible The visibility of the curve.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
477 */
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
478 protected void doQOut(
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
479 FlowVelocityData data,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
480 ArtifactAndFacet aandf,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
481 Document theme,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
482 boolean visible
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
483 ) {
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
484 logger.debug("FlowVelocityGenerator.doTauOut");
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
485
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
486 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
487
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
488 StyledSeriesBuilder.addPoints(series, data.getQPoints(), true);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
489
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
490 addAxisSeries(series, YAXIS.Q.idx, visible);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
491 }
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
492
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
493 /**
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
494 * @param data A FlowVelocityData object
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
495 * @param aandf The facet. This facet does NOT support any data objects. Use
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
496 * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
497 * data.
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
498 * @param theme The theme that contains styling information.
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
499 * @param visible The visibility of the curve.
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
500 */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
501 protected void doTauOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
502 FlowVelocityData data,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
503 ArtifactAndFacet aandf,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
504 Document theme,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
505 boolean visible
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
506 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
507 logger.debug("FlowVelocityGenerator.doTauOut");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
508
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
509 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
510
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
511 StyledSeriesBuilder.addPoints(series, data.getTauPoints(), true);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
512
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
513 addAxisSeries(series, YAXIS.T.idx, visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
514 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
515
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
516
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
517 /** Look up the axis identifier for a given facet type. */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
518 public int axisIdxForFacet(String facetName) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
519 if (FacetTypes.IS.V(facetName)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
520 return YAXIS.V.idx;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
521 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
522 else if (FacetTypes.IS.T(facetName)) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
523 return YAXIS.T.idx;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
524 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
525 else {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
526 logger.warn("Could not find axis for facet " + facetName);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
527 return YAXIS.V.idx;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
528 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
529 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
530
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
531
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
532 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
533 * Do Area out.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
534 * @param theme styling information.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
535 * @param visible whether or not visible.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
536 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
537 protected void doArea(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
538 Object o,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
539 ArtifactAndFacet aandf,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
540 Document theme,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
541 boolean visible
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
542 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
543 logger.debug("FlowVelocityGenerator.doArea");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
544 logger.warn("TODO: Implement FlowVelocityGenerator.doArea");
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
545 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
546 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
547 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org