Mercurial > dive4elements > river
changeset 6798:7089f338138a longitudinal-symmetry
Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 13:32:47 +0200 |
parents | 23ab795f2f0e |
children | 372c255714df |
files | artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java |
diffstat | 2 files changed, 62 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java Fri Aug 09 12:11:53 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.java Fri Aug 09 13:32:47 2013 +0200 @@ -28,10 +28,10 @@ import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult; import org.dive4elements.river.model.FlowVelocityMeasurementValue; -import org.dive4elements.river.jfree.Bounds; -import org.dive4elements.river.jfree.DoubleBounds; -import org.dive4elements.river.jfree.RiverAnnotation; -import org.dive4elements.river.jfree.StyledXYSeries; +// import org.dive4elements.river.jfree.Bounds; +// import org.dive4elements.river.jfree.DoubleBounds; +// import org.dive4elements.river.jfree.RiverAnnotation; +// import org.dive4elements.river.jfree.StyledXYSeries; import org.dive4elements.river.utils.RiverUtils; @@ -68,43 +68,5 @@ public static final String I18N_CHART_TITLE = "chart.flow_velocity.section.title"; - /** TODO: - * are the following defined somewhere else too? - * remove them here! - */ - private void doBedQualityLoadDiameter( - BedloadDiameterResult data, - ArtifactAndFacet aandf, - Document attr, - boolean visible) { - XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); - StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true); - - addAxisSeries(series, YAXIS.D.idx, visible); - } - - - private void doBedQualityTopLayerOut( - BedDiameterResult data, - ArtifactAndFacet aandf, - Document attr, - boolean visible) { - XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); - StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); - addAxisSeries(series, YAXIS.D.idx, visible); - } - - - private void doBedQualitySubLayerOut( - BedDiameterResult data, - ArtifactAndFacet aandf, - Document attr, - boolean visible - ) { - logger.debug("Do beddiametersubout"); - XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); - StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); - addAxisSeries(series, YAXIS.D.idx, visible); - } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java Fri Aug 09 12:11:53 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java Fri Aug 09 13:32:47 2013 +0200 @@ -28,6 +28,8 @@ import org.dive4elements.river.artifacts.access.FlowVelocityAccess; import org.dive4elements.river.artifacts.model.FlowVelocityData; import org.dive4elements.river.model.FlowVelocityMeasurementValue; +import org.dive4elements.river.artifacts.model.minfo.BedDiameterResult; +import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult; import org.dive4elements.river.jfree.Bounds; import org.dive4elements.river.jfree.DoubleBounds; @@ -497,7 +499,27 @@ attr, visible); } - + else if (name.equals(BED_QUALITY_BED_DIAMETER_SUBLAYER)) { + doBedQualitySubLayerOut( + (BedDiameterResult)artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); + } + else if (name.equals(BED_QUALITY_BED_DIAMETER_TOPLAYER)) { + doBedQualityTopLayerOut( + (BedDiameterResult)artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); + } + else if (name.equals(BED_QUALITY_BEDLOAD_DIAMETER)) { + doBedQualityLoadDiameter( + (BedloadDiameterResult)artifactAndFacet.getData(context), + artifactAndFacet, + attr, + visible); + } else { logger.warn("Unknown facet name: " + name); @@ -851,5 +873,40 @@ addAxisSeries(series, YAXIS.Q.idx, visible); } + + private void doBedQualityLoadDiameter( + BedloadDiameterResult data, + ArtifactAndFacet aandf, + Document attr, + boolean visible) { + XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); + StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true); + + addAxisSeries(series, YAXIS.D.idx, visible); + } + + + private void doBedQualityTopLayerOut( + BedDiameterResult data, + ArtifactAndFacet aandf, + Document attr, + boolean visible) { + XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); + StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); + addAxisSeries(series, YAXIS.D.idx, visible); + } + + + private void doBedQualitySubLayerOut( + BedDiameterResult data, + ArtifactAndFacet aandf, + Document attr, + boolean visible + ) { + logger.debug("Do beddiametersubout"); + XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr); + StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true); + addAxisSeries(series, YAXIS.D.idx, visible); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :