Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionState.java @ 9617:1d4262a68f1f
#12 Minuend/Subtrahend + MergeConflict #19 CollisionCalculation
author | dnt_bjoernsen <d.tironi@bjoernsen.de> |
---|---|
date | Thu, 10 Oct 2019 15:29:02 +0200 |
parents | 504f63512379 |
children |
comparison
equal
deleted
inserted
replaced
9616:cedcee24a21a | 9617:1d4262a68f1f |
---|---|
76 // | 76 // |
77 final CollisionCalculationResults results = (CollisionCalculationResults) res.getData(); | 77 final CollisionCalculationResults results = (CollisionCalculationResults) res.getData(); |
78 | 78 |
79 /* add themes for chart, for each result */ | 79 /* add themes for chart, for each result */ |
80 final List<AbstractCalculationExportableResult> resultList = results.getResults(); | 80 final List<AbstractCalculationExportableResult> resultList = results.getResults(); |
81 | |
81 int themeCount = 0; | 82 int themeCount = 0; |
83 | |
82 for (int index = 0; index < resultList.size(); index++) { | 84 for (int index = 0; index < resultList.size(); index++) { |
83 if (resultList.get(index) instanceof CollisionCalcOverviewResult) { | 85 if (resultList.get(index) instanceof CollisionCalcOverviewResult) { |
84 final CollisionCalcOverviewResult result = (CollisionCalcOverviewResult) resultList.get(index); | 86 final CollisionCalcOverviewResult result = (CollisionCalcOverviewResult) resultList.get(index); |
85 for (final DateRange dr : result.getYears()) | 87 |
86 facets.add(CollisionCalcProcessor.createFacet(context, hash, this.id, result, index, dr.getFromYear(), themeCount++)); | 88 final List<DateRange> yearRanges = result.getYears(); |
89 for (int rangeIndex = 0; rangeIndex < yearRanges.size(); rangeIndex++) { | |
90 final DateRange dr = yearRanges.get(rangeIndex); | |
91 facets.add(CollisionCalcProcessor.createFacet(context, hash, this.id, result, index, themeCount++, rangeIndex)); | |
92 } | |
87 } | 93 } |
88 } | 94 } |
89 | 95 |
90 if (!resultList.isEmpty()) { | 96 if (!resultList.isEmpty()) { |
91 final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); | 97 final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); |