Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java @ 7068:726d998dce29 generator-refactoring
Remove Axis Walker, unabstract Diagram generator
Diagram generator can now be used as an instance configured
in the out-generators config
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 20 Sep 2013 14:55:44 +0200 |
parents | e0311aa32efb |
children | c453f7ecf479 |
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; |
5865
73da40528cf2
River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5864
diff
changeset
|
35 import org.dive4elements.river.utils.RiverUtils; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
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 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 * 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
|
40 * |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 * @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
|
42 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 public class FlowVelocityGenerator |
6639
769d9ec8abac
backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents:
6517
diff
changeset
|
44 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
|
45 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
|
46 { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 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
|
48 V(0), |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
49 T(1), |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
50 Q(2), |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
51 D(3); |
4457
e7252480ded3
FlowVelocityGenerator: Added TODO about 3rd and 4th axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4395
diff
changeset
|
52 /* 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
|
53 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
|
54 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
|
55 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
|
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 /** 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
|
60 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
|
61 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 /** 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
|
63 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
|
64 "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
|
65 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 * Key to look up internationalized String for LongitudinalSection diagrams |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 * titles. |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 public static final String I18N_CHART_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 "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
|
72 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 * Key to look up internationalized String for LongitudinalSection diagrams |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 * subtitles. |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 public static final String I18N_CHART_SUBTITLE = |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 "chart.flow_velocity.section.subtitle"; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 * 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
|
82 * 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
|
83 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 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
|
85 "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
|
86 |
6639
769d9ec8abac
backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents:
6517
diff
changeset
|
87 public static final String I18N_XAXIS_LABEL = |
769d9ec8abac
backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents:
6517
diff
changeset
|
88 "chart.flow_velocity.section.xaxis.label"; |
769d9ec8abac
backout changeset 6513:ef3b02034f6a
Tom Gottfried <tom@intevation.de>
parents:
6517
diff
changeset
|
89 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 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
|
91 "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
|
92 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 public static final String I18N_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
|
94 "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
|
95 |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
96 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
|
97 "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
|
98 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
|
99 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 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
|
101 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
|
102 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
|
103 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
|
104 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
|
105 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
|
106 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 @Override |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 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
|
109 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
|
110 @Override |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 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
|
112 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
|
113 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 @Override |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 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
|
117 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
|
118 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
|
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 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 * 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
|
126 * |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 * @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
|
128 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 @Override |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 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
|
131 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
|
132 getRiverName() |
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 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
|
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 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 * 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
|
141 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 @Override |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 protected String getDefaultXAxisLabel() { |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5865
diff
changeset
|
144 D4EArtifact flys = (D4EArtifact) master; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 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
|
147 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
|
148 I18N_XAXIS_LABEL_DEFAULT, |
5865
73da40528cf2
River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5864
diff
changeset
|
149 new Object[] { RiverUtils.getRiver(flys).getName() }); |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 @Override |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 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
|
155 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
|
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 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
|
158 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
|
159 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 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
|
161 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
|
162 } |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
163 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
|
164 label = getQAxisLabel(); |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
165 } |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
166 else if (index == YAXIS.D.idx) { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
167 label = getDAxisLabel(); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
168 } |
2706
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 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
|
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
173 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
174 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
175 * 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
|
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 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
|
178 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
|
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
181 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
182 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
183 * 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
|
184 */ |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
185 protected String getQAxisLabel() { |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
186 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
|
187 } |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
188 |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
189 /** |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
190 * 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
|
191 */ |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
192 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
|
193 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
|
194 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
195 |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
196 /** |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
197 * 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
|
198 */ |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
199 protected String getDAxisLabel() { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
200 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
|
201 } |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
202 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
203 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
204 * Produce output. |
3270
4ac581062c40
Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2706
diff
changeset
|
205 * @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
|
206 * @param attr theme for facet |
3270
4ac581062c40
Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2706
diff
changeset
|
207 * @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
|
208 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
209 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
|
210 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
|
211 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
|
212 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
|
213 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
214 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
|
215 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
216 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
|
217 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
218 if (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
|
219 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
|
220 return; |
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
223 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
|
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 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
|
226 return; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
227 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
228 |
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
|
229 if (getXBounds(0) != null && getDomainAxisRange() != null) { |
5b551e3a58d5
Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents:
4468
diff
changeset
|
230 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
|
231 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
|
232 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
|
233 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
|
234 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
|
235 } |
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 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
|
237 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
|
238 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
|
239 } |
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 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
|
241 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
|
242 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
|
243 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
|
244 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
|
245 } |
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 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
|
247 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
|
248 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
|
249 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
|
250 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
|
251 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
|
252 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
|
253 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
|
254 } |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
255 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
|
256 doMainChannelOut( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
257 (FlowVelocityData) artifactAndFacet.getData(context), |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
258 artifactAndFacet, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
259 attr, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
260 visible); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
261 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
262 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
|
263 doTotalChannelOut( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
264 (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
|
265 artifactAndFacet, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
266 attr, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
267 visible); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
268 } |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
269 else if (name.equals(FLOW_VELOCITY_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
|
270 doMainChannelOut( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
271 (FlowVelocityData) artifactAndFacet.getData(context), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
272 artifactAndFacet, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
273 attr, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
274 visible); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
275 } |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
276 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
|
277 doTotalChannelOut( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
278 (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
|
279 artifactAndFacet, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
280 attr, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
281 visible); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
282 } |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
283 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
|
284 doQOut( |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
285 (FlowVelocityData) artifactAndFacet.getData(context), |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
286 artifactAndFacet, |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
287 attr, |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
288 visible); |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
289 } |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
290 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
|
291 doTauOut( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
292 (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
|
293 artifactAndFacet, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
294 attr, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
295 visible); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
296 } |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
297 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
|
298 doTauOut( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
299 (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
|
300 artifactAndFacet, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
301 attr, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
302 visible); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
303 } |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4626
diff
changeset
|
304 |
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 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
|
306 doAnnotations( |
5864
f2e46a668fe6
River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
307 (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
|
308 artifactAndFacet, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
309 attr, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
310 visible); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
311 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
312 else if (FacetTypes.IS.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
|
313 doArea( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
314 artifactAndFacet.getData(context), |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
315 artifactAndFacet, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
316 attr, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
317 visible); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
318 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
319 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
|
320 doPoints( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
321 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
|
322 artifactAndFacet, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
323 attr, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
324 visible, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
325 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
|
326 } |
4395
146f1894e6a6
FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4047
diff
changeset
|
327 else if (name.equals(LONGITUDINAL_ANNOTATION)) { |
146f1894e6a6
FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4047
diff
changeset
|
328 doAnnotations( |
5864
f2e46a668fe6
River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
329 (RiverAnnotation) artifactAndFacet.getData(context), |
4395
146f1894e6a6
FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4047
diff
changeset
|
330 artifactAndFacet, |
146f1894e6a6
FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4047
diff
changeset
|
331 attr, |
146f1894e6a6
FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4047
diff
changeset
|
332 visible); |
146f1894e6a6
FlowVelocityGenerator: Handle ('out') annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4047
diff
changeset
|
333 } |
4458
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
334 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
|
335 doVPointOut( |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
336 artifactAndFacet.getData(context), |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
337 artifactAndFacet, |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
338 attr, |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
339 visible); |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
340 } |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
341 else if (name.equals(BED_QUALITY_BED_DIAMETER_SUBLAYER)) { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
342 doBedQualitySubLayerOut( |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
343 (BedDiameterResult)artifactAndFacet.getData(context), |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
344 artifactAndFacet, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
345 attr, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
346 visible); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
347 } |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
348 else if (name.equals(BED_QUALITY_BED_DIAMETER_TOPLAYER)) { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
349 doBedQualityTopLayerOut( |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
350 (BedDiameterResult)artifactAndFacet.getData(context), |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
351 artifactAndFacet, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
352 attr, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
353 visible); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
354 } |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
355 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
|
356 doBedQualityLoadDiameter( |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
357 (BedloadDiameterResult)artifactAndFacet.getData(context), |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
358 artifactAndFacet, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
359 attr, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
360 visible); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
361 } |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
362 else { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
363 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
|
364 return; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
365 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
366 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
367 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
368 |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
369 private void doBedQualityLoadDiameter( |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
370 BedloadDiameterResult data, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
371 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
|
372 ThemeDocument attr, |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
373 boolean visible) { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
374 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
|
375 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true); |
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 addAxisSeries(series, YAXIS.D.idx, visible); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
378 } |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
379 |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
380 |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
381 private void doBedQualityTopLayerOut( |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
382 BedDiameterResult data, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
383 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
|
384 ThemeDocument attr, |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
385 boolean visible) { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
386 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
|
387 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
388 addAxisSeries(series, YAXIS.D.idx, visible); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
389 } |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
390 |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
391 |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
392 private void doBedQualitySubLayerOut( |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
393 BedDiameterResult data, |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
394 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
|
395 ThemeDocument attr, |
5549
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
396 boolean visible |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
397 ) { |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
398 logger.debug("Do beddiametersubout"); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
399 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
|
400 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
401 addAxisSeries(series, YAXIS.D.idx, visible); |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
402 } |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
403 |
38acd82feeac
Added bed quality facets to flow velocity datacage.
Raimund Renkert <rrenkert@intevation.de>
parents:
4826
diff
changeset
|
404 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
405 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
406 * 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
|
407 * |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
408 * @param data A FlowVelocityData object |
3270
4ac581062c40
Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2706
diff
changeset
|
409 * @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
|
410 * 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
|
411 * data. |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
412 * @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
|
413 * @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
|
414 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
415 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
|
416 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
|
417 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
|
418 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
|
419 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
|
420 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
421 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
|
422 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
423 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
|
424 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
425 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
|
426 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
427 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
|
428 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
429 |
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
|
430 |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4461
diff
changeset
|
431 /** Handle VWQKms. */ |
4458
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
432 protected void doVPointOut ( |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
433 Object data, |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
434 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
|
435 ThemeDocument theme, |
4458
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
436 boolean visible |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
437 ) { |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
438 logger.debug("FlowVelocityGenerator.doVPointOut"); |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
439 |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
440 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
|
441 |
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
|
442 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
|
443 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
|
444 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
|
445 |
b66285ece774
For FlowV.-Artifacts, use given id, fetch data and display via facet and generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4461
diff
changeset
|
446 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
|
447 |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
448 addAxisSeries(series, YAXIS.V.idx, visible); |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
449 } |
0968a35247ac
FlowVelocityGenerator: Dummy-handle new measured velocity facets.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4457
diff
changeset
|
450 |
2706
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 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
453 * 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
|
454 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
455 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
|
456 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
|
457 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
|
458 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
|
459 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
|
460 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
461 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
|
462 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
463 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
|
464 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
|
465 return; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
466 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
467 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
468 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
|
469 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
470 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
|
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 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
|
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
476 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
477 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
478 * @param data A FlowVelocityData object |
3270
4ac581062c40
Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2706
diff
changeset
|
479 * @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
|
480 * 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
|
481 * data. |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
482 * @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
|
483 * @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
|
484 */ |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
485 protected void doQOut( |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
486 FlowVelocityData data, |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
487 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
|
488 ThemeDocument theme, |
4468
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
489 boolean visible |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
490 ) { |
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
|
491 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
|
492 |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
493 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
|
494 |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
495 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
|
496 |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
497 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
|
498 } |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
499 |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
500 /** |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
501 * @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
|
502 * @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
|
503 * 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
|
504 * data. |
2e8638567c49
FlowVelocityGenerator: Handle new discharge curves at new third axis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4464
diff
changeset
|
505 * @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
|
506 * @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
|
507 */ |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
508 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
|
509 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
|
510 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
|
511 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
|
512 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
|
513 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
514 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
|
515 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
516 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
|
517 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
518 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
|
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 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
|
521 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
522 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
523 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
524 /** 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
|
525 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
|
526 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
|
527 return YAXIS.V.idx; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
528 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
529 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
|
530 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
|
531 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
532 else { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
533 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
|
534 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
|
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 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
538 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
539 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
540 * 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
|
541 * @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
|
542 * @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
|
543 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
544 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
|
545 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
|
546 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
|
547 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
|
548 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
|
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 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
|
551 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
|
552 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
553 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
554 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |