Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 2325:1fcaeced48f2
#485 Fixed broken renaming of chart themes.
flys-artifacts/trunk@4009 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 15:59:49 +0000 |
parents | 4cd0eb2ebb3b |
children | 65ff8ff20be4 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Thu Feb 09 15:48:13 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Thu Feb 09 15:59:49 2012 +0000 @@ -12,7 +12,6 @@ import org.w3c.dom.Document; - import de.intevation.artifactdatabase.state.ArtifactAndFacet; import de.intevation.artifactdatabase.state.Facet; @@ -336,44 +335,70 @@ } if (name.equals(LONGITUDINAL_W)) { - doWOut((WQKms) artifactAndFacet.getData(context), facet, attr, visible); + doWOut( + (WQKms) artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); } else if (name.equals(LONGITUDINAL_Q)) { - doQOut((WQKms) artifactAndFacet.getData(context), facet, attr, visible); + doQOut( + (WQKms) artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); } else if (name.equals(LONGITUDINAL_ANNOTATION)) { - doAnnotations((FLYSAnnotation) artifactAndFacet.getData(context), - facet, attr, visible); + doAnnotations( + (FLYSAnnotation) artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); } else if (name.equals(STATIC_WKMS) || name.equals(HEIGHTMARKS_POINTS) || name.equals(STATIC_WQKMS)) { - doWOut((WKms) artifactAndFacet.getData(context), facet, attr, visible); + doWOut( + (WKms) artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); } else if (name.equals(STATIC_WQKMS_W)) { - doWOut((WQKms) artifactAndFacet.getData(context), facet, attr, visible); + doWOut( + (WQKms) artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); } else if (name.equals(STATIC_WQKMS_Q)) { - doQOut((WQKms) artifactAndFacet.getData(context), facet, attr, visible); + doQOut( + (WQKms) artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); } else if (name.equals(W_DIFFERENCES)) { doWDifferencesOut( (WKms) artifactAndFacet.getData(context), - facet, + artifactAndFacet, attr, visible); } else if (FacetTypes.IS.AREA(name)) { - doArea(artifactAndFacet.getData(context), - artifactAndFacet.getFacetDescription(), + doArea( + artifactAndFacet.getData(context), + artifactAndFacet, attr, visible); - } else if (FacetTypes.IS.MANUALPOINTS(name)) { - doPoints(artifactAndFacet.getData(context), - artifactAndFacet.getFacetDescription(), - attr, visible, YAXIS.W.idx); + doPoints( + artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible, + YAXIS.W.idx); } else { logger.warn("Unknown facet name: " + name); @@ -393,14 +418,14 @@ * @param visible The visibility of the curve. */ protected void doWOut( - WKms wkms, - Facet facet, - Document theme, - boolean visible + WKms wkms, + ArtifactAndFacet aandf, + Document theme, + boolean visible ) { logger.debug("LongitudinalSectionGenerator.doWOut"); - XYSeries series = new StyledXYSeries(facet.getDescription(), theme); + XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); StyledSeriesBuilder.addPoints(series, wkms); @@ -419,7 +444,7 @@ */ protected void doWDifferencesOut( WKms wkms, - Facet facet, + ArtifactAndFacet aandf, Document theme, boolean visible ) { @@ -429,7 +454,7 @@ return; } - XYSeries series = new StyledXYSeries(facet.getDescription(), theme); + XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); if (logger.isDebugEnabled()) { if (wkms.size() > 0) { @@ -462,13 +487,13 @@ */ protected void doQOut( WQKms wqkms, - Facet facet, + ArtifactAndFacet aandf, Document theme, boolean visible ) { logger.debug("LongitudinalSectionGenerator.doQOut"); - XYSeries series = new StyledXYSeries(facet.getDescription(), theme); + XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); StyledSeriesBuilder.addPointsKmQ(series, wqkms); @@ -544,13 +569,15 @@ */ protected void doArea( Object o, - String seriesName, + ArtifactAndFacet aandf, Document theme, boolean visible ) { logger.debug("LongitudinalSectionGenerator.doArea"); StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme); + String seriesName = aandf.getFacetDescription(); + AreaFacet.Data data = (AreaFacet.Data) o; XYSeries up = null;