Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesState.java @ 9506:8b7bf26b8782
Predefined artifact for standard vegetation zones.
Some minor adaptions.
author | gernotbelger |
---|---|
date | Fri, 28 Sep 2018 13:44:12 +0200 |
parents | 853f2dafc16e |
children |
comparison
equal
deleted
inserted
replaced
9505:3f230fe8eb19 | 9506:8b7bf26b8782 |
---|---|
19 import org.dive4elements.river.artifacts.model.CalculationResult; | 19 import org.dive4elements.river.artifacts.model.CalculationResult; |
20 import org.dive4elements.river.artifacts.model.DataFacet; | 20 import org.dive4elements.river.artifacts.model.DataFacet; |
21 import org.dive4elements.river.artifacts.model.EmptyFacet; | 21 import org.dive4elements.river.artifacts.model.EmptyFacet; |
22 import org.dive4elements.river.artifacts.model.FacetTypes; | 22 import org.dive4elements.river.artifacts.model.FacetTypes; |
23 import org.dive4elements.river.artifacts.model.ReportFacet; | 23 import org.dive4elements.river.artifacts.model.ReportFacet; |
24 import org.dive4elements.river.artifacts.resources.Resources; | |
24 import org.dive4elements.river.artifacts.states.DefaultState; | 25 import org.dive4elements.river.artifacts.states.DefaultState; |
25 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; | 26 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; |
26 | 27 |
27 /** | 28 /** |
28 * @author Domenico Nardi Tironi | 29 * @author Domenico Nardi Tironi |
31 | 32 |
32 /// ** The log that is used in this state. */ | 33 /// ** The log that is used in this state. */ |
33 // private static Logger log = Logger.getLogger(FlowDepthState.class); | 34 // private static Logger log = Logger.getLogger(FlowDepthState.class); |
34 | 35 |
35 private static final long serialVersionUID = 1L; | 36 private static final long serialVersionUID = 1L; |
37 | |
38 private static final String FACET_VEGETATION_ZONES_CROSS_SECTION_DESCRIPTION = "uinfo_facet_vegetation_zones_cross_section.description"; | |
36 | 39 |
37 /** | 40 /** |
38 * From this state can only be continued trivially. | 41 * From this state can only be continued trivially. |
39 */ | 42 */ |
40 @Override | 43 @Override |
78 | 81 |
79 final List<VegetationZonesCalculationResult> resultList = results.getResults(); | 82 final List<VegetationZonesCalculationResult> resultList = results.getResults(); |
80 | 83 |
81 if (!resultList.isEmpty()) { | 84 if (!resultList.isEmpty()) { |
82 | 85 |
83 facets.add(VegetationZonesCrossSectionProcessor.createVegetationZonesCrossSectionFacet(context, hash, this.id, resultList.get(0), 0)); | 86 final String label = resultList.get(0).getLabel(); |
87 final String facetDescription = Resources.getMsg(context.getMeta(), FACET_VEGETATION_ZONES_CROSS_SECTION_DESCRIPTION, new Object[] { label }); | |
88 | |
89 facets.add(VegetationZonesCrossSectionProcessor.createVegetationZonesCrossSectionFacet(facetDescription)); | |
84 | 90 |
85 final Facet csv = 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); |
86 final Facet pdf = 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); |
87 | 93 |
88 facets.add(csv); | 94 facets.add(csv); |