Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java @ 9202:b4402594213b
More work on calculations and output for S-Info flood duration workflow (chart types 1 and 2)
author | mschaefer |
---|---|
date | Mon, 02 Jul 2018 07:33:53 +0200 |
parents | a4121ec450d6 |
children | 3dae6b78e1da |
comparison
equal
deleted
inserted
replaced
9201:491e1a434457 | 9202:b4402594213b |
---|---|
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.common.FloodDurationProcessor; | 24 import org.dive4elements.river.artifacts.sinfo.common.FloodDurationProcessor; |
25 import org.dive4elements.river.artifacts.sinfo.common.FloodHeightProcessor; | |
25 import org.dive4elements.river.artifacts.states.DefaultState; | 26 import org.dive4elements.river.artifacts.states.DefaultState; |
26 | 27 |
27 /** | 28 /** |
28 * Last state of the S-Info flood duration workflow that calculates and outputs the result | 29 * Last state of the S-Info flood duration workflow that calculates and outputs the result |
29 */ | 30 */ |
77 final List<FloodDurationCalculationResult> resultList = results.getResults(); | 78 final List<FloodDurationCalculationResult> resultList = results.getResults(); |
78 int index = 0; | 79 int index = 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, index)); | 82 facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, index)); |
82 facets.add(FloodDurationProcessor.createMainValueDurationFacet(context, hash, this.id, result, index)); | 83 for (int j = 0; j <= 2; j++) { |
84 if (result.getMainValueLabel(j) != null) | |
85 facets.add(FloodDurationProcessor.createMainValueDurationFacet(context, hash, this.id, result, j)); | |
86 } | |
87 facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, index)); | |
88 for (int j = 0; j <= 2; j++) { | |
89 if (result.getMainValueLabel(j) != null) | |
90 facets.add(FloodHeightProcessor.createMainValueHeightFacet(context, hash, this.id, result, j)); | |
91 } | |
83 | 92 |
84 facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id)); | 93 facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id)); |
85 facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id)); | 94 facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id)); |
86 | 95 |
87 index++; | 96 index++; |