comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java @ 8980:b194fa64506a

SINFO - show results themes according to spec, either raw data or floating mean values. Some improvements to error handling and handling of empty results.
author gernotbelger
date Thu, 05 Apr 2018 18:30:34 +0200
parents ee5ce13016ed
children 3828c7d820ef
comparison
equal deleted inserted replaced
8979:951a4af24a09 8980:b194fa64506a
75 if (facets == null) 75 if (facets == null)
76 return res; 76 return res;
77 77
78 final FlowDepthDevelopmentCalculationResults results = (FlowDepthDevelopmentCalculationResults) res.getData(); 78 final FlowDepthDevelopmentCalculationResults results = (FlowDepthDevelopmentCalculationResults) res.getData();
79 final FlowDepthDevelopmentCalculationResult result = results.getResult(); 79 final FlowDepthDevelopmentCalculationResult result = results.getResult();
80 if (result == null) 80 if (result != null) {
81 return res; 81 /* add themes for chart, for each result */
82 final int index = 0;
82 83
83 /* add themes for chart, for each result */ 84 // /* filtered (zoom dependent mean) flow depth development */
84 final int index = 0; 85 facets.add(FlowDepthDevelopmentProcessor.createFlowDepthDevelopmentFilteredFacet(context, hash, this.id, result, index));
86 facets.add(FlowDepthDevelopmentProcessor.createFlowDepthDevelopmentRawFacet(context, hash, this.id, result, index));
85 87
86 // /* filtered (zoom dependent mean) flow depth development */ 88 facets.add(FlowDepthDevelopmentProcessor.createWaterlevelDifferenceFacet(context, hash, this.id, result, index));
87 facets.add(FlowDepthDevelopmentProcessor.createFlowDepthDevelopmentFacet(context, hash, this.id, result, index)); 89 facets.add(FlowDepthDevelopmentProcessor.createBedHeightDifferenceFacet(context, hash, this.id, result, index));
88 facets.add(FlowDepthDevelopmentProcessor.createWaterlevelDifferenceFacet(context, hash, this.id, result, index));
89 facets.add(FlowDepthDevelopmentProcessor.createBedHeightDifferenceFacet(context, hash, this.id, result, index));
90 90
91 facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentFacet(context, hash, this.id, result, index)); 91 facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentFilteredFacet(context, hash, this.id, result, index));
92 facets.add(FlowDepthDevelopmentPerYearProcessor.createFlowDepthDevelopmentRawFacet(context, hash, this.id, result, index));
92 93
93 facets.add(FlowDepthProcessor.createFlowDepthCurrentFacet(context, hash, this.id, result, index)); 94 facets.add(FlowDepthProcessor.createFlowDepthCurrentFilteredFacet(context, hash, this.id, result, index));
94 facets.add(FlowDepthProcessor.createFlowDepthHistoricalFacet(context, hash, this.id, result, index)); 95 facets.add(FlowDepthProcessor.createFlowDepthCurrentRawFacet(context, hash, this.id, result, index));
96 facets.add(FlowDepthProcessor.createFlowDepthHistoricalFilteredFacet(context, hash, this.id, result, index));
97 facets.add(FlowDepthProcessor.createFlowDepthHistoricalRawFacet(context, hash, this.id, result, index));
95 98
96 facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id)); 99 facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id));
97 facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id)); 100 facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id));
101 }
98 102
99 final Calculation report = res.getReport(); 103 final Calculation report = res.getReport();
100 if (report.hasProblems()) 104 if (report.hasProblems())
101 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id)); 105 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id));
102 106

http://dive4elements.wald.intevation.org