Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java @ 6901:a3bf140ce739
ComputedDischargeCurveGenerator: Use DischargeProcessor to add main values.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 22 Aug 2013 14:27:42 +0200 |
parents | 1186fa8a0bb9 |
children | 1b35b2ddfc28 |
comparison
equal
deleted
inserted
replaced
6900:a38640f273ae | 6901:a3bf140ce739 |
---|---|
14 import org.dive4elements.river.artifacts.StaticWKmsArtifact; | 14 import org.dive4elements.river.artifacts.StaticWKmsArtifact; |
15 import org.dive4elements.river.artifacts.WINFOArtifact; | 15 import org.dive4elements.river.artifacts.WINFOArtifact; |
16 import org.dive4elements.river.artifacts.model.FacetTypes; | 16 import org.dive4elements.river.artifacts.model.FacetTypes; |
17 import org.dive4elements.river.artifacts.model.WKms; | 17 import org.dive4elements.river.artifacts.model.WKms; |
18 import org.dive4elements.river.artifacts.model.WQKms; | 18 import org.dive4elements.river.artifacts.model.WQKms; |
19 import org.dive4elements.river.exports.process.DischargeProcessor; | |
19 import org.dive4elements.river.jfree.RiverAnnotation; | 20 import org.dive4elements.river.jfree.RiverAnnotation; |
20 import org.dive4elements.river.jfree.StickyAxisAnnotation; | 21 import org.dive4elements.river.jfree.StickyAxisAnnotation; |
21 import org.dive4elements.river.jfree.StyledXYSeries; | 22 import org.dive4elements.river.jfree.StyledXYSeries; |
22 | 23 |
23 import org.dive4elements.river.utils.RiverUtils; | 24 import org.dive4elements.river.utils.RiverUtils; |
150 if (name == null) { | 151 if (name == null) { |
151 logger.warn("Broken facet in computed discharge out generation."); | 152 logger.warn("Broken facet in computed discharge out generation."); |
152 return; | 153 return; |
153 } | 154 } |
154 | 155 |
155 //XXX DEAD CODE // Facet facet = artifactFacet.getFacet(); | 156 DischargeProcessor dProcessor = new DischargeProcessor(getRange()[0]); |
156 | 157 if (dProcessor.canHandle(name)) { |
157 if (name.equals(COMPUTED_DISCHARGE_Q)) { | 158 dProcessor.doOut(this, artifactFacet, attr, visible, YAXIS.W.idx); |
159 } | |
160 else if (name.equals(COMPUTED_DISCHARGE_Q)) { | |
158 doDischargeQOut((WQKms) artifactFacet.getData(context), artifactFacet, attr, visible); | 161 doDischargeQOut((WQKms) artifactFacet.getData(context), artifactFacet, attr, visible); |
159 } | 162 } |
160 else if (name.equals(STATIC_WQ)) { | 163 else if (name.equals(STATIC_WQ)) { |
161 doWQOut(artifactFacet.getData(context), artifactFacet, attr, visible); | 164 doWQOut(artifactFacet.getData(context), artifactFacet, attr, visible); |
162 } | 165 } |
164 doWQAnnotations( | 167 doWQAnnotations( |
165 artifactFacet.getData(context), | 168 artifactFacet.getData(context), |
166 artifactFacet, | 169 artifactFacet, |
167 attr, | 170 attr, |
168 visible); | 171 visible); |
169 } | |
170 else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q) | |
171 || name.equals(MAINVALUES_Q) | |
172 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W) | |
173 || name.equals(MAINVALUES_W) | |
174 ) { | |
175 RiverAnnotation mainValues = (RiverAnnotation) artifactFacet.getData(context); | |
176 translateRiverAnnotation(mainValues); | |
177 doAnnotations( | |
178 mainValues, | |
179 artifactFacet, attr, visible); | |
180 } | 172 } |
181 else if (STATIC_WKMS_INTERPOL.equals(name) || | 173 else if (STATIC_WKMS_INTERPOL.equals(name) || |
182 HEIGHTMARKS_POINTS.equals(name) || | 174 HEIGHTMARKS_POINTS.equals(name) || |
183 STATIC_WQKMS_W.equals(name)) { | 175 STATIC_WQKMS_W.equals(name)) { |
184 doWAnnotations( | 176 doWAnnotations( |