annotate artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java @ 6601:5ecc6d4d73f2

Add official fixings to Waterlevel CSV Export (issue1384) This searches the collection for staticwqkms artifacts that contain official data and adds that data to the export. The data is filtered by the calculation range and sorted by the calculation direction.
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 18 Jul 2013 13:16:33 +0200
parents a0078e5e3b39
children ef3b02034f6a 1b35b2ddfc28
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5867
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5867
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
9 package org.dive4elements.river.exports;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
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
11 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
12
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 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
14
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 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
16
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 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
18
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
19 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
20 import org.dive4elements.artifactdatabase.state.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
21
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
22 import org.dive4elements.river.artifacts.D4EArtifact;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
24 import org.dive4elements.river.artifacts.access.FlowVelocityAccess;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
25 import org.dive4elements.river.artifacts.model.FacetTypes;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
26 import org.dive4elements.river.artifacts.model.FlowVelocityData;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
27 import org.dive4elements.river.artifacts.model.minfo.BedDiameterResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
28 import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
29 import org.dive4elements.river.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
30
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
31 import org.dive4elements.river.jfree.Bounds;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
32 import org.dive4elements.river.jfree.DoubleBounds;
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
33 import org.dive4elements.river.jfree.RiverAnnotation;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
34 import org.dive4elements.river.jfree.StyledXYSeries;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
35
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5864
diff changeset
36 import org.dive4elements.river.utils.RiverUtils;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
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 * 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
41 *
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 * @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
43 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 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
45 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
46 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
47 {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 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
49 V(0),
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
50 T(1),
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
51 Q(2),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
52 D(3);
4457
e7252480ded3 FlowVelocityGenerator: Added TODO about 3rd and 4th axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4395
diff changeset
53 /* 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
54 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
55 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
56 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
57 }
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 /** 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
61 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
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 /** 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
64 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
65 "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
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 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 * 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
69 * titles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 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
72 "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
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 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 * 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
76 * subtitles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 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
79 "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
80
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 * 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
83 * 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
84 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 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
86 "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
87
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88 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
89 "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
90
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91 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
92 "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
93
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_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
95 "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
96
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 =
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
98 "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
99 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
100
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 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
102 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
103 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
104 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
105 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
106 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
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 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
110 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
111 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112 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
113 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
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 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 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
118 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
119 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
120 }
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 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
123
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
124
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
125 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
126 * 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
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 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
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 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
131 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
132 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
133 getRiverName()
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
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
136 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
137 }
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
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
140 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
141 * 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
142 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
143 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
144 protected String getDefaultXAxisLabel() {
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
145 D4EArtifact flys = (D4EArtifact) master;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
146
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
147 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
148 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
149 I18N_XAXIS_LABEL_DEFAULT,
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5864
diff changeset
150 new Object[] { RiverUtils.getRiver(flys).getName() });
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
151 }
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
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
154 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
155 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
156 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
157
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
158 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
159 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
160 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
161 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
162 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
163 }
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
164 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
165 label = getQAxisLabel();
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
166 }
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
167 else if (index == YAXIS.D.idx) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
168 label = getDAxisLabel();
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
169 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
170
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 label;
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 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
178 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
179 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
180 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
181
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
182
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
183 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
184 * 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
185 */
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
186 protected String getQAxisLabel() {
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
187 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
188 }
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
189
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
190 /**
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
191 * 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
192 */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
193 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
194 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
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
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
197 /**
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
198 * 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
199 */
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
200 protected String getDAxisLabel() {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
201 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
202 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
203
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
204 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
205 * Produce output.
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
206 * @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
207 * @param attr theme for facet
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
208 * @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
209 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
210 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
211 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
212 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
213 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
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 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
216
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
217 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
218
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
219 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
220 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
221 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
222 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
223
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
224 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
225
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
226 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
227 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
228 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
229
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
230 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
231 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
232 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
233 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
234 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
235 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
236 }
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 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
238 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
239 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
240 }
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
241 else if (getXBounds(0) == null && getDomainAxisRange() == null) {
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
242 D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact();
6101
a0078e5e3b39 Removed unused context from RangeAccess and subclasses leading to some dead code removal.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
243 FlowVelocityAccess access = new FlowVelocityAccess(artifact);
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
244 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
245 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
246 }
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 else if (getXBounds(0) == null && getDomainAxisRange() != null){
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
248 D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact();
6101
a0078e5e3b39 Removed unused context from RangeAccess and subclasses leading to some dead code removal.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5994
diff changeset
249 FlowVelocityAccess access = new FlowVelocityAccess(artifact);
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
250 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
251 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
252 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
253 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
254 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
255 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
256 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
257 doMainChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
258 (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
259 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
260 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
261 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
262 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
263 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
264 doTotalChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
265 (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
266 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
267 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
268 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
269 }
4669
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
270 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
271 doMainChannelOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
272 (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
273 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
274 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
275 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
276 }
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
277 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
278 doTotalChannelOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
279 (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
280 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
281 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
282 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
283 }
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
284 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
285 doQOut(
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
286 (FlowVelocityData) artifactAndFacet.getData(context),
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
287 artifactAndFacet,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
288 attr,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
289 visible);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
290 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
291 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
292 doTauOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
293 (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
294 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
295 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
296 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
297 }
4669
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
298 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
299 doTauOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
300 (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
301 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
302 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
303 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
304 }
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
305
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
306 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
307 doAnnotations(
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
308 (RiverAnnotation) artifactAndFacet.getData(context),
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
309 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
310 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
311 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
312 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
313 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
314 doArea(
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.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
316 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
317 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
318 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
319 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
320 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
321 doPoints(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
322 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
323 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
324 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
325 visible,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
326 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
327 }
4395
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
328 else if (name.equals(LONGITUDINAL_ANNOTATION)) {
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
329 doAnnotations(
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
330 (RiverAnnotation) artifactAndFacet.getData(context),
4395
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
331 artifactAndFacet,
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
332 attr,
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
333 visible);
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
334 }
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
335 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
336 doVPointOut(
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
337 artifactAndFacet.getData(context),
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
338 artifactAndFacet,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
339 attr,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
340 visible);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
341 }
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
342 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
343 doBedQualitySubLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
344 (BedDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
345 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
346 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
347 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
348 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
349 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
350 doBedQualityTopLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
351 (BedDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
352 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
353 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
354 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
355 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
356 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
357 doBedQualityLoadDiameter(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
358 (BedloadDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
359 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
360 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
361 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
362 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
363 else {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
364 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
365 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
366 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
367 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
368
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
369
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
370 private void doBedQualityLoadDiameter(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
371 BedloadDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
372 ArtifactAndFacet aandf,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
373 Document attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
374 boolean visible) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
375 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
376 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
377
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
378 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
379 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
380
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
381
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
382 private void doBedQualityTopLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
383 BedDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
384 ArtifactAndFacet aandf,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
385 Document attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
386 boolean visible) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
387 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
388 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
389 addAxisSeries(series, YAXIS.D.idx, 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
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
392
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
393 private void doBedQualitySubLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
394 BedDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
395 ArtifactAndFacet aandf,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
396 Document attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
397 boolean visible
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
398 ) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
399 logger.debug("Do beddiametersubout");
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
400 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
401 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
402 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
403 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
404
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
405
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
406 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
407 * 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
408 *
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
409 * @param data A FlowVelocityData object
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
410 * @param aandf The facet. This facet does NOT support any data objects. Use
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
411 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
412 * data.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
413 * @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
414 * @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
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 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
417 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
418 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
419 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
420 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
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 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
423
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
424 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
425
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
426 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
427
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
428 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
429 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
430
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
431
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
432 /** Handle VWQKms. */
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
433 protected void doVPointOut (
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
434 Object data,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
435 ArtifactAndFacet aandf,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
436 Document theme,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
437 boolean visible
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
438 ) {
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
439 logger.debug("FlowVelocityGenerator.doVPointOut");
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 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
442
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
443 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
444 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
445 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
446
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
447 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
448
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
449 addAxisSeries(series, YAXIS.V.idx, visible);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
450 }
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
451
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
452
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 * 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
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 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
457 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
458 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
459 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
460 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
461 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
462 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
463
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
464 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
465 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
466 return;
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 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
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 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
472
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
473 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
474 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
475
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
476
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
477
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
478 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
479 * @param data A FlowVelocityData object
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
480 * @param aandf The facet. This facet does NOT support any data objects. Use
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
481 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
482 * data.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
483 * @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
484 * @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
485 */
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
486 protected void doQOut(
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
487 FlowVelocityData data,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
488 ArtifactAndFacet aandf,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
489 Document theme,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
490 boolean 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 logger.debug("FlowVelocityGenerator.doTauOut");
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 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
495
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
496 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
497
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
498 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
499 }
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
500
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
501 /**
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
502 * @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
503 * @param aandf The facet. This facet does NOT support any data objects. Use
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
504 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
505 * data.
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
506 * @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
507 * @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
508 */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
509 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
510 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
511 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
512 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
513 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
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 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
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 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
518
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
519 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
520
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
521 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
522 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
523
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 /** 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
526 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
527 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
528 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
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 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
531 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
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 else {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
534 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
535 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
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 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
538
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
539
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
540 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
541 * 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
542 * @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
543 * @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
544 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
545 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
546 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
547 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
548 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
549 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
550 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
551 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
552 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
553 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
554 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
555 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org