Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineProcessor.java Wed Aug 01 17:13:52 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineProcessor.java Wed Aug 01 18:01:11 2018 +0200 @@ -79,31 +79,20 @@ // log.debug("Processing facet: " + bundle.getFacetName()); final CallContext context = generator.getContext(); - final Object data = bundle.getData(context); + final SalixLineCalculationResult data = (SalixLineCalculationResult) bundle.getData(context); if (bundle.getFacetName().equals(FACET_SALIX_LINE)) { return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salixline, GAP_DISTANCE); } if (bundle.getFacetName().equals(FACET_SALIX_MNWMW)) { - return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salix_delta_mw, GAP_DISTANCE); + return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salix_mw_mnw, GAP_DISTANCE); } if (bundle.getFacetName().equals(FACET_SALIX_SCENARIO)) { - // TODO Differenzieren, Scenario 1 bis max. 5 bei Regional - - // FIXME: warum so unterscheiden? bei den anderen beiden szenarien einfach nur ein szenario-ergebnis in die liste - // packen! - - if (data instanceof SalixLineCalculationRegionalResult) { - - final int dataIndex = ((SalixScenarioResultFacet) bundle.getFacet()).getDataIndex(); - - final double[][] scenarioPoints = ((SalixLineCalculationRegionalResult) data).getScenarioPoints(dataIndex); - return buildSeriesForPoints(scenarioPoints, generator, bundle, theme, visible, GAP_DISTANCE); - - } else - return buildSeriesForType(generator, bundle, theme, visible, UInfoResultType.salix_line_scenario, GAP_DISTANCE); + final int dataIndex = ((SalixScenarioResultFacet) bundle.getFacet()).getDataIndex(); + final double[][] scenarioPoints = data.getScenarioPoints(dataIndex); + return buildSeriesForPoints(scenarioPoints, generator, bundle, theme, visible, GAP_DISTANCE); } throw new UnsupportedOperationException();