Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java @ 7075:253d80af5b7f generator-refactoring
More Processor refactoring
- Unify aandf aaf and bundle variable names to bundle
- Factor out diagram inversion code
- Add function with new signature to BedDiffYear and QOut processors
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 20 Sep 2013 16:25:43 +0200 |
parents | f9d5020af0af |
children | 67e87c2d3748 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java Fri Sep 20 15:44:39 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java Fri Sep 20 16:25:43 2013 +0200 @@ -58,32 +58,32 @@ @Override public void doOut( XYChartGenerator generator, - ArtifactAndFacet aandf, + ArtifactAndFacet bundle, ThemeDocument theme, boolean visible, int axisIndex ) { CallContext context = generator.getCallContext(); - Object data = aandf.getData(context); + Object data = bundle.getData(context); if (false && data instanceof WQKms) { doWQKmsPointOut( - generator, (WQKms) data, aandf, theme, visible, axisIndex); + generator, (WQKms) data, bundle, theme, visible, axisIndex); return; } else if (data instanceof RiverAnnotation) { doRiverAnnotationOut( - generator, (RiverAnnotation) data, aandf, theme, visible); + generator, (RiverAnnotation) data, bundle, theme, visible); return; } else if (data instanceof double[][]) { doMarksOut( - generator, (double[][]) data, aandf, theme, visible); + generator, (double[][]) data, bundle, theme, visible); return; } else { logger.error("Can't process " + data.getClass().getName() + " objects of facet " - + aandf.getFacetName()); + + bundle.getFacetName()); } } @@ -109,13 +109,13 @@ /** Handle WQKms data by finding w/q values at given km. */ protected void doWQKmsPointOut(XYChartGenerator generator, WQKms wqkms, - ArtifactAndFacet aandf, + ArtifactAndFacet bundle, ThemeDocument theme, boolean visible, int axidx ) { logger.debug("doWQKmsPointOut"); - String title = aandf.getFacetDescription(); + String title = bundle.getFacetDescription(); XYSeries series = new StyledXYSeries( title, theme); @@ -147,7 +147,7 @@ protected void doRiverAnnotationOut(XYChartGenerator generator, RiverAnnotation annotations, - ArtifactAndFacet aandf, + ArtifactAndFacet bundle, ThemeDocument theme, boolean visible ) { @@ -163,7 +163,7 @@ dGenerator.translateRiverAnnotation(annotations); dGenerator.doAnnotations( annotations, - aandf, theme, visible); + bundle, theme, visible); } @@ -173,7 +173,7 @@ */ protected void doMarksOut(XYChartGenerator generator, double[][] data, - ArtifactAndFacet aandf, + ArtifactAndFacet bundle, ThemeDocument theme, boolean visible ) { @@ -184,7 +184,7 @@ } // TODO subtract gauge null point if at gauge. - String title = aandf.getFacetDescription(); + String title = bundle.getFacetDescription(); List<StickyAxisAnnotation> yMarks = new ArrayList<StickyAxisAnnotation>(); for (double yPos: data[1]) { @@ -195,7 +195,7 @@ } generator.doAnnotations(new RiverAnnotation(title, yMarks), - aandf, theme, visible); + bundle, theme, visible); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :