Mercurial > dive4elements > river
changeset 7163:704a33c0f5a2
Handle flow velocity discharge in the new part of the QOutProcessor
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 26 Sep 2013 10:39:01 +0200 |
parents | 4683bdf77ff9 |
children | 440c55b9634e |
files | artifacts/src/main/java/org/dive4elements/river/exports/process/QOutProcessor.java |
diffstat | 1 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/QOutProcessor.java Thu Sep 26 10:38:21 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/QOutProcessor.java Thu Sep 26 10:39:01 2013 +0200 @@ -15,6 +15,7 @@ import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.artifacts.model.FacetTypes; import org.dive4elements.river.artifacts.model.WQKms; +import org.dive4elements.river.artifacts.model.FlowVelocityData; import org.dive4elements.river.exports.StyledSeriesBuilder; import org.dive4elements.river.exports.XYChartGenerator; @@ -46,16 +47,19 @@ ThemeDocument theme, boolean visible) { CallContext context = generator.getCallContext(); - WQKms wqkms = (WQKms) bundle.getData(context); + Object data = bundle.getData(context); + XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); + String facetName = bundle.getFacetName(); - XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme); - - StyledSeriesBuilder.addStepPointsKmQ(series, wqkms); + if (facetName.equals(FacetTypes.FLOW_VELOCITY_DISCHARGE)) { + FlowVelocityData fData = (FlowVelocityData) data; + StyledSeriesBuilder.addPoints(series, fData.getQPoints(), true); + } else { + WQKms wqkms = (WQKms) data; + StyledSeriesBuilder.addStepPointsKmQ(series, wqkms); + } generator.addAxisSeries(series, axisName, visible); - - /* Check if the diagram should be inverted*/ - generator.setInverted(wqkms.guessRTLData()); } @Override @@ -96,7 +100,8 @@ if (facetType.equals(FacetTypes.STATIC_WQKMS_Q) || facetType.equals(FacetTypes.LONGITUDINAL_Q) - || facetType.startsWith(FacetTypes.DISCHARGE_LONGITUDINAL_Q)) { + || facetType.startsWith(FacetTypes.DISCHARGE_LONGITUDINAL_Q) + || facetType.startsWith(FacetTypes.FLOW_VELOCITY_DISCHARGE)) { return true; } return false;