Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/process/WOutProcessor.java @ 8856:5e38e2924c07 3.2.x
Fix code style.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 18 Jan 2018 20:12:01 +0100 |
parents | e4606eae8ea5 |
children | 1cc7653ca84f 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8855:d7c005e12af0 | 8856:5e38e2924c07 |
---|---|
51 ) { | 51 ) { |
52 log.debug("Processing facet: " + bundle.getFacetName()); | 52 log.debug("Processing facet: " + bundle.getFacetName()); |
53 CallContext context = generator.getCallContext(); | 53 CallContext context = generator.getCallContext(); |
54 Object data = bundle.getData(context); | 54 Object data = bundle.getData(context); |
55 | 55 |
56 XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); | 56 XYSeries series = new StyledXYSeries( |
57 bundle.getFacetDescription(), theme); | |
57 | 58 |
58 // Handle non WKms data. | 59 // Handle non WKms data. |
59 if (bundle.getFacetName().equals(FacetTypes.FLOW_VELOCITY_WATERLEVEL)) { | 60 if ( |
61 bundle.getFacetName().equals(FacetTypes.FLOW_VELOCITY_WATERLEVEL) | |
62 ) { | |
60 FastFlowVelocityMeasurementValue fData = | 63 FastFlowVelocityMeasurementValue fData = |
61 (FastFlowVelocityMeasurementValue) data; | 64 (FastFlowVelocityMeasurementValue) data; |
62 double[][] points = new double[][] {{fData.getStation()},{fData.getW()}}; | 65 double[][] points = new double[][] { |
66 {fData.getStation()},{fData.getW()}}; | |
63 StyledSeriesBuilder.addPoints(series, points, true); | 67 StyledSeriesBuilder.addPoints(series, points, true); |
64 generator.addAxisSeries(series, axisName, visible); | 68 generator.addAxisSeries(series, axisName, visible); |
65 return; | 69 return; |
66 } | 70 } |
67 | 71 |
68 // Handle WKms data. | 72 // Handle WKms data. |
69 WKms wkms = (WKms) data; | 73 WKms wkms = (WKms) data; |
70 | 74 |
71 if (bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C)) { | 75 if ( |
76 bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C) | |
77 ) { | |
72 // Add corrected values | 78 // Add corrected values |
73 WQCKms wqckms = (WQCKms) data; | 79 WQCKms wqckms = (WQCKms) data; |
74 int size = wqckms.size(); | 80 int size = wqckms.size(); |
75 for (int i = 0; i < size; i++) { | 81 for (int i = 0; i < size; i++) { |
76 series.add(wqckms.getKm(i), wqckms.getC(i), false); | 82 series.add(wqckms.getKm(i), wqckms.getC(i), false); |
88 XYSeries seriesUp = new StyledXYSeries( | 94 XYSeries seriesUp = new StyledXYSeries( |
89 bundle.getFacetDescription()+"+/-"+bandWidth, false, theme); | 95 bundle.getFacetDescription()+"+/-"+bandWidth, false, theme); |
90 StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth); | 96 StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth); |
91 StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth); | 97 StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth); |
92 | 98 |
93 StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); | 99 StyledAreaSeriesCollection area = |
100 new StyledAreaSeriesCollection(theme); | |
94 area.addSeries(seriesUp); | 101 area.addSeries(seriesUp); |
95 area.addSeries(seriesDown); | 102 area.addSeries(seriesDown); |
96 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); | 103 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); |
97 generator.addAreaSeries(area, axisName, visible); | 104 generator.addAreaSeries(area, axisName, visible); |
98 } | 105 } |
99 | 106 |
100 if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W) || | 107 if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W) |
101 bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_W) || | 108 || bundle.getFacetName().equals( |
102 bundle.getFacetName().equals(FacetTypes.STATIC_WQKMS_W) || | 109 FacetTypes.DISCHARGE_LONGITUDINAL_W) |
103 bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C)) { | 110 || bundle.getFacetName().equals( |
111 FacetTypes.STATIC_WQKMS_W) | |
112 || bundle.getFacetName().equals( | |
113 FacetTypes.DISCHARGE_LONGITUDINAL_C)) { | |
104 /* Only use W values to check if the diagram should be inverted | 114 /* Only use W values to check if the diagram should be inverted |
105 * see flys/issue1290 for details */ | 115 * see flys/issue1290 for details */ |
106 log.debug("Check for RTL data: "+ wkms.guessRTLData()); | 116 log.debug("Check for RTL data: "+ wkms.guessRTLData()); |
107 generator.setInverted(wkms.guessRTLData()); | 117 generator.setInverted(wkms.guessRTLData()); |
108 } | 118 } |
118 { | 128 { |
119 log.debug("doOut"); | 129 log.debug("doOut"); |
120 | 130 |
121 CallContext context = generator.getCallContext(); | 131 CallContext context = generator.getCallContext(); |
122 | 132 |
123 XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); | 133 XYSeries series = new StyledXYSeries( |
134 bundle.getFacetDescription(), theme); | |
124 | 135 |
125 WKms wkms = (WKms) bundle.getData(context); | 136 WKms wkms = (WKms) bundle.getData(context); |
126 | 137 |
127 StyledSeriesBuilder.addPoints(series, wkms); | 138 StyledSeriesBuilder.addPoints(series, wkms); |
128 generator.addAxisSeries(series, index, visible); | 139 generator.addAxisSeries(series, index, visible); |
135 XYSeries seriesUp = new StyledXYSeries( | 146 XYSeries seriesUp = new StyledXYSeries( |
136 bundle.getFacetDescription()+"+/-"+bandWidth, false, theme); | 147 bundle.getFacetDescription()+"+/-"+bandWidth, false, theme); |
137 StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth); | 148 StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth); |
138 StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth); | 149 StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth); |
139 | 150 |
140 StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); | 151 StyledAreaSeriesCollection area = |
152 new StyledAreaSeriesCollection(theme); | |
141 area.addSeries(seriesUp); | 153 area.addSeries(seriesUp); |
142 area.addSeries(seriesDown); | 154 area.addSeries(seriesDown); |
143 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); | 155 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN); |
144 generator.addAreaSeries(area, index, visible); | 156 generator.addAreaSeries(area, index, visible); |
145 } | 157 } |
146 | 158 |
147 if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W) || | 159 if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W) |
148 bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_W) || | 160 || bundle.getFacetName().equals( |
149 bundle.getFacetName().equals(FacetTypes.STATIC_WQKMS_W)) { | 161 FacetTypes.DISCHARGE_LONGITUDINAL_W) |
162 || bundle.getFacetName().equals( | |
163 FacetTypes.STATIC_WQKMS_W)) { | |
150 /* Only use W values to check if the diagram should be inverted | 164 /* Only use W values to check if the diagram should be inverted |
151 * see flys/issue1290 for details */ | 165 * see flys/issue1290 for details */ |
152 generator.setInverted(wkms.guessRTLData()); | 166 generator.setInverted(wkms.guessRTLData()); |
153 } | 167 } |
154 } | 168 } |