annotate artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java @ 7213:c453f7ecf479

FlowVelocityGenerator: Simplify code a bit, master and its river is exposed already.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 30 Sep 2013 17:40:04 +0200
parents e0311aa32efb
children
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
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
17 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
18 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
19
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
20 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
21
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
22 import org.dive4elements.river.artifacts.access.FlowVelocityAccess;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
23 import org.dive4elements.river.artifacts.model.FacetTypes;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
24 import org.dive4elements.river.artifacts.model.FlowVelocityData;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
25 import org.dive4elements.river.artifacts.model.minfo.BedDiameterResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
26 import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
27 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
28
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
29 import org.dive4elements.river.jfree.Bounds;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
30 import org.dive4elements.river.jfree.DoubleBounds;
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
31 import org.dive4elements.river.jfree.RiverAnnotation;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
32 import org.dive4elements.river.jfree.StyledXYSeries;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5549
diff changeset
33
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
34 import org.dive4elements.river.themes.ThemeDocument;
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
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 * 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
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 * @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
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 public class FlowVelocityGenerator
6639
769d9ec8abac backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents: 6517
diff changeset
43 extends XYChartGenerator
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 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
45 {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 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
47 V(0),
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
48 T(1),
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
49 Q(2),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
50 D(3);
4457
e7252480ded3 FlowVelocityGenerator: Added TODO about 3rd and 4th axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4395
diff changeset
51 /* 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
52 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
53 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
54 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
55 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 }
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 /** 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
59 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
60
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 /** 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
62 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
63 "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
64
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 * 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
67 * titles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 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
70 "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
71
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 * 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
74 * subtitles.
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 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
77 "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
78
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 * 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
81 * 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
82 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 public static final String I18N_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
84 "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
85
6639
769d9ec8abac backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents: 6517
diff changeset
86 public static final String I18N_XAXIS_LABEL =
769d9ec8abac backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents: 6517
diff changeset
87 "chart.flow_velocity.section.xaxis.label";
769d9ec8abac backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents: 6517
diff changeset
88
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 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
90 "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
91
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92 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
93 "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
94
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
95 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
96 "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
97 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
98
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 public static final String I18N_CHART_TITLE_DEFAULT = "Geschwindigkeit- und Schubspannung";
6639
769d9ec8abac backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents: 6517
diff changeset
100 public static final String I18N_XAXIS_LABEL_DEFAULT = "km";
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_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
102 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
103 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
104 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
105
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107 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
108 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
109 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 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
111 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
112 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115 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
116 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
117 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
118 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 };
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 }
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 * 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
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 * @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
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 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
129 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
130 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
131 getRiverName()
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
132 };
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
134 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
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
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 * 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
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 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
142 protected String getDefaultXAxisLabel() {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
143 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
144 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
145 I18N_XAXIS_LABEL_DEFAULT,
7213
c453f7ecf479 FlowVelocityGenerator: Simplify code a bit, master and its river is
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6995
diff changeset
146 new Object[] { getRiverName() });
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
147 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
148
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
149
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
150 @Override
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
151 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
152 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
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 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
155 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
156 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
157 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
158 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
159 }
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
160 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
161 label = getQAxisLabel();
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
162 }
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
163 else if (index == YAXIS.D.idx) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
164 label = getDAxisLabel();
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
165 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
166
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
167 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
168 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
169
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
170
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
171 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
172 * 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
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 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
175 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
176 }
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
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
179 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
180 * 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
181 */
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
182 protected String getQAxisLabel() {
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
183 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
184 }
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
185
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
186 /**
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
187 * 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
188 */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
189 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
190 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
191 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
192
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
193 /**
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
194 * 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
195 */
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
196 protected String getDAxisLabel() {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
197 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
198 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
199
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
200 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
201 * Produce output.
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
202 * @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
203 * @param attr theme for facet
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
204 * @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
205 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
206 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
207 ArtifactAndFacet artifactAndFacet,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
208 ThemeDocument attr,
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 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
210 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
211 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
212
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
213 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
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 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
216 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
217 return;
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
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
220 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
221
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
222 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
223 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
224 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
225
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
226 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
227 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
228 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
229 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
230 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
231 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
232 }
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
233 else if (getXBounds(0) != null && getDomainAxisRange() == null) {
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
234 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
235 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
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) {
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
238 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
239 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
240 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
241 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
242 }
5b551e3a58d5 Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents: 4468
diff changeset
243 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
244 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
245 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
246 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
247 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
248 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
249 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
250 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
251 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
252 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
253 doMainChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
254 (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
255 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
256 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
257 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
258 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
259 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
260 doTotalChannelOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
261 (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
262 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
263 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
264 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
265 }
4669
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
266 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
267 doMainChannelOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
268 (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
269 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
270 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
271 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
272 }
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
273 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
274 doTotalChannelOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
275 (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
276 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
277 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
278 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
279 }
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
280 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
281 doQOut(
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
282 (FlowVelocityData) artifactAndFacet.getData(context),
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
283 artifactAndFacet,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
284 attr,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
285 visible);
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
286 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
287 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
288 doTauOut(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
289 (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
290 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
291 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
292 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
293 }
4669
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
294 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
295 doTauOut(
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
296 (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
297 artifactAndFacet,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
298 attr,
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
299 visible);
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
300 }
d0b9b77fff9f Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents: 4626
diff changeset
301
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
302 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
303 doAnnotations(
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
304 (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
305 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
306 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
307 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
308 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
309 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
310 doArea(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
311 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
312 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
313 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
314 visible);
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
315 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
316 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
317 doPoints(
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
318 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
319 artifactAndFacet,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
320 attr,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
321 visible,
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
322 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
323 }
4395
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
324 else if (name.equals(LONGITUDINAL_ANNOTATION)) {
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
325 doAnnotations(
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
326 (RiverAnnotation) artifactAndFacet.getData(context),
4395
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
327 artifactAndFacet,
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
328 attr,
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
329 visible);
146f1894e6a6 FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4047
diff changeset
330 }
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
331 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
332 doVPointOut(
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
333 artifactAndFacet.getData(context),
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
334 artifactAndFacet,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
335 attr,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
336 visible);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
337 }
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
338 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
339 doBedQualitySubLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
340 (BedDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
341 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
342 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
343 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
344 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
345 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
346 doBedQualityTopLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
347 (BedDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
348 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
349 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
350 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
351 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
352 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
353 doBedQualityLoadDiameter(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
354 (BedloadDiameterResult)artifactAndFacet.getData(context),
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
355 artifactAndFacet,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
356 attr,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
357 visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
358 }
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
359 else {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
360 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
361 return;
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
362 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
363 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
364
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
365
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
366 private void doBedQualityLoadDiameter(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
367 BedloadDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
368 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
369 ThemeDocument attr,
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
370 boolean visible) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
371 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
372 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
373
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
374 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
375 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
376
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 private void doBedQualityTopLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
379 BedDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
380 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
381 ThemeDocument attr,
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
382 boolean visible) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
383 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
384 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
385 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
386 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
387
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
388
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
389 private void doBedQualitySubLayerOut(
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
390 BedDiameterResult data,
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
391 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
392 ThemeDocument attr,
5549
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
393 boolean visible
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
394 ) {
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
395 logger.debug("Do beddiametersubout");
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
396 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
397 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
398 addAxisSeries(series, YAXIS.D.idx, visible);
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
399 }
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
400
38acd82feeac Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents: 4826
diff changeset
401
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
402 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
403 * 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
404 *
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
405 * @param data A FlowVelocityData object
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
406 * @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
407 * 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
408 * data.
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 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
410 * @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
411 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
412 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
413 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
414 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
415 ThemeDocument theme,
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
416 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
417 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
418 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
419
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
420 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
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 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
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 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
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
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
427
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
428 /** Handle VWQKms. */
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
429 protected void doVPointOut (
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
430 Object data,
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
431 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
432 ThemeDocument theme,
4458
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
433 boolean visible
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
434 ) {
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
435 logger.debug("FlowVelocityGenerator.doVPointOut");
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
436
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
437 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
438
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
439 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
440 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
441 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
442
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 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
444
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
445 addAxisSeries(series, YAXIS.V.idx, visible);
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
446 }
0968a35247ac FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4457
diff changeset
447
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
448
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
449 /**
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
450 * 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
451 */
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
452 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
453 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
454 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
455 ThemeDocument theme,
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
456 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
457 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
458 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
459
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
460 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
461 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
462 return;
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
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
465 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
466
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
467 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
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 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
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
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
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 * @param data A FlowVelocityData object
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2706
diff changeset
476 * @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
477 * 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
478 * data.
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 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
480 * @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
481 */
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
482 protected void doQOut(
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
483 FlowVelocityData data,
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
484 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
485 ThemeDocument theme,
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
486 boolean visible
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
487 ) {
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
488 logger.debug("FlowVelocityGenerator.doQOut");
4468
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
489
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
490 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
491
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
492 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
493
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
494 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
495 }
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
496
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 * @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
499 * @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
500 * 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
501 * data.
2e8638567c49 FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4464
diff changeset
502 * @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
503 * @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
504 */
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
505 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
506 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
507 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
508 ThemeDocument theme,
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 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
510 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
511 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
512
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
513 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
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 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
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 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
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
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 /** 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
522 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
523 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
524 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
525 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
526 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
527 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
528 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
529 else {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
530 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
531 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
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 }
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
534
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
535
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 * 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
538 * @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
539 * @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
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 protected void doArea(
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
542 Object o,
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
543 ArtifactAndFacet aandf,
6905
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
544 ThemeDocument theme,
1b35b2ddfc28 Artifacts: Introduce ThemeDocument & make stuff compileable again. THIS BREAKS THE SYSTEM! TODO: Move ThemeUtils into ThemeDocument.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 6101
diff changeset
545 boolean visible
2706
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
546 ) {
d8444fcb4e44 Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
547 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
548 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
549 }
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 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org