Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java @ 9617:1d4262a68f1f
#12 Minuend/Subtrahend + MergeConflict #19 CollisionCalculation
author | dnt_bjoernsen <d.tironi@bjoernsen.de> |
---|---|
date | Thu, 10 Oct 2019 15:29:02 +0200 |
parents | 08f46ccd37ba |
children |
comparison
equal
deleted
inserted
replaced
9616:cedcee24a21a | 9617:1d4262a68f1f |
---|---|
14 import java.util.Set; | 14 import java.util.Set; |
15 | 15 |
16 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; | 16 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; |
17 import org.dive4elements.artifactdatabase.state.Facet; | 17 import org.dive4elements.artifactdatabase.state.Facet; |
18 import org.dive4elements.artifacts.CallContext; | 18 import org.dive4elements.artifacts.CallContext; |
19 import org.dive4elements.artifacts.CallMeta; | |
19 import org.dive4elements.river.artifacts.common.AbstractCalculationResult; | 20 import org.dive4elements.river.artifacts.common.AbstractCalculationResult; |
20 import org.dive4elements.river.artifacts.common.AbstractProcessor; | 21 import org.dive4elements.river.artifacts.common.AbstractProcessor; |
22 import org.dive4elements.river.artifacts.resources.Resources; | |
21 import org.dive4elements.river.exports.DiagramGenerator; | 23 import org.dive4elements.river.exports.DiagramGenerator; |
22 import org.dive4elements.river.themes.ThemeDocument; | 24 import org.dive4elements.river.themes.ThemeDocument; |
23 | 25 |
24 public final class FlowDepthProcessor extends AbstractProcessor { | 26 public final class FlowDepthProcessor extends AbstractProcessor { |
25 | 27 |
30 /* Theme name, usually defined in 'FacetTypes', but that is soooo bad dependencies... */ | 32 /* Theme name, usually defined in 'FacetTypes', but that is soooo bad dependencies... */ |
31 // REMARK: these mustend with 'filtered' so extra handling happens in chart: point are always recalculated, because data | 33 // REMARK: these mustend with 'filtered' so extra handling happens in chart: point are always recalculated, because data |
32 // changes depending on zoom state | 34 // changes depending on zoom state |
33 | 35 |
34 /* flow depth */ | 36 /* flow depth */ |
37 | |
35 public static final String FACET_FLOW_DEPTH_FILTERED = "sinfo_facet_flow_depth.filtered"; | 38 public static final String FACET_FLOW_DEPTH_FILTERED = "sinfo_facet_flow_depth.filtered"; |
36 | 39 |
37 private static final String FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description"; | 40 private static final String FACET_FLOW_DEPTH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth.filtered.description"; |
38 | 41 |
39 public static final String FACET_FLOW_DEPTH_RAW = "sinfo_facet_flow_depth"; | 42 public static final String FACET_FLOW_DEPTH_RAW = "sinfo_facet_flow_depth"; |
142 throw new UnsupportedOperationException(error); | 145 throw new UnsupportedOperationException(error); |
143 } | 146 } |
144 | 147 |
145 public static Facet createFlowDepthFilteredFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result, | 148 public static Facet createFlowDepthFilteredFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result, |
146 final int index) { | 149 final int index) { |
147 return AbstractProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_FILTERED, | 150 final CallMeta meta = context.getMeta(); |
148 FACET_FLOW_DEPTH_FILTERED_DESCRIPTION); | 151 final String yAxisLabel = Resources.getMsg(meta, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL); |
152 return AbstractProcessor.createFacet(context, hash, id, result, index, yAxisLabel, FACET_FLOW_DEPTH_FILTERED, FACET_FLOW_DEPTH_FILTERED_DESCRIPTION); | |
149 } | 153 } |
150 | 154 |
151 public static Facet createFlowDepthRawFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result, | 155 public static Facet createFlowDepthRawFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result, |
152 final int index) { | 156 final int index) { |
153 return AbstractProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_RAW, | 157 final CallMeta meta = context.getMeta(); |
154 FACET_FLOW_DEPTH_RAW_DESCRIPTION); | 158 final String yAxisLabel = Resources.getMsg(meta, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL); |
159 return AbstractProcessor.createFacet(context, hash, id, result, index, yAxisLabel, FACET_FLOW_DEPTH_RAW, FACET_FLOW_DEPTH_RAW_DESCRIPTION); | |
155 } | 160 } |
156 | 161 |
157 public static Facet createFlowDepthTkhFilteredFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result, | 162 public static Facet createFlowDepthTkhFilteredFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result, |
158 final int index) { | 163 final int index) { |
159 return AbstractProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_TKH_FILTERED, | 164 return AbstractProcessor.createFacet(context, hash, id, result, index, SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, FACET_FLOW_DEPTH_TKH_FILTERED, |