Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineProcessor.java @ 9361:2aec052d4088
Refactoring on SalixLineCalculationResult etc., calculation using MQ etc., scenario (regional+supra) csv columns and meta data added
author | mschaefer |
---|---|
date | Wed, 01 Aug 2018 18:01:11 +0200 |
parents | 08f46ccd37ba |
children | 6f7e92c16050 |
comparison
equal
deleted
inserted
replaced
9360:ddcd52d239cd | 9361:2aec052d4088 |
---|---|
77 @Override | 77 @Override |
78 protected String generateSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible) { | 78 protected String generateSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible) { |
79 | 79 |
80 // log.debug("Processing facet: " + bundle.getFacetName()); | 80 // log.debug("Processing facet: " + bundle.getFacetName()); |
81 final CallContext context = generator.getContext(); | 81 final CallContext context = generator.getContext(); |
82 final Object data = bundle.getData(context); | 82 final SalixLineCalculationResult data = (SalixLineCalculationResult) bundle.getData(context); |
83 | 83 |
84 if (bundle.getFacetName().equals(FACET_SALIX_LINE)) { | 84 if (bundle.getFacetName().equals(FACET_SALIX_LINE)) { |
85 return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salixline, GAP_DISTANCE); | 85 return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salixline, GAP_DISTANCE); |
86 } | 86 } |
87 | 87 |
88 if (bundle.getFacetName().equals(FACET_SALIX_MNWMW)) { | 88 if (bundle.getFacetName().equals(FACET_SALIX_MNWMW)) { |
89 return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salix_delta_mw, GAP_DISTANCE); | 89 return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salix_mw_mnw, GAP_DISTANCE); |
90 } | 90 } |
91 | 91 |
92 if (bundle.getFacetName().equals(FACET_SALIX_SCENARIO)) { | 92 if (bundle.getFacetName().equals(FACET_SALIX_SCENARIO)) { |
93 // TODO Differenzieren, Scenario 1 bis max. 5 bei Regional | 93 final int dataIndex = ((SalixScenarioResultFacet) bundle.getFacet()).getDataIndex(); |
94 | 94 final double[][] scenarioPoints = data.getScenarioPoints(dataIndex); |
95 // FIXME: warum so unterscheiden? bei den anderen beiden szenarien einfach nur ein szenario-ergebnis in die liste | 95 return buildSeriesForPoints(scenarioPoints, generator, bundle, theme, visible, GAP_DISTANCE); |
96 // packen! | |
97 | |
98 if (data instanceof SalixLineCalculationRegionalResult) { | |
99 | |
100 final int dataIndex = ((SalixScenarioResultFacet) bundle.getFacet()).getDataIndex(); | |
101 | |
102 final double[][] scenarioPoints = ((SalixLineCalculationRegionalResult) data).getScenarioPoints(dataIndex); | |
103 return buildSeriesForPoints(scenarioPoints, generator, bundle, theme, visible, GAP_DISTANCE); | |
104 | |
105 } else | |
106 return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salix_line_scenario, GAP_DISTANCE); | |
107 } | 96 } |
108 | 97 |
109 throw new UnsupportedOperationException(); | 98 throw new UnsupportedOperationException(); |
110 } | 99 } |
111 } | 100 } |