comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationState.java @ 9150:23945061daec

gigantic refactoring: exporter, result, results to support multiple jaspers -> collisions
author gernotbelger
date Thu, 14 Jun 2018 16:56:31 +0200
parents fb9430250899
children 2f5052835b76
comparison
equal deleted inserted replaced
9149:5be112fba832 9150:23945061daec
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde 1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
2 * Software engineering by 2 * Software engineering by
3 * Björnsen Beratende Ingenieure GmbH 3 * Björnsen Beratende Ingenieure GmbH
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt 4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
5 * 5 *
6 * This file is Free Software under the GNU AGPL (>=v3) 6 * This file is Free Software under the GNU AGPL (>=v3)
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the 7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
8 * documentation coming with Dive4Elements River for details. 8 * documentation coming with Dive4Elements River for details.
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.common.AbstractCalculationExportableResult;
18 import org.dive4elements.river.artifacts.model.Calculation; 19 import org.dive4elements.river.artifacts.model.Calculation;
19 import org.dive4elements.river.artifacts.model.CalculationResult; 20 import org.dive4elements.river.artifacts.model.CalculationResult;
20 import org.dive4elements.river.artifacts.model.DataFacet; 21 import org.dive4elements.river.artifacts.model.DataFacet;
21 import org.dive4elements.river.artifacts.model.EmptyFacet; 22 import org.dive4elements.river.artifacts.model.EmptyFacet;
22 import org.dive4elements.river.artifacts.model.FacetTypes; 23 import org.dive4elements.river.artifacts.model.FacetTypes;
75 if (facets == null) 76 if (facets == null)
76 return res; 77 return res;
77 78
78 final InundationDurationCalculationResults results = (InundationDurationCalculationResults) res.getData(); 79 final InundationDurationCalculationResults results = (InundationDurationCalculationResults) res.getData();
79 80
80 List<InundationDurationCalculationResult> resultList = results.getResults(); 81 final List<AbstractCalculationExportableResult<InundationDurationCalculationResults>> resultList = results.getResults();
81 82
82 if (!resultList.isEmpty()) { 83 if (!resultList.isEmpty()) {
83 final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id); 84 final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id);
84 final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id); 85 final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id);
85 86

http://dive4elements.wald.intevation.org