comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FlowVelocityState.java @ 4624:bb267a0aa8c2

Generate flow velocity facets based on the type the user selected.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 03 Dec 2012 17:07:03 +0100
parents 4d856f11e527
children d0b9b77fff9f
comparison
equal deleted inserted replaced
4623:89322548b044 4624:bb267a0aa8c2
66 66
67 String id = getID(); 67 String id = getID();
68 int idx = 0; 68 int idx = 0;
69 69
70 for (FlowVelocityData d: data) { 70 for (FlowVelocityData d: data) {
71 logger.error("TODO: Implement Facet creation for chart!"); 71 if (d.getType().equals("main")) {
72 72 newFacets.add(new FlowVelocityFacet(
73 newFacets.add(new FlowVelocityFacet( 73 idx,
74 idx, 74 FLOW_VELOCITY_MAINCHANNEL,
75 FLOW_VELOCITY_MAINCHANNEL, 75 buildMainChannelName(artifact, context, d),
76 buildMainChannelName(artifact, context, d), 76 ComputeType.ADVANCE,
77 ComputeType.ADVANCE, 77 id,
78 id, 78 hash
79 hash 79 ));
80 )); 80
81 81 newFacets.add(new FlowVelocityFacet(
82 newFacets.add(new FlowVelocityFacet( 82 idx,
83 idx, 83 FLOW_VELOCITY_TAU,
84 FLOW_VELOCITY_TOTALCHANNEL, 84 buildTauName(artifact, context, d),
85 buildTotalChannelName(artifact, context, d), 85 ComputeType.ADVANCE,
86 ComputeType.ADVANCE, 86 id,
87 id, 87 hash
88 hash 88 ));
89 )); 89 }
90 90 else if (d.getType().equals("total")) {
91 newFacets.add(new FlowVelocityFacet( 91 newFacets.add(new FlowVelocityFacet(
92 idx, 92 idx,
93 FLOW_VELOCITY_TAU, 93 FLOW_VELOCITY_TOTALCHANNEL,
94 buildTauName(artifact, context, d), 94 buildTotalChannelName(artifact, context, d),
95 ComputeType.ADVANCE, 95 ComputeType.ADVANCE,
96 id, 96 id,
97 hash 97 hash
98 )); 98 ));
99 }
100 else if(d.getType().equals("main_total")) {
101 newFacets.add(new FlowVelocityFacet(
102 idx,
103 FLOW_VELOCITY_MAINCHANNEL,
104 buildMainChannelName(artifact, context, d),
105 ComputeType.ADVANCE,
106 id,
107 hash
108 ));
109 newFacets.add(new FlowVelocityFacet(
110 idx,
111 FLOW_VELOCITY_TAU,
112 buildTauName(artifact, context, d),
113 ComputeType.ADVANCE,
114 id,
115 hash
116 ));
117 newFacets.add(new FlowVelocityFacet(
118 idx,
119 FLOW_VELOCITY_TOTALCHANNEL,
120 buildTotalChannelName(artifact, context, d),
121 ComputeType.ADVANCE,
122 id,
123 hash
124 ));
125 }
99 126
100 newFacets.add(new FlowVelocityFacet( 127 newFacets.add(new FlowVelocityFacet(
101 idx, 128 idx,
102 FLOW_VELOCITY_DISCHARGE, 129 FLOW_VELOCITY_DISCHARGE,
103 buildDischargeName(artifact, context, d), 130 buildDischargeName(artifact, context, d),

http://dive4elements.wald.intevation.org