Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java @ 7985:10debf4b82be facet-metadata
Split bed differences facet into data specific facets.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 01 Jul 2014 15:09:56 +0200 |
parents | 868f55932fe6 |
children | b5cba2690347 |
comparison
equal
deleted
inserted
replaced
7984:cf674b03901a | 7985:10debf4b82be |
---|---|
23 import org.dive4elements.river.artifacts.access.BedDifferencesAccess; | 23 import org.dive4elements.river.artifacts.access.BedDifferencesAccess; |
24 import org.dive4elements.river.artifacts.model.CalculationResult; | 24 import org.dive4elements.river.artifacts.model.CalculationResult; |
25 import org.dive4elements.river.artifacts.model.DataFacet; | 25 import org.dive4elements.river.artifacts.model.DataFacet; |
26 import org.dive4elements.river.artifacts.model.FacetTypes; | 26 import org.dive4elements.river.artifacts.model.FacetTypes; |
27 import org.dive4elements.river.artifacts.model.minfo.BedDiffCalculation; | 27 import org.dive4elements.river.artifacts.model.minfo.BedDiffCalculation; |
28 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearFacet; | 28 import org.dive4elements.river.artifacts.model.minfo.BedDiffFacet; |
29 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearFilterFacet; | 29 import org.dive4elements.river.artifacts.model.minfo.BedDiffHeightMinFacet; |
30 import org.dive4elements.river.artifacts.model.minfo.BedDiffHeightMinFilterFacet; | |
31 import org.dive4elements.river.artifacts.model.minfo.BedDiffHeightSubFacet; | |
32 import org.dive4elements.river.artifacts.model.minfo.BedDiffHeightSubFilterFacet; | |
33 import org.dive4elements.river.artifacts.model.minfo.BedDiffMorphMinFacet; | |
34 import org.dive4elements.river.artifacts.model.minfo.BedDiffMorphSubFacet; | |
35 import org.dive4elements.river.artifacts.model.minfo.BedDiffPerYearFacet; | |
36 import org.dive4elements.river.artifacts.model.minfo.BedDiffPerYearFilterFacet; | |
37 import org.dive4elements.river.artifacts.model.minfo.BedDiffSoundingWidthFacet; | |
38 import org.dive4elements.river.artifacts.model.minfo.BedDiffFilterFacet; | |
30 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearResult; | 39 import org.dive4elements.river.artifacts.model.minfo.BedDiffYearResult; |
31 import org.dive4elements.river.artifacts.model.minfo.BedDifferencesResult; | 40 import org.dive4elements.river.artifacts.model.minfo.BedDifferencesResult; |
32 import org.dive4elements.river.artifacts.resources.Resources; | 41 import org.dive4elements.river.artifacts.resources.Resources; |
33 import org.dive4elements.river.artifacts.states.DefaultState; | 42 import org.dive4elements.river.artifacts.states.DefaultState; |
34 import org.dive4elements.river.utils.Formatter; | 43 import org.dive4elements.river.utils.Formatter; |
110 | 119 |
111 newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); | 120 newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id)); |
112 newFacets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id)); | 121 newFacets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id)); |
113 for (int idx = 0; idx < results.length; idx++) { | 122 for (int idx = 0; idx < results.length; idx++) { |
114 if (results[idx] instanceof BedDiffYearResult) { | 123 if (results[idx] instanceof BedDiffYearResult) { |
115 newFacets.add(new BedDiffYearFacet( | 124 newFacets.add(new BedDiffFacet( |
116 idx, | 125 idx, |
117 BED_DIFFERENCE_YEAR, | 126 BED_DIFFERENCE_YEAR, |
118 createBedDiffYearDescription( | 127 createBedDiffYearDescription( |
119 meta, | 128 meta, |
120 (BedDiffYearResult)results[idx], | 129 (BedDiffYearResult)results[idx], |
121 true), | 130 true), |
122 ComputeType.ADVANCE, | 131 ComputeType.ADVANCE, |
123 stateId, | 132 stateId, |
124 hash)); | 133 hash)); |
125 newFacets.add(new BedDiffYearFacet( | 134 newFacets.add(new BedDiffSoundingWidthFacet( |
126 idx, | 135 idx, |
127 BED_DIFFERENCE_SOUNDING_WIDTH, | 136 BED_DIFFERENCE_SOUNDING_WIDTH, |
128 createBedDiffSoundingDescription(meta), | 137 createBedDiffSoundingDescription(meta), |
129 ComputeType.ADVANCE, | 138 ComputeType.ADVANCE, |
130 stateId, | 139 stateId, |
131 hash)); | 140 hash)); |
132 newFacets.add(new BedDiffYearFacet( | 141 newFacets.add(new BedDiffMorphMinFacet( |
133 idx, | 142 idx, |
134 BED_DIFFERENCE_MORPH_WIDTH1, | 143 BED_DIFFERENCE_MORPH_WIDTH1, |
135 createBedDiffMorph1Description(meta), | 144 createBedDiffMorph1Description(meta), |
136 ComputeType.ADVANCE, | 145 ComputeType.ADVANCE, |
137 stateId, | 146 stateId, |
138 hash)); | 147 hash)); |
139 newFacets.add(new BedDiffYearFacet( | 148 newFacets.add(new BedDiffMorphSubFacet( |
140 idx, | 149 idx, |
141 BED_DIFFERENCE_MORPH_WIDTH2, | 150 BED_DIFFERENCE_MORPH_WIDTH2, |
142 createBedDiffMorph2Description(meta), | 151 createBedDiffMorph2Description(meta), |
143 ComputeType.ADVANCE, | 152 ComputeType.ADVANCE, |
144 stateId, | 153 stateId, |
145 hash)); | 154 hash)); |
146 newFacets.add(new BedDiffYearFacet( | 155 newFacets.add(new BedDiffHeightMinFacet( |
147 idx, | 156 idx, |
148 BED_DIFFERENCE_YEAR_HEIGHT1, | 157 BED_DIFFERENCE_YEAR_HEIGHT1, |
149 createBedDiffHeightDescription( | 158 createBedDiffHeightDescription( |
150 meta, | 159 meta, |
151 (BedDiffYearResult)results[idx], | 160 (BedDiffYearResult)results[idx], |
152 0, | 161 0, |
153 true), | 162 true), |
154 ComputeType.ADVANCE, | 163 ComputeType.ADVANCE, |
155 stateId, | 164 stateId, |
156 hash)); | 165 hash)); |
157 newFacets.add(new BedDiffYearFacet( | 166 newFacets.add(new BedDiffHeightSubFacet( |
158 idx, | 167 idx, |
159 BED_DIFFERENCE_YEAR_HEIGHT2, | 168 BED_DIFFERENCE_YEAR_HEIGHT2, |
160 createBedDiffHeightDescription( | 169 createBedDiffHeightDescription( |
161 meta, | 170 meta, |
162 (BedDiffYearResult)results[idx], | 171 (BedDiffYearResult)results[idx], |
163 1, | 172 1, |
164 true), | 173 true), |
165 ComputeType.ADVANCE, | 174 ComputeType.ADVANCE, |
166 stateId, | 175 stateId, |
167 hash)); | 176 hash)); |
168 newFacets.add(new BedDiffYearFacet( | 177 newFacets.add(new BedDiffPerYearFacet( |
169 idx, | 178 idx, |
170 BED_DIFFERENCE_HEIGHT_YEAR, | 179 BED_DIFFERENCE_HEIGHT_YEAR, |
171 createBedDiffAbsoluteDescription( | 180 createBedDiffAbsoluteDescription( |
172 meta, | 181 meta, |
173 (BedDiffYearResult)results[idx], | 182 (BedDiffYearResult)results[idx], |
174 true), | 183 true), |
175 ComputeType.ADVANCE, | 184 ComputeType.ADVANCE, |
176 stateId, | 185 stateId, |
177 hash)); | 186 hash)); |
178 newFacets.add(new BedDiffYearFilterFacet( | 187 newFacets.add(new BedDiffFilterFacet( |
179 idx, | 188 idx, |
180 BED_DIFFERENCE_YEAR_FILTERED, | 189 BED_DIFFERENCE_YEAR_FILTERED, |
181 createBedDiffYearDescription( | 190 createBedDiffYearDescription( |
182 meta, | 191 meta, |
183 (BedDiffYearResult)results[idx], | 192 (BedDiffYearResult)results[idx], |
184 false), | 193 false), |
185 ComputeType.ADVANCE, | 194 ComputeType.ADVANCE, |
186 stateId, | 195 stateId, |
187 hash)); | 196 hash)); |
188 newFacets.add(new BedDiffYearFilterFacet( | 197 newFacets.add(new BedDiffHeightMinFilterFacet( |
189 idx, | 198 idx, |
190 BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED, | 199 BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED, |
191 createBedDiffHeightDescription( | 200 createBedDiffHeightDescription( |
192 meta, | 201 meta, |
193 (BedDiffYearResult)results[idx], | 202 (BedDiffYearResult)results[idx], |
194 0, | 203 0, |
195 false), | 204 false), |
196 ComputeType.ADVANCE, | 205 ComputeType.ADVANCE, |
197 stateId, | 206 stateId, |
198 hash)); | 207 hash)); |
199 newFacets.add(new BedDiffYearFilterFacet( | 208 newFacets.add(new BedDiffHeightSubFilterFacet( |
200 idx, | 209 idx, |
201 BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED, | 210 BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED, |
202 createBedDiffHeightDescription( | 211 createBedDiffHeightDescription( |
203 meta, | 212 meta, |
204 (BedDiffYearResult)results[idx], | 213 (BedDiffYearResult)results[idx], |
205 1, | 214 1, |
206 false), | 215 false), |
207 ComputeType.ADVANCE, | 216 ComputeType.ADVANCE, |
208 stateId, | 217 stateId, |
209 hash)); | 218 hash)); |
210 newFacets.add(new BedDiffYearFilterFacet( | 219 newFacets.add(new BedDiffPerYearFilterFacet( |
211 idx, | 220 idx, |
212 BED_DIFFERENCE_HEIGHT_YEAR_FILTERED, | 221 BED_DIFFERENCE_HEIGHT_YEAR_FILTERED, |
213 createBedDiffAbsoluteDescription( | 222 createBedDiffAbsoluteDescription( |
214 meta, | 223 meta, |
215 (BedDiffYearResult)results[idx], | 224 (BedDiffYearResult)results[idx], |