Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java @ 9229:0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
author | mschaefer |
---|---|
date | Thu, 05 Jul 2018 16:49:42 +0200 |
parents | 0fc9c82e744e |
children | c2a0028bfa9f |
comparison
equal
deleted
inserted
replaced
9228:dba14da43f23 | 9229:0dcd1cd41915 |
---|---|
19 import org.dive4elements.river.artifacts.model.DataFacet; | 19 import org.dive4elements.river.artifacts.model.DataFacet; |
20 import org.dive4elements.river.artifacts.model.EmptyFacet; | 20 import org.dive4elements.river.artifacts.model.EmptyFacet; |
21 import org.dive4elements.river.artifacts.model.FacetTypes; | 21 import org.dive4elements.river.artifacts.model.FacetTypes; |
22 import org.dive4elements.river.artifacts.model.ReportFacet; | 22 import org.dive4elements.river.artifacts.model.ReportFacet; |
23 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | 23 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; |
24 import org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice.RiversideChoiceKey; | |
24 import org.dive4elements.river.artifacts.states.DefaultState; | 25 import org.dive4elements.river.artifacts.states.DefaultState; |
25 | 26 |
26 /** | 27 /** |
27 * Last state of the S-Info flood duration workflow that calculates and outputs the result | 28 * Last state of the S-Info flood duration workflow that calculates and outputs the result |
28 */ | 29 */ |
76 final List<FloodDurationCalculationResult> resultList = results.getResults(); | 77 final List<FloodDurationCalculationResult> resultList = results.getResults(); |
77 int resultIndex = 0; | 78 int resultIndex = 0; |
78 int themeCount = 0; | 79 int themeCount = 0; |
79 for (final FloodDurationCalculationResult result : resultList) { | 80 for (final FloodDurationCalculationResult result : resultList) { |
80 | 81 |
81 facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, resultIndex)); | 82 final FloodDurationAccess access = new FloodDurationAccess(sinfo); |
83 if ((access.getRiverside() == RiversideChoiceKey.LEFT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) | |
84 facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, 0, resultIndex)); | |
85 if ((access.getRiverside() == RiversideChoiceKey.RIGHT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) | |
86 facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, 1, resultIndex)); | |
82 | 87 |
83 final int waterlevelCount = result.getWaterlevelCount(); | 88 final int waterlevelCount = result.getWaterlevelCount(); |
84 | 89 |
85 facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, resultIndex)); | 90 if ((access.getRiverside() == RiversideChoiceKey.LEFT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) |
91 facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, 0, resultIndex)); | |
92 if ((access.getRiverside() == RiversideChoiceKey.RIGHT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) | |
93 facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, 1, resultIndex)); | |
86 | 94 |
87 for (int j = 0; j < waterlevelCount; j++) { | 95 for (int j = 0; j < waterlevelCount; j++) { |
88 | 96 |
89 final String waterlevelLabel = result.getMainValueLabel(j); | 97 final String waterlevelLabel = result.getMainValueLabel(j); |
90 // FIXME: use label as label for theme | 98 // FIXME: use label as label for theme |