Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java @ 9145:e6b63b2b41b9
sinfo.flood_duration pdf, csv, ui
author | gernotbelger |
---|---|
date | Tue, 12 Jun 2018 10:23:23 +0200 |
parents | 2ed3824a3d53 |
children | 23945061daec |
comparison
equal
deleted
inserted
replaced
9144:7879c2ca8bd3 | 9145:e6b63b2b41b9 |
---|---|
13 import org.dive4elements.artifactdatabase.state.Facet; | 13 import org.dive4elements.artifactdatabase.state.Facet; |
14 import org.dive4elements.artifacts.CallContext; | 14 import org.dive4elements.artifacts.CallContext; |
15 import org.dive4elements.river.artifacts.ChartArtifact; | 15 import org.dive4elements.river.artifacts.ChartArtifact; |
16 import org.dive4elements.river.artifacts.D4EArtifact; | 16 import org.dive4elements.river.artifacts.D4EArtifact; |
17 import org.dive4elements.river.artifacts.model.CalculationResult; | 17 import org.dive4elements.river.artifacts.model.CalculationResult; |
18 import org.dive4elements.river.artifacts.model.DataFacet; | |
18 import org.dive4elements.river.artifacts.model.EmptyFacet; | 19 import org.dive4elements.river.artifacts.model.EmptyFacet; |
20 import org.dive4elements.river.artifacts.model.FacetTypes; | |
19 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | 21 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; |
20 import org.dive4elements.river.artifacts.states.DefaultState; | 22 import org.dive4elements.river.artifacts.states.DefaultState; |
21 | 23 |
22 /** State in which a waterlevel has been calculated. */ | 24 /** State in which a waterlevel has been calculated. */ |
23 public class FloodDurationState extends DefaultState { | 25 public class FloodDurationState extends DefaultState { |
64 | 66 |
65 final CalculationResult res = doCompute(sinfo, context, old); | 67 final CalculationResult res = doCompute(sinfo, context, old); |
66 | 68 |
67 if (facets == null) | 69 if (facets == null) |
68 return res; | 70 return res; |
69 // | |
70 // final FlowDepthCalculationResults results = (FlowDepthCalculationResults) res.getData(); | |
71 // | |
72 // /* add themes for chart, for each result */ | |
73 // final List<FlowDepthCalculationResult> resultList = results.getResults(); | |
74 // for (int index = 0; index < resultList.size(); index++) { | |
75 // | |
76 // final FlowDepthCalculationResult result = resultList.get(index); | |
77 // | |
78 // /* filtered (zoom dependent mean) flow depth */ | |
79 // facets.add(FlowDepthProcessor.createFlowDepthFilteredFacet(context, hash, this.id, result, index)); | |
80 // facets.add(FlowDepthProcessor.createFlowDepthRawFacet(context, hash, this.id, result, index)); | |
81 // | |
82 // if (results.isUseTkh()) { | |
83 // /* filtered (zoom dependent mean) flow depth including tkh */ | |
84 // facets.add(FlowDepthProcessor.createFlowDepthTkhFilteredFacet(context, hash, this.id, result, index)); | |
85 // facets.add(FlowDepthProcessor.createFlowDepthTkhRawFacet(context, hash, this.id, result, index)); | |
86 // | |
87 // facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index)); | |
88 // } | |
89 // } | |
90 | 71 |
91 // if (!resultList.isEmpty()) { | 72 final FloodDurationCalculationResults results = (FloodDurationCalculationResults) res.getData(); |
92 // final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); | 73 |
93 // final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id); | 74 /* add themes for chart, for each result */ |
94 // | 75 final List<FloodDurationCalculationResult> resultList = results.getResults(); |
95 // facets.add(csv); | 76 for (int index = 0; index < resultList.size(); index++) { |
96 // facets.add(pdf); | 77 |
97 // } | 78 final FloodDurationCalculationResult result = resultList.get(index); |
98 // | 79 |
80 /* filtered (zoom dependent mean) flow depth TODO: */ | |
81 // facets.add(FloodDurationProcessor.createFlowDepthFilteredFacet(context, hash, this.id, result, index)); | |
82 // facets.add(FloodDurationProcessor.createFlowDepthRawFacet(context, hash, this.id, result, index)); | |
83 | |
84 } | |
85 | |
86 if (!resultList.isEmpty()) { | |
87 final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); | |
88 final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id); | |
89 | |
90 facets.add(csv); | |
91 facets.add(pdf); | |
92 } | |
93 | |
99 // final Calculation report = res.getReport(); | 94 // final Calculation report = res.getReport(); |
100 // | 95 // |
101 // if (report.hasProblems()) { | 96 // if (report.hasProblems()) { |
102 // facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id)); | 97 // facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id)); |
103 // } | 98 // } |