Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java @ 5863:4897a58c8746
River artifacts: Added new copyright headers.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 14:40:59 +0200 |
parents | 5aa05a7a34b7 |
children | 59ff03ff48f1 |
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 * |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
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 |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
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:
4826
diff
changeset
|
9 package org.dive4elements.river.artifacts.states; |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import java.util.ArrayList; |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import java.util.List; |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import org.apache.log4j.Logger; |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
16 import org.dive4elements.artifactdatabase.state.Facet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
17 import org.dive4elements.artifactdatabase.state.FacetActivity; |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
19 import org.dive4elements.artifacts.Artifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
20 import org.dive4elements.artifacts.CallContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
21 |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
22 import org.dive4elements.river.artifacts.FLYSArtifact; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
23 import org.dive4elements.river.artifacts.access.FlowVelocityAccess; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
24 import org.dive4elements.river.artifacts.model.CalculationResult; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
25 import org.dive4elements.river.artifacts.model.DataFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
26 import org.dive4elements.river.artifacts.model.FacetTypes; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
27 import org.dive4elements.river.artifacts.model.FlowVelocityCalculation; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
28 import org.dive4elements.river.artifacts.model.FlowVelocityData; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
29 import org.dive4elements.river.artifacts.model.FlowVelocityFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
30 import org.dive4elements.river.artifacts.model.FlowVelocityFilterFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4826
diff
changeset
|
31 import org.dive4elements.river.artifacts.resources.Resources; |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
4466
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
34 /* State in which flow velocities can/will be calculated. */ |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 public class FlowVelocityState extends DefaultState implements FacetTypes { |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 private static Logger logger = Logger.getLogger(FlowVelocityState.class); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
39 public static final String I18N_MAINCHANNEL_FACET = |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
40 "facet.flow_velocity.mainchannel"; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
41 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
42 public static final String I18N_TOTALCHANNEL_FACET = |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
43 "facet.flow_velocity.totalchannel"; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
44 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
45 public static final String I18N_TAU_FACET = |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
46 "facet.flow_velocity.tauchannel"; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
47 |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
48 public static final String I18N_MAINCHANNEL_FACET_RAW = |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
49 "facet.flow_velocity.mainchannel.raw"; |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
50 |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
51 public static final String I18N_TOTALCHANNEL_FACET_RAW = |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
52 "facet.flow_velocity.totalchannel.raw"; |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
53 |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
54 public static final String I18N_TAU_FACET_RAW = |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
55 "facet.flow_velocity.tauchannel.raw"; |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
56 |
4466
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
57 public static final String I18N_DISCHARGE_FACET = |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
58 "facet.flow_velocity.discharge"; |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
59 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
60 |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 @Override |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 public Object computeAdvance( |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 FLYSArtifact artifact, |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 String hash, |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 CallContext context, |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 List<Facet> facets, |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 Object old |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 ) { |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 logger.debug("FlowVelocityState.computeAdvance"); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 List<Facet> newFacets = new ArrayList<Facet>(); |
3232
cdbc457e23e2
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3230
diff
changeset
|
72 |
4826
a3dc382bc1ca
BedHeightAccess, FlowVelocityAccess, SedimentLoadAccess: Inherit from RangeAccess.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4793
diff
changeset
|
73 FlowVelocityAccess access = new FlowVelocityAccess(artifact, context); |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 CalculationResult res = old instanceof CalculationResult |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 ? (CalculationResult) old |
3230
b888c5eb65b3
Added new *Access objects for bed height calculation and flow velocity calculation; removed methods for specific data access from MINFOArtifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2706
diff
changeset
|
77 : new FlowVelocityCalculation().calculate(access); |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 if (facets == null || res == null) { |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 return res; |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 } |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 FlowVelocityData[] data = (FlowVelocityData[]) res.getData(); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 logger.debug("Calculated " + data.length + " FlowVelocityData objects"); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
87 String id = getID(); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
88 int idx = 0; |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 for (FlowVelocityData d: data) { |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
91 if (d.getType().equals("main")) { |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
92 newFacets.add(new FlowVelocityFacet( |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
93 idx, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
94 FLOW_VELOCITY_MAINCHANNEL, |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
95 buildFacetName(artifact, context, d, I18N_MAINCHANNEL_FACET_RAW), |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
96 ComputeType.ADVANCE, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
97 id, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
98 hash |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
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:
2702
diff
changeset
|
100 |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
101 newFacets.add(new FlowVelocityFacet( |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
102 idx, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
103 FLOW_VELOCITY_TAU, |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
104 buildFacetName(artifact, context, d, I18N_TAU_FACET_RAW), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
105 ComputeType.ADVANCE, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
106 id, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
107 hash |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
108 )); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
109 newFacets.add(new FlowVelocityFilterFacet( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
110 idx, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
111 FLOW_VELOCITY_MAINCHANNEL_FILTERED, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
112 buildMainChannelName(artifact, context, d), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
113 ComputeType.ADVANCE, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
114 id, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
115 hash |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
116 )); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
117 newFacets.add(new FlowVelocityFilterFacet( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
118 idx, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
119 FLOW_VELOCITY_TAU_FILTERED, |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
120 buildTauName(artifact, context, d), |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
121 ComputeType.ADVANCE, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
122 id, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
123 hash |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
124 )); |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
125 } |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
126 else if (d.getType().equals("total")) { |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
127 newFacets.add(new FlowVelocityFacet( |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
128 idx, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
129 FLOW_VELOCITY_TOTALCHANNEL, |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
130 buildFacetName(artifact, context, d, I18N_TOTALCHANNEL_FACET_RAW), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
131 ComputeType.ADVANCE, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
132 id, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
133 hash |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
134 )); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
135 newFacets.add(new FlowVelocityFilterFacet( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
136 idx, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
137 FLOW_VELOCITY_TOTALCHANNEL_FILTERED, |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
138 buildTotalChannelName(artifact, context, d), |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
139 ComputeType.ADVANCE, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
140 id, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
141 hash |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
142 )); |
4736
b195fede1c3b
Remove trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4669
diff
changeset
|
143 |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
144 } |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
145 else if(d.getType().equals("main_total")) { |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
146 newFacets.add(new FlowVelocityFacet( |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
147 idx, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
148 FLOW_VELOCITY_MAINCHANNEL, |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
149 buildFacetName(artifact, context, d, I18N_MAINCHANNEL_FACET_RAW), |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
150 ComputeType.ADVANCE, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
151 id, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
152 hash |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
153 )); |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
154 newFacets.add(new FlowVelocityFacet( |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
155 idx, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
156 FLOW_VELOCITY_TAU, |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
157 buildFacetName(artifact, context, d, I18N_TAU_FACET_RAW), |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
158 ComputeType.ADVANCE, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
159 id, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
160 hash |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
161 )); |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
162 newFacets.add(new FlowVelocityFacet( |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
163 idx, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
164 FLOW_VELOCITY_TOTALCHANNEL, |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
165 buildFacetName(artifact, context, d, I18N_TOTALCHANNEL_FACET_RAW), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
166 ComputeType.ADVANCE, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
167 id, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
168 hash |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
169 )); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
170 newFacets.add(new FlowVelocityFilterFacet( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
171 idx, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
172 FLOW_VELOCITY_MAINCHANNEL_FILTERED, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
173 buildMainChannelName(artifact, context, d), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
174 ComputeType.ADVANCE, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
175 id, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
176 hash |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
177 )); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
178 newFacets.add(new FlowVelocityFilterFacet( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
179 idx, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
180 FLOW_VELOCITY_TAU_FILTERED, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
181 buildTauName(artifact, context, d), |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
182 ComputeType.ADVANCE, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
183 id, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
184 hash |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
185 )); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
186 newFacets.add(new FlowVelocityFilterFacet( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
187 idx, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
188 FLOW_VELOCITY_TOTALCHANNEL_FILTERED, |
4624
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
189 buildTotalChannelName(artifact, context, d), |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
190 ComputeType.ADVANCE, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
191 id, |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
192 hash |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
193 )); |
bb267a0aa8c2
Generate flow velocity facets based on the type the user selected.
Raimund Renkert <rrenkert@intevation.de>
parents:
4466
diff
changeset
|
194 } |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
195 |
4466
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
196 newFacets.add(new FlowVelocityFacet( |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
197 idx, |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
198 FLOW_VELOCITY_DISCHARGE, |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
199 buildDischargeName(artifact, context, d), |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
200 ComputeType.ADVANCE, |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
201 id, |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
202 hash |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
203 )); |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
204 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
205 idx++; |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
206 } |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
207 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
208 Facet csv = new DataFacet( |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
209 CSV, "CSV data", ComputeType.ADVANCE, hash, id); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
210 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
211 // TODO ADD PDF FACET |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
212 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
213 newFacets.add(csv); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
214 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
215 logger.debug("Created " + newFacets.size() + " new Facets."); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
216 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
217 facets.addAll(newFacets); |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
218 |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
219 return res; |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
220 } |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
221 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
222 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
223 protected String buildFacetName( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
224 FLYSArtifact flys, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
225 CallContext cc, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
226 FlowVelocityData data, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
227 String resourceId |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
228 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
229 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:
2702
diff
changeset
|
230 data.getZone() |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
231 }; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
232 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
233 return Resources.getMsg( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
234 cc.getMeta(), |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
235 resourceId, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
236 resourceId, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
237 args); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
238 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
239 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
240 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
241 protected String buildMainChannelName( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
242 FLYSArtifact flys, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
243 CallContext cc, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
244 FlowVelocityData data |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
245 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
246 return buildFacetName(flys, cc, data, I18N_MAINCHANNEL_FACET); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
247 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
248 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
249 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
250 protected String buildTotalChannelName( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
251 FLYSArtifact flys, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
252 CallContext cc, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
253 FlowVelocityData data |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
254 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
255 return buildFacetName(flys, cc, data, I18N_TOTALCHANNEL_FACET); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
256 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
257 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
258 |
4466
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
259 protected String buildDischargeName( |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
260 FLYSArtifact flys, |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
261 CallContext cc, |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
262 FlowVelocityData data |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
263 ) { |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
264 return buildFacetName(flys, cc, data, I18N_DISCHARGE_FACET); |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
265 } |
4d856f11e527
FlowVelocityState: Create new discharge facet.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4433
diff
changeset
|
266 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
267 protected String buildTauName( |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
268 FLYSArtifact flys, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
269 CallContext cc, |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
270 FlowVelocityData data |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
271 ) { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
272 return buildFacetName(flys, cc, data, I18N_TAU_FACET); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2702
diff
changeset
|
273 } |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
274 |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
275 static { |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
276 // Active/deactivate facets. |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
277 FacetActivity.Registry.getInstance().register( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
278 "minfo", |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
279 new FacetActivity() { |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
280 @Override |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
281 public Boolean isInitialActive( |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
282 Artifact artifact, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
283 Facet facet, |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
284 String output |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
285 ) { |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
286 String name = facet.getName(); |
4793
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
287 if (name.equals(FLOW_VELOCITY_MAINCHANNEL_FILTERED) || |
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
288 name.equals(FLOW_VELOCITY_TAU_FILTERED) || |
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
289 name.equals(FLOW_VELOCITY_DISCHARGE) || |
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
290 name.equals(FLOW_VELOCITY_TOTALCHANNEL_FILTERED)) { |
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
291 return Boolean.TRUE; |
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
292 } |
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
293 else if (name.equals(FLOW_VELOCITY_MAINCHANNEL) || |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
294 name.equals(FLOW_VELOCITY_TAU) || |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
295 name.equals(FLOW_VELOCITY_TOTALCHANNEL)) { |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
296 return Boolean.FALSE; |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
297 } |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
298 else { |
4793
c0d6391bec6f
Fixed facet activities.
Raimund Renkert <rrenkert@intevation.de>
parents:
4736
diff
changeset
|
299 return null; |
4669
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
300 } |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
301 } |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
302 }); |
d0b9b77fff9f
Generate new facets to have raw and filtered data in flow velocity chart.
Raimund Renkert <rrenkert@intevation.de>
parents:
4624
diff
changeset
|
303 } |
2702
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
304 } |
4c00cf83fff1
Added state, calculation and csv exporter for MINFO flow velociy calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
305 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |