Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthdev/FlowDepthDevelopmentState.java @ 8953:c40db8e8dcae
SINFO - Flow depth development - implemented exporters
author | gernotbelger |
---|---|
date | Mon, 19 Mar 2018 14:01:21 +0100 |
parents | 322b0e6298ea |
children | ee5ce13016ed |
comparison
equal
deleted
inserted
replaced
8952:1a8f19f3b776 | 8953:c40db8e8dcae |
---|---|
13 | 13 |
14 import org.dive4elements.artifactdatabase.state.Facet; | 14 import org.dive4elements.artifactdatabase.state.Facet; |
15 import org.dive4elements.artifacts.CallContext; | 15 import org.dive4elements.artifacts.CallContext; |
16 import org.dive4elements.river.artifacts.ChartArtifact; | 16 import org.dive4elements.river.artifacts.ChartArtifact; |
17 import org.dive4elements.river.artifacts.D4EArtifact; | 17 import org.dive4elements.river.artifacts.D4EArtifact; |
18 import org.dive4elements.river.artifacts.model.Calculation; | |
18 import org.dive4elements.river.artifacts.model.CalculationResult; | 19 import org.dive4elements.river.artifacts.model.CalculationResult; |
20 import org.dive4elements.river.artifacts.model.DataFacet; | |
19 import org.dive4elements.river.artifacts.model.EmptyFacet; | 21 import org.dive4elements.river.artifacts.model.EmptyFacet; |
22 import org.dive4elements.river.artifacts.model.FacetTypes; | |
23 import org.dive4elements.river.artifacts.model.ReportFacet; | |
20 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | 24 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; |
21 import org.dive4elements.river.artifacts.states.DefaultState; | 25 import org.dive4elements.river.artifacts.states.DefaultState; |
22 | 26 |
23 /** | 27 /** |
24 * @author Gernot Belger | 28 * @author Gernot Belger |
66 final CalculationResult res = doCompute(sinfo, context, old); | 70 final CalculationResult res = doCompute(sinfo, context, old); |
67 | 71 |
68 if (facets == null) | 72 if (facets == null) |
69 return res; | 73 return res; |
70 | 74 |
71 // final FlowDepthCalculationResults results = (FlowDepthCalculationResults) res.getData(); | 75 final FlowDepthDevelopmentCalculationResults results = (FlowDepthDevelopmentCalculationResults) res.getData(); |
72 // | 76 final FlowDepthDevelopmentCalculationResult result = results.getResult(); |
77 if (result == null) | |
78 return res; | |
79 | |
73 // /* add themes for chart, for each result */ | 80 // /* add themes for chart, for each result */ |
74 // final List<FlowDepthCalculationResult> resultList = results.getResults(); | 81 // final List<FlowDepthCalculationResult> resultList = results.getResults(); |
75 // for (int index = 0; index < resultList.size(); index++) { | 82 // for (int index = 0; index < resultList.size(); index++) { |
76 // | 83 // |
77 // final FlowDepthCalculationResult result = resultList.get(index); | 84 // final FlowDepthCalculationResult result = resultList.get(index); |
84 // facets.add(FlowDepthProcessor.createFlowDepthTkhFacet(context, hash, this.id, result, index)); | 91 // facets.add(FlowDepthProcessor.createFlowDepthTkhFacet(context, hash, this.id, result, index)); |
85 // | 92 // |
86 // facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index)); | 93 // facets.add(TkhProcessor.createTkhFacet(context, hash, this.id, result, index)); |
87 // } | 94 // } |
88 // } | 95 // } |
89 // | 96 |
90 // if (!resultList.isEmpty()) { | 97 facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id)); |
91 // final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); | 98 facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id)); |
92 // final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id); | 99 |
93 // | 100 final Calculation report = res.getReport(); |
94 // facets.add(csv); | 101 if (report.hasProblems()) |
95 // facets.add(pdf); | 102 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id)); |
96 // } | |
97 // | |
98 // final Calculation report = res.getReport(); | |
99 // | |
100 // if (report.hasProblems()) { | |
101 // facets.add(new ReportFacet(ComputeType.ADVANCE, hash, this.id)); | |
102 // } | |
103 | 103 |
104 return res; | 104 return res; |
105 } | 105 } |
106 | 106 |
107 private CalculationResult doCompute(final SINFOArtifact sinfo, final CallContext context, final Object old) { | 107 private CalculationResult doCompute(final SINFOArtifact sinfo, final CallContext context, final Object old) { |