Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionGenerator.java @ 4448:9425b7c51b73
Use new WOutProcessor for generating charts
Use WOutProcessor in DischargeLongitudinalSectionGenerator and
LongitudinalSectionGenerator.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 07 Nov 2012 15:56:28 +0100 |
parents | 1fcaeced48f2 |
children | fc0cdcae8f07 |
comparison
equal
deleted
inserted
replaced
4447:a5993b69439b | 4448:9425b7c51b73 |
---|---|
10 import de.intevation.artifactdatabase.state.Facet; | 10 import de.intevation.artifactdatabase.state.Facet; |
11 | 11 |
12 import de.intevation.flys.artifacts.model.FacetTypes; | 12 import de.intevation.flys.artifacts.model.FacetTypes; |
13 import de.intevation.flys.artifacts.model.WQCKms; | 13 import de.intevation.flys.artifacts.model.WQCKms; |
14 import de.intevation.flys.artifacts.model.WQKms; | 14 import de.intevation.flys.artifacts.model.WQKms; |
15 import de.intevation.flys.artifacts.model.WKms; | 15 import de.intevation.flys.exports.process.Processor; |
16 import de.intevation.flys.exports.process.WOutProcessor; | |
16 | 17 |
17 import de.intevation.flys.jfree.FLYSAnnotation; | 18 import de.intevation.flys.jfree.FLYSAnnotation; |
18 import de.intevation.flys.jfree.StyledXYSeries; | 19 import de.intevation.flys.jfree.StyledXYSeries; |
19 | 20 |
20 | 21 |
51 return; | 52 return; |
52 } | 53 } |
53 | 54 |
54 Facet facet = artifactFacet.getFacet(); | 55 Facet facet = artifactFacet.getFacet(); |
55 | 56 |
56 if (IS.WQ_KM(name)) { | 57 if (name.equals(DISCHARGE_LONGITUDINAL_Q)) { |
57 doWOut( | |
58 (WQKms) artifactFacet.getData(context), | |
59 artifactFacet, | |
60 attr, | |
61 visible); | |
62 } | |
63 else if (name.equals(DISCHARGE_LONGITUDINAL_Q)) { | |
64 doQOut( | 58 doQOut( |
65 (WQKms) artifactFacet.getData(context), | 59 (WQKms) artifactFacet.getData(context), |
66 artifactFacet, | 60 artifactFacet, |
67 attr, | 61 attr, |
68 visible); | 62 visible); |
72 (WQCKms) artifactFacet.getData(context), | 66 (WQCKms) artifactFacet.getData(context), |
73 facet, | 67 facet, |
74 attr, | 68 attr, |
75 visible); | 69 visible); |
76 } | 70 } |
77 else if (IS.W_KM(name)) { | |
78 doWOut( | |
79 (WKms) artifactFacet.getData(context), | |
80 artifactFacet, | |
81 attr, visible); | |
82 } | |
83 else if (name.equals(LONGITUDINAL_ANNOTATION)) { | 71 else if (name.equals(LONGITUDINAL_ANNOTATION)) { |
84 doAnnotations((FLYSAnnotation) artifactFacet.getData(context), | 72 doAnnotations((FLYSAnnotation) artifactFacet.getData(context), |
85 artifactFacet, attr, visible); | 73 artifactFacet, attr, visible); |
86 } | 74 } |
87 else if (FacetTypes.IS.MANUALPOINTS(name)) { | 75 else if (FacetTypes.IS.MANUALPOINTS(name)) { |
88 doPoints(artifactFacet.getData(context), | 76 doPoints(artifactFacet.getData(context), |
89 artifactFacet, | 77 artifactFacet, |
90 attr, visible, YAXIS.W.idx); | 78 attr, visible, YAXIS.W.idx); |
91 } | 79 } |
92 else { | 80 else { |
93 logger.warn("Unknown facet name: " + name); | 81 Processor processor = new WOutProcessor(); |
82 if (processor.canHandle(name)) { | |
83 processor.doOut(this, artifactFacet, attr, visible, YAXIS.W.idx); | |
84 } | |
85 else { | |
86 logger.warn("Unknown facet name: " + name); | |
87 } | |
94 } | 88 } |
95 } | 89 } |
96 | 90 |
97 | 91 |
98 /** | 92 /** |