Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java @ 6914:695a5f6599b4
Minor refactoring, renamed variable, extracted method.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 26 Aug 2013 14:28:19 +0200 |
parents | 1b35b2ddfc28 |
children | 6fb355b87f50 |
comparison
equal
deleted
inserted
replaced
6913:08527cc6341f | 6914:695a5f6599b4 |
---|---|
58 public void doOut( | 58 public void doOut( |
59 XYChartGenerator generator, | 59 XYChartGenerator generator, |
60 ArtifactAndFacet aandf, | 60 ArtifactAndFacet aandf, |
61 ThemeDocument theme, | 61 ThemeDocument theme, |
62 boolean visible, | 62 boolean visible, |
63 int index | 63 int axisIndex |
64 ) { | 64 ) { |
65 CallContext context = generator.getCallContext(); | 65 CallContext context = generator.getCallContext(); |
66 Object data = aandf.getData(context); | 66 Object data = aandf.getData(context); |
67 if (false && data instanceof WQKms) { | 67 if (false && data instanceof WQKms) { |
68 doWQKmsPointOut( | 68 doWQKmsPointOut( |
69 generator, (WQKms) data, aandf, theme, visible, index); | 69 generator, (WQKms) data, aandf, theme, visible, axisIndex); |
70 return; | 70 return; |
71 } | 71 } |
72 else if (data instanceof RiverAnnotation) { | 72 else if (data instanceof RiverAnnotation) { |
73 if (!(generator instanceof DischargeCurveGenerator)) { | 73 doRiverAnnotationOut( |
74 logger.error("DischargeProcessor can only be used in " + | 74 generator, (RiverAnnotation) data, aandf, theme, visible); |
75 " in DischargeCurveGenerator-classes."); | |
76 return; | |
77 } | |
78 DischargeCurveGenerator dGenerator = | |
79 (DischargeCurveGenerator) generator; | |
80 | |
81 RiverAnnotation mainValues = (RiverAnnotation) data; | |
82 dGenerator.translateRiverAnnotation(mainValues); | |
83 dGenerator.doAnnotations( | |
84 mainValues, | |
85 aandf, theme, visible); | |
86 return; | 75 return; |
87 } | 76 } |
88 logger.error("Can't process " + data.getClass().getName() + " objects"); | 77 logger.error("Can't process " + data.getClass().getName() + " objects"); |
89 } | 78 } |
90 | 79 |
112 ArtifactAndFacet aandf, | 101 ArtifactAndFacet aandf, |
113 ThemeDocument theme, | 102 ThemeDocument theme, |
114 boolean visible, | 103 boolean visible, |
115 int axidx | 104 int axidx |
116 ) { | 105 ) { |
106 logger.debug("doWQKmsPointOut"); | |
117 String title = aandf.getFacetDescription(); | 107 String title = aandf.getFacetDescription(); |
118 XYSeries series = new StyledXYSeries( | 108 XYSeries series = new StyledXYSeries( |
119 title, | 109 title, |
120 theme); | 110 theme); |
121 | 111 |