changeset 3757:e8a90a5ce624

Added facets and chart generator for bed quality calculation. flys-artifacts/trunk@5454 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 13 Sep 2012 12:08:50 +0000 (2012-09-13)
parents 912a398968b6
children 75bc96dd9d82
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/conf.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedDensityFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedDiameterFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedPorosityFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedloadDiameterFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/BedQualityState.java flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedQualityGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedQualityInfoGenerator.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 13 files changed, 557 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Sep 13 12:08:50 2012 +0000
@@ -1,3 +1,27 @@
+2012-09-13  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/conf/conf.xml: Registered new OutGenerators BedQualityGenerator and
+	  BedQualityInfoGenerator.
+
+	* src/main/java/de/intevation/flys/artifacts/model/minfo/BedPorosityFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/minfo/BedDiameterFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/minfo/BedloadDiameterFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/minfo/BedDensityFacet.java:
+	  New Facets for serving data for bed quality exports/charts.
+
+	* src/main/java/de/intevation/flys/artifacts/states/minfo/BedQualityState.java:
+	  Add some dummy Facets to force chart creation.
+
+	* src/main/java/de/intevation/flys/exports/minfo/BedQualityInfoGenerator.java,
+	  src/main/java/de/intevation/flys/exports/minfo/BedQualityGenerator.java:
+	  New OutGenerators for bed quality charts.
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: New I18N strings for bed
+	  quality charts.
+
 2012-09-13  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/minfo/QualityMeasurementFactory.java:
--- a/flys-artifacts/doc/conf/conf.xml	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/doc/conf/conf.xml	Thu Sep 13 12:08:50 2012 +0000
@@ -286,6 +286,8 @@
         <output-generator name="bedheight_middle">de.intevation.flys.exports.MiddleBedHeightGenerator</output-generator>
         <output-generator name="bedheight_middle_chartinfo">de.intevation.flys.exports.MiddleBedHeightInfoGenerator</output-generator>
         <output-generator name="bedheight_middle_export">de.intevation.flys.exports.MiddleBedHeightExporter</output-generator>
+        <output-generator name="bed_longitudinal_section">de.intevation.flys.exports.minfo.BedQualityGenerator</output-generator>
+        <output-generator name="bed_longitudinal_section_chartinfo">de.intevation.flys.exports.minfo.BedQualityInfoGenerator</output-generator>
         <output-generator name="sq_relation_a">de.intevation.flys.exports.sq.SQRelationGeneratorA</output-generator>
         <output-generator name="sq_relation_b">de.intevation.flys.exports.sq.SQRelationGeneratorB</output-generator>
         <output-generator name="sq_relation_c">de.intevation.flys.exports.sq.SQRelationGeneratorC</output-generator>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedDensityFacet.java	Thu Sep 13 12:08:50 2012 +0000
@@ -0,0 +1,57 @@
+package de.intevation.flys.artifacts.model.minfo;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.model.CalculationResult;
+import de.intevation.flys.artifacts.model.DataFacet;
+import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
+
+
+/**
+ * Facet for serving bed density data.
+ * 
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class BedDensityFacet extends DataFacet {
+
+    private static final long serialVersionUID = 1L;
+    
+    private static Logger logger = Logger.getLogger(BedDensityFacet.class);
+
+    public BedDensityFacet() {
+    }
+
+    public BedDensityFacet(int idx, String name, String description,
+        ComputeType type, String stateId, String hash) {
+        super(idx, name, description, type, hash, stateId);
+    }
+
+    public Object getData(Artifact artifact, CallContext context) {
+        logger.debug("Get data for bed density at index: " + index);
+
+        FLYSArtifact flys = (FLYSArtifact) artifact;
+
+        CalculationResult res = (CalculationResult) flys.compute(context, hash,
+            stateId, type, false);
+
+        Object[] data = (Object[]) res.getData(); // TODO CAST TO SPECIFIC CLASS
+
+        return data != null && data.length > index ? data[index] : null; 
+    }
+
+    /** Copy deeply. */
+    @Override
+    public Facet deepCopy() {
+        BedDensityFacet copy = new BedDensityFacet();
+        copy.set(this);
+        copy.type = type;
+        copy.hash = hash;
+        copy.stateId = stateId;
+        return copy;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedDiameterFacet.java	Thu Sep 13 12:08:50 2012 +0000
@@ -0,0 +1,57 @@
+package de.intevation.flys.artifacts.model.minfo;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.model.CalculationResult;
+import de.intevation.flys.artifacts.model.DataFacet;
+import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
+
+
+/**
+ * Facet for serving bed diameter data.
+ * 
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class BedDiameterFacet extends DataFacet {
+
+    private static final long serialVersionUID = 1L;
+
+    private static Logger logger = Logger.getLogger(BedDiameterFacet.class);
+
+    public BedDiameterFacet() {
+    }
+
+    public BedDiameterFacet(int idx, String name, String description,
+        ComputeType type, String stateId, String hash) {
+        super(idx, name, description, type, hash, stateId);
+    }
+
+    public Object getData(Artifact artifact, CallContext context) {
+        logger.debug("Get data for bed diameter at index: " + index);
+
+        FLYSArtifact flys = (FLYSArtifact) artifact;
+
+        CalculationResult res = (CalculationResult) flys.compute(context, hash,
+            stateId, type, false);
+
+        Object[] data = (Object[]) res.getData(); // TODO CAST TO SPECIFIC CLASS
+
+        return data != null && data.length > index ? data[index] : null;
+    }
+
+    /** Copy deeply. */
+    @Override
+    public Facet deepCopy() {
+        BedDiameterFacet copy = new BedDiameterFacet();
+        copy.set(this);
+        copy.type = type;
+        copy.hash = hash;
+        copy.stateId = stateId;
+        return copy;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedPorosityFacet.java	Thu Sep 13 12:08:50 2012 +0000
@@ -0,0 +1,57 @@
+package de.intevation.flys.artifacts.model.minfo;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.model.CalculationResult;
+import de.intevation.flys.artifacts.model.DataFacet;
+import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
+
+
+/**
+ * Facet for serving bed porosity data.
+ * 
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class BedPorosityFacet extends DataFacet {
+
+    private static final long serialVersionUID = 1L;
+
+    private static Logger logger = Logger.getLogger(BedPorosityFacet.class);
+
+    public BedPorosityFacet() {
+    }
+
+    public BedPorosityFacet(int idx, String name, String description,
+        ComputeType type, String stateId, String hash) {
+        super(idx, name, description, type, hash, stateId);
+    }
+
+    public Object getData(Artifact artifact, CallContext context) {
+        logger.debug("Get data for bed porosity at index: " + index);
+
+        FLYSArtifact flys = (FLYSArtifact) artifact;
+
+        CalculationResult res = (CalculationResult) flys.compute(context, hash,
+            stateId, type, false);
+
+        Object[] data = (Object[]) res.getData(); // TODO CAST TO SPECIFIC CLASS
+
+        return data != null && data.length > index ? data[index] : null;
+    }
+
+    /** Copy deeply. */
+    @Override
+    public Facet deepCopy() {
+        BedPorosityFacet copy = new BedPorosityFacet();
+        copy.set(this);
+        copy.type = type;
+        copy.hash = hash;
+        copy.stateId = stateId;
+        return copy;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedloadDiameterFacet.java	Thu Sep 13 12:08:50 2012 +0000
@@ -0,0 +1,58 @@
+package de.intevation.flys.artifacts.model.minfo;
+
+import org.apache.log4j.Logger;
+
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.artifacts.Artifact;
+import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.model.CalculationResult;
+import de.intevation.flys.artifacts.model.DataFacet;
+import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
+
+
+/**
+ * Facet for serving bedload diameter data.
+ * 
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class BedloadDiameterFacet extends DataFacet {
+
+    private static final long serialVersionUID = 1L;
+    
+    private static Logger logger = Logger.getLogger(BedloadDiameterFacet.class);
+
+    public BedloadDiameterFacet() {
+        // required for clone operation deepCopy()
+    }
+
+    public BedloadDiameterFacet(int idx, String name, String description,
+        ComputeType type, String stateId, String hash) {
+        super(idx, name, description, type, hash, stateId);
+    }
+
+    public Object getData(Artifact artifact, CallContext context) {
+        logger.debug("Get data for bedload diameter at index: " + index);
+
+        FLYSArtifact flys = (FLYSArtifact) artifact;
+
+        CalculationResult res = (CalculationResult) flys.compute(context, hash,
+            stateId, type, false);
+
+        Object[] data = (Object[]) res.getData(); // TODO CAST TO SPECIFIC CLASS
+
+        return data != null && data.length > index ? data[index] : null; 
+    }
+
+    /** Copy deeply. */
+    @Override
+    public Facet deepCopy() {
+        BedloadDiameterFacet copy = new BedloadDiameterFacet();
+        copy.set(this);
+        copy.type = type;
+        copy.hash = hash;
+        copy.stateId = stateId;
+        return copy;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/BedQualityState.java	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/BedQualityState.java	Thu Sep 13 12:08:50 2012 +0000
@@ -11,36 +11,53 @@
 import de.intevation.flys.artifacts.access.BedQualityAccess;
 import de.intevation.flys.artifacts.model.BedQualityCalculation;
 import de.intevation.flys.artifacts.model.CalculationResult;
+import de.intevation.flys.artifacts.model.FacetTypes;
+import de.intevation.flys.artifacts.model.minfo.BedDensityFacet;
+import de.intevation.flys.artifacts.model.minfo.BedDiameterFacet;
+import de.intevation.flys.artifacts.model.minfo.BedPorosityFacet;
+import de.intevation.flys.artifacts.model.minfo.BedloadDiameterFacet;
 import de.intevation.flys.artifacts.states.DefaultState;
 
-public class BedQualityState extends DefaultState {
 
-    private static final Logger logger = Logger.getLogger(BedQualityState.class);
+public class BedQualityState extends DefaultState implements FacetTypes {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger logger = Logger
+        .getLogger(BedQualityState.class);
 
     @Override
-    public Object computeAdvance(
-        FLYSArtifact artifact,
-        String       hash,
-        CallContext  context,
-        List<Facet>  facets,
-        Object       old
-    ) {
+    public Object computeAdvance(FLYSArtifact artifact, String hash,
+        CallContext context, List<Facet> facets, Object old) {
         logger.debug("BedQualityState.computeAdvance");
 
         List<Facet> newFacets = new ArrayList<Facet>();
 
         BedQualityAccess access = new BedQualityAccess(artifact);
 
-        CalculationResult res = old instanceof CalculationResult
-            ? (CalculationResult) old
+        CalculationResult res = old instanceof CalculationResult ? (CalculationResult) old
             : new BedQualityCalculation().calculate(access);
 
         if (facets == null || res == null) {
             return res;
         }
 
+        String stateId = getID();
+
+        // TODO CREATE FACETS DEPENDING ON THE CALCULATION RESULT
+        newFacets.add(new BedDiameterFacet(0, BED_QUALITY_BED_DIAMETER,
+            "bed diameter", ComputeType.ADVANCE, stateId, hash));
+
+        newFacets.add(new BedloadDiameterFacet(0, BED_QUALITY_BEDLOAD_DIAMETER,
+            "bedload diameter", ComputeType.ADVANCE, stateId, hash));
+
+        newFacets.add(new BedPorosityFacet(0, BED_QUALITY_POROSITY, "porosity",
+            ComputeType.ADVANCE, stateId, hash));
+
+        newFacets.add(new BedDensityFacet(0, BED_QUALITY_SEDIMENT_DENSITY,
+            "density", ComputeType.ADVANCE, stateId, hash));
+
         logger.debug("Created " + newFacets.size() + " new Facets.");
-
         facets.addAll(newFacets);
 
         return res;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedQualityGenerator.java	Thu Sep 13 12:08:50 2012 +0000
@@ -0,0 +1,231 @@
+package de.intevation.flys.exports.minfo;
+
+import org.apache.log4j.Logger;
+import org.jfree.data.xy.XYSeries;
+import org.w3c.dom.Document;
+
+import de.intevation.artifactdatabase.state.ArtifactAndFacet;
+import de.intevation.artifactdatabase.state.Facet;
+import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.model.FacetTypes;
+import de.intevation.flys.artifacts.model.MiddleBedHeightData;
+import de.intevation.flys.exports.ChartGenerator.YAxisWalker;
+import de.intevation.flys.exports.StyledSeriesBuilder;
+import de.intevation.flys.exports.XYChartGenerator;
+import de.intevation.flys.jfree.FLYSAnnotation;
+import de.intevation.flys.jfree.StyledXYSeries;
+import de.intevation.flys.utils.FLYSUtils;
+
+
+/**
+ * An OutGenerator that generates bed quality charts.
+ * 
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class BedQualityGenerator extends XYChartGenerator implements FacetTypes {
+
+    public enum YAXIS {
+        W(0), P(1), D(2);
+
+        protected int idx;
+
+        private YAXIS(int c) {
+            idx = c;
+        }
+    }
+
+    /** The logger that is used in this generator. */
+    private static Logger logger = Logger.getLogger(BedQualityGenerator.class);
+
+    public static final String I18N_CHART_TITLE = "chart.bedquality.title";
+    public static final String I18N_XAXIS_LABEL = "chart.bedquality.xaxis.label";
+    public static final String I18N_YAXIS_LABEL = "chart.bedquality.yaxis.label";
+    public static final String I18N_SECOND_YAXIS_LABEL = "chart.bedquality.yaxis.label.porosity";
+    public static final String I18N_THIRD_YAXIS_LABEL = "chart.bedquality.yaxis.label.diameter";
+
+    public static final String I18N_CHART_TITLE_DEFAULT = "Sohlen Längsschnitt";
+    public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
+    public static final String I18N_YAXIS_LABEL_DEFAULT = "Durchmesser [m]";
+    public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Porosität [%]";
+    public static final String I18N_THIRD_YAXIS_LABEL_DEFAULT = "Dichte [t/m^3]";
+
+    @Override
+    protected YAxisWalker getYAxisWalker() {
+        return new YAxisWalker() {
+
+            @Override
+            public int length() {
+                return YAXIS.values().length;
+            }
+
+            @Override
+            public String getId(int idx) {
+                YAXIS[] yaxes = YAXIS.values();
+                return yaxes[idx].toString();
+            }
+        };
+    }
+
+    /**
+     * Returns the default title for this chart.
+     * 
+     * @return the default title for this chart.
+     */
+    @Override
+    public String getDefaultChartTitle() {
+        return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT);
+    }
+
+    /**
+     * Get internationalized label for the x axis.
+     */
+    @Override
+    protected String getDefaultXAxisLabel() {
+        return msg(I18N_XAXIS_LABEL, I18N_XAXIS_LABEL_DEFAULT);
+    }
+
+    @Override
+    protected String getDefaultYAxisLabel(int index) {
+        String label = "default";
+
+        if (index == YAXIS.W.idx) {
+            label = getWAxisLabel();
+        }
+        else if (index == YAXIS.P.idx) {
+            label = getPAxisLabel();
+        }
+        else if (index == YAXIS.D.idx) {
+            label = getDAxisLabel();
+        }
+
+        return label;
+    }
+
+    /**
+     * Get internationalized label for the y axis displaying the diameter.
+     */
+    protected String getWAxisLabel() {
+        return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
+    }
+
+    /**
+     * Get internationalized label for the y axis displaying the porosity.
+     */
+    protected String getPAxisLabel() {
+        return msg(I18N_SECOND_YAXIS_LABEL, I18N_SECOND_YAXIS_LABEL_DEFAULT);
+    }
+
+    /**
+     * Get internationalized label for the y axis displaying the density.
+     */
+    protected String getDAxisLabel() {
+        return msg(I18N_THIRD_YAXIS_LABEL, I18N_THIRD_YAXIS_LABEL_DEFAULT);
+    }
+
+    /**
+     * Produce output.
+     * 
+     * @param artifactAndFacet
+     *            current facet.
+     * @param attr
+     *            theme for facet
+     */
+    public void doOut(ArtifactAndFacet artifactAndFacet, Document attr,
+        boolean visible) {
+        String name = artifactAndFacet.getFacetName();
+
+        logger.debug("BedQualityGenerator.doOut: " + name);
+
+        if (name == null) {
+            logger.error("No facet name for doOut(). No output generated!");
+            return;
+        }
+
+        Facet facet = artifactAndFacet.getFacet();
+
+        if (facet == null) {
+            return;
+        }
+
+        if (name.equals(BED_QUALITY_BED_DIAMETER)) {
+            doBedDiameterOut(artifactAndFacet.getData(context), // TODO CAST TO
+                                                                // SPECIFIC
+                                                                // CLASS
+                artifactAndFacet, attr, visible);
+        }
+        else if (name.equals(BED_QUALITY_BEDLOAD_DIAMETER)) {
+            doBedloadDiameterOut(artifactAndFacet.getData(context), // TODO CAST
+                                                                    // TO
+                                                                    // SPECIFIC
+                                                                    // CLASS
+                artifactAndFacet, attr, visible);
+        }
+        else if (name.equals(BED_QUALITY_POROSITY)) {
+            doPorosityOut(artifactAndFacet.getData(context), // TODO CAST TO
+                                                             // SPECIFIC CLASS
+                artifactAndFacet, attr, visible);
+        }
+        else if (name.equals(BED_QUALITY_SEDIMENT_DENSITY)) {
+            doDensityOut(artifactAndFacet.getData(context), // TODO CAST TO
+                                                            // SPECIFIC CLASS
+                artifactAndFacet, attr, visible);
+        }
+        else if (FacetTypes.IS.MANUALPOINTS(name)) {
+            doPoints(artifactAndFacet.getData(context), artifactAndFacet, attr,
+                visible, YAXIS.W.idx);
+        }
+        else {
+            logger.warn("Unknown facet name: " + name);
+            return;
+        }
+    }
+
+    protected void doBedDiameterOut(Object data, ArtifactAndFacet aandf,
+        Document theme, boolean visible) {
+        logger.debug("BedQuality.doBedDiameterOut");
+
+        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+
+        // StyledSeriesBuilder.addPoints(series, data.getMiddleHeightsPoints(),
+        // true);
+
+        addAxisSeries(series, YAXIS.W.idx, visible);
+    }
+
+    protected void doBedloadDiameterOut(Object data, ArtifactAndFacet aandf,
+        Document theme, boolean visible) {
+        logger.debug("BedQuality.doBedloadDiameterOut");
+
+        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+
+        // StyledSeriesBuilder.addPoints(series, data.getMiddleHeightsPoints(),
+        // true);
+
+        addAxisSeries(series, YAXIS.W.idx, visible);
+    }
+
+    protected void doPorosityOut(Object data, ArtifactAndFacet aandf,
+        Document theme, boolean visible) {
+        logger.debug("BedQuality.doPorosityOut");
+
+        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+
+        // StyledSeriesBuilder.addPoints(series, data.getMiddleHeightsPoints(),
+        // true);
+
+        addAxisSeries(series, YAXIS.P.idx, visible);
+    }
+
+    protected void doDensityOut(Object data, ArtifactAndFacet aandf,
+        Document theme, boolean visible) {
+        logger.debug("BedQuality.doDensityOut");
+
+        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+
+        // StyledSeriesBuilder.addPoints(series, data.getMiddleHeightsPoints(),
+        // true);
+
+        addAxisSeries(series, YAXIS.D.idx, visible);
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedQualityInfoGenerator.java	Thu Sep 13 12:08:50 2012 +0000
@@ -0,0 +1,18 @@
+package de.intevation.flys.exports.minfo;
+
+import de.intevation.flys.exports.ChartInfoGenerator;
+
+
+/**
+ * A ChartInfoGenerator that generates meta information for specific computed
+ * bed quality curves.
+ * 
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class BedQualityInfoGenerator extends ChartInfoGenerator {
+
+    public BedQualityInfoGenerator() {
+        super(new BedQualityGenerator());
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/resources/messages.properties	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Thu Sep 13 12:08:50 2012 +0000
@@ -176,6 +176,12 @@
 chart.fixings.wq.subtitle1={0,date,short} to {1,date,short}
 chart.fixings.analysis.title = Longitudinal section at km {0}
 
+chart.bedquality.title=Bed Longitudinal Section
+chart.bedquality.xaxis.label=River-Km
+chart.bedquality.yaxis.label=Diameter [m]
+chart.bedquality.yaxis.label.porosity=Porosity [%]
+chart.bedquality.yaxis.label.density=Density [t/m\u00b3]
+
 chart.sq_relation.xaxis.label = Discharge [m\u00b3/s]
 chart.sq_relation.yaxis.label = Transport [kg/s]
 chart.sq_relation_a.title = Feinkornanteil
--- a/flys-artifacts/src/main/resources/messages_de.properties	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Thu Sep 13 12:08:50 2012 +0000
@@ -176,6 +176,12 @@
 chart.w_differences.yaxis.label = m
 chart.w_differences.yaxis.second.label = W [NN + m]
 
+chart.bedquality.title=Sohlen L\u00e4ngsschnitt
+chart.bedquality.xaxis.label=Fluss-Km
+chart.bedquality.yaxis.label=Durchmesser [m]
+chart.bedquality.yaxis.label.porosity=Porosit\u00e4t [%]
+chart.bedquality.yaxis.label.density=Dichte [t/m\u00b3]
+
 chart.sq_relation.xaxis.label = Abfluss [m\u00b3/s]
 chart.sq_relation.yaxis.label = Transport [kg/s]
 chart.sq_relation_a.title = Feinkornanteil
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Thu Sep 13 12:08:50 2012 +0000
@@ -174,6 +174,12 @@
 chart.w_differences.yaxis.label = m
 chart.w_differences.yaxis.second.label = W [NN + m]
 
+chart.bedquality.title=Sohlen L\u00e4ngsschnitt
+chart.bedquality.xaxis.label=Fluss-Km
+chart.bedquality.yaxis.label=Durchmesser [m]
+chart.bedquality.yaxis.label.porosity=Porosit\u00e4t [%]
+chart.bedquality.yaxis.label.density=Dichte [t/m\u00b3]
+
 chart.sq_relation.xaxis.label = Abfluss [m\u00b3/s]
 chart.sq_relation.yaxis.label = Transport [kg/s]
 chart.sq_relation_a.title = Feinkornanteil
--- a/flys-artifacts/src/main/resources/messages_en.properties	Thu Sep 13 10:49:49 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Thu Sep 13 12:08:50 2012 +0000
@@ -178,6 +178,12 @@
 chart.w_differences.yaxis.label = m
 chart.w_differences.yaxis.second.label = W [NN + m]
 
+chart.bedquality.title=Bed Longitudinal Section
+chart.bedquality.xaxis.label=River-Km
+chart.bedquality.yaxis.label=Diameter [m]
+chart.bedquality.yaxis.label.porosity=Porosity [%]
+chart.bedquality.yaxis.label.density=Density [t/m\u00b3]
+
 chart.sq_relation.xaxis.label = Discharge [m\u00b3/s]
 chart.sq_relation.yaxis.label = Transport [kg/s]
 chart.sq_relation_a.title = Feinkornanteil

http://dive4elements.wald.intevation.org