[PATCH 9 of 9] Factor out longitudinal section default config and put it in its own file

Wald Commits scm-commit at wald.intevation.org
Thu Sep 26 12:57:07 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1380192990 -7200
# Node ID a2989d4e13f73ddae6c450bd634098e678207d77
# Parent  81416a62fa576f7acb731930ce9a2eeba2d18bfc
Factor out longitudinal section default config and put it in its own file

diff -r 81416a62fa57 -r a2989d4e13f7 artifacts/doc/conf/conf.xml
--- a/artifacts/doc/conf/conf.xml	Thu Sep 26 12:22:22 2013 +0200
+++ b/artifacts/doc/conf/conf.xml	Thu Sep 26 12:56:30 2013 +0200
@@ -8,6 +8,7 @@
     <!ENTITY floodmap    SYSTEM "floodmap.xml">
     <!ENTITY rivermap	 SYSTEM "rivermap.xml">
     <!ENTITY generators  SYSTEM "generators.xml">
+    <!ENTITY longitudinal-defaults SYSTEM "longitudinal-diagram-defaults.xml">
 ]>
 <artifact-database>
     <export-secret>YOUR_SECRET</export-secret>
diff -r 81416a62fa57 -r a2989d4e13f7 artifacts/doc/conf/generators.xml
--- a/artifacts/doc/conf/generators.xml	Thu Sep 26 12:22:22 2013 +0200
+++ b/artifacts/doc/conf/generators.xml	Thu Sep 26 12:56:30 2013 +0200
@@ -10,251 +10,80 @@
         names="longitudinal_section,longitudinal_section_chartinfo,discharge_longitudinal_section,discharge_longitudinal_section_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="W"/>
-        <axis name="D"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="dW"/>
-        <axis name="" type="X"/>
         <title key="chart.longitudinal.section.title" default="W-Längsschnitt"/>
-        <subtitle key="chart.longitudinal.section.subtitle" default="-">
-            <arg expr="artifact.river"/>
-            <arg expr="artifact.ld_from" type="double"/>
-            <arg expr="artifact.ld_to" type="double"/>
-        </subtitle>
-        <domain-axis key="chart.longitudinal.section.xaxis.label" default="Fluss-Km"
-                inverted="org.dive4elements.river.exports.IsKmUpEvaluator()">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="D"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="W"/>
+        &longitudinal-defaults;
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <!-- The area processor decides based on the facet name which axis to choose.
-             You have to ensure that there is a W and Q axis accordingly -->
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="dW"/>
     </output-generator>
     <output-generator
         names="w_differences,w_differences_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="W"/>
-        <axis name="D"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="dW"/>
-        <axis name="" type="X"/>
         <title key="chart.w_differences.title" default="Differences"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
         <subtitle key="chart.w_differences.subtitle" default="-">
             <arg expr="artifact.river"/>
         </subtitle>
-        <domain-axis key="chart.longitudinal.section.xaxis.label" default="Fluss-Km">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="D"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="dW"/>
     </output-generator>
     <output-generator
         names="fix_longitudinal_section_curve,fix_longitudinal_section_curve_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="dW"/>
-        <axis name="W"/>
-        <axis name="D"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="" type="X"/>
         <title key="chart.fixings.longitudinalsection.title" default="Fixierungsanalyse"/>
-        <domain-axis key="chart.fixings.longitudinalsection.xaxis.label" default="[km]">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="dW"/>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="D"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="H"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="P"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="W"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="deltaW"/>
     </output-generator>
     <output-generator
         names="bedheight_middle,bedheight_middle_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="dW"/>
-        <axis name="W"/>
-        <axis name="D"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="H"/>
-        <axis name="P"/>
-        <axis name="" type="X"/>
         <title key="chart.bedheight_middle.section.title" default="Mittlere Sohlhöhe"/>
-        <domain-axis key="chart.bedheight_middle.section.xaxis.label" default="km">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="dW"/>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="D"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="P"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="mD"/>
-        <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="H"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="BedHeight"/>
     </output-generator>
     <output-generator
         names="bed_difference_height_year,bed_difference_height_year_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="dW"/>
-        <axis name="W"/>
-        <axis name="D"/>
-        <axis name="dM"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="H"/>
-        <axis name="P"/>
-        <axis name="" type="X"/>
         <title key="chart.beddifference.height.title" default="Sohlenhöhen Differenz"/>
-        <domain-axis key="chart.beddifference.height.xaxis.label" default="Fluss-Km">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="dW"/>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="D"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="P"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="dM"/>
-        <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="H"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
+            axis="diffBed/Y"/>
     </output-generator>
     <output-generator names="bed_difference_year,bed_difference_year_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="W"/>
-        <axis name="diffW"/>
-        <axis name="deltaW"/>
-        <axis name="diffBed"/>
-        <axis name="diffBed/Y"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="BedHeight"/>
-        <axis name="SoundingWidth"/>
-        <axis name="Width"/>
-        <axis name="" type="X"/>
         <title key="chart.beddifference.year.title" default="Sohlenhöhen Differenz"/>
-        <domain-axis key="chart.beddifference.xaxis.label" default="Fluss-Km">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="deltaW"/>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="diffW"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="SoundingWidth"/>
-        <processor class="org.dive4elements.river.exports.process.BedWidthProcessor" axis="Width"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="diffBed"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="diffBed/Y"/>
-        <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="BedHeight"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
+            axis="diffBed"/>
     </output-generator>
     <output-generator names="bed_longitudinal_section,bed_longitudinal_section_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="W"/>
-        <axis name="diffW"/>
-        <axis name="deltaW"/>
-        <axis name="diffBed"/>
-        <axis name="diffBed/Y"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="BedHeight"/>
-        <axis name="SoundingWidth"/>
-        <axis name="Width"/>
-        <axis name="Porosity"/>
-        <axis name="Density"/>
-        <axis name="Diameter"/>
-        <axis name="" type="X"/>
         <title key="chart.bedquality.title" default="Sohlen Längsschnitt"/>
-        <domain-axis key="chart.bedquality.xaxis.label" default="Fluss-Km">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="deltaW"/>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="Porosity"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="diffW"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="SoundingWidth"/>
-        <processor class="org.dive4elements.river.exports.process.BedWidthProcessor" axis="Width"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="diffBed"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="diffBed/Y"/>
-        <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="BedHeight"/>
-        <processor class="org.dive4elements.river.exports.process.BedQualityDiameterProcessor" axis="Diameter"/>
-        <processor class="org.dive4elements.river.exports.process.BedQualityPorosityProcessor" axis="Porosity"/>
-        <processor class="org.dive4elements.river.exports.process.BedQualityDensityProcessor" axis="Density"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
+            axis="diffBed"/>
     </output-generator>
     <output-generator
         names="sedimentload_ls,sedimentload_ls_chartinfo"
         class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
         converter="org.dive4elements.river.exports.DiagramAttributes">
-        <axis name="W"/>
-        <axis name="diffW"/>
-        <axis name="deltaW"/>
-        <axis name="diffBed"/>
-        <axis name="diffBed/Y"/>
-        <axis name="Q" include-zero="true"/>
-        <axis name="BedHeight"/>
-        <axis name="SoundingWidth"/>
-        <axis name="Width"/>
-        <axis name="Porosity"/>
-        <axis name="Density"/>
-        <axis name="Diameter"/>
-        <axis name="SedimentLoad"/>
-        <axis name="Velocity"/>
-        <axis name="" type="X"/>
         <title key="chart.sedimentload.ls.title" default="Sedimentfracht"/>
-        <domain-axis key="chart.sedimentload.ls.xaxis.label" default="Fluss-Km">
-            <arg expr="artifact.river"/>
-        </domain-axis>
-        <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="deltaW"/>
-        <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor" axis="SedimentLoad"/>
-        <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
-        <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="diffW"/>
-        <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
-        <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
-        <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="SoundingWidth"/>
-        <processor class="org.dive4elements.river.exports.process.BedWidthProcessor" axis="Width"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="diffBed"/>
-        <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="diffBed/Y"/>
-        <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="BedHeight"/>
-        <processor class="org.dive4elements.river.exports.process.BedQualityDiameterProcessor" axis="Diameter"/>
-        <processor class="org.dive4elements.river.exports.process.BedQualityPorosityProcessor" axis="Porosity"/>
-        <processor class="org.dive4elements.river.exports.process.BedQualityDensityProcessor" axis="Density"/>
-        <processor class="org.dive4elements.river.exports.process.SedimentLoadProcessor" axis="SedimentLoad"/>
-        <processor class="org.dive4elements.river.exports.process.FlowVelocityProcessor" axis="Velocity"/>
-        <!-- TODO bed difference epoch-->
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
+            axis="SedimentLoad"/>
     </output-generator>
-
-
+    <output-generator
+        names="flow_velocity,flow_velocity_chartinfo"
+        class="org.dive4elements.river.exports.LongitudinalSectionGenerator2"
+        converter="org.dive4elements.river.exports.DiagramAttributes">
+        <title key="chart.flow_velocity.section.title" default="Geschwindigkeit- und Schubspannung"/>
+        &longitudinal-defaults;
+        <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
+            axis="Velocity"/>
+    </output-generator>
     <output-generator names="duration_curve" class="org.dive4elements.river.exports.DurationCurveGenerator"/>
     <output-generator names="duration_curve_chartinfo" class="org.dive4elements.river.exports.DurationCurveInfoGenerator"/>
     <output-generator names="waterlevel_export" class="org.dive4elements.river.exports.WaterlevelExporter"/>
@@ -279,8 +108,6 @@
     <output-generator names="historical_discharge_wq" class="org.dive4elements.river.exports.HistoricalDischargeWQCurveGenerator"/>
     <output-generator names="historical_discharge_wq_chartinfo" class="org.dive4elements.river.exports.HistoricalDischargeWQCurveInfoGenerator"/>
     <output-generator names="historical_discharge_export" class="org.dive4elements.river.exports.HistoricalDischargeCurveExporter"/>
-    <output-generator names="flow_velocity" class="org.dive4elements.river.exports.FlowVelocityGenerator"/>
-    <output-generator names="flow_velocity_chartinfo" class="org.dive4elements.river.exports.FlowVelocityInfoGenerator"/>
     <output-generator names="flow_velocity_export" class="org.dive4elements.river.exports.FlowVelocityExporter"/>
     <output-generator names="bedheight_middle_export" class="org.dive4elements.river.exports.MiddleBedHeightExporter"/>
     <output-generator names="bed_quality_export" class="org.dive4elements.river.exports.minfo.BedQualityExporter"/>
diff -r 81416a62fa57 -r a2989d4e13f7 artifacts/doc/conf/longitudinal-diagram-defaults.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/longitudinal-diagram-defaults.xml	Thu Sep 26 12:56:30 2013 +0200
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<longitudinal-defaults>
+    <axis name="W"/>
+    <axis name="diffW"/>
+    <axis name="deltaW"/>
+    <axis name="diffBed"/>
+    <axis name="diffBed/Y"/>
+    <axis name="BedHeight"/>
+    <axis name="SoundingWidth"/>
+    <axis name="Width"/>
+    <axis name="Porosity"/>
+    <axis name="Density"/>
+    <axis name="Diameter"/>
+    <axis name="SedimentLoad"/>
+    <axis name="Velocity"/>
+    <axis name="Tau"/>
+    <axis name="Q" include-zero="true"/>
+    <domain-axis key="chart.longitudinal.section.xaxis.label" default="Fluss-Km"
+            inverted="org.dive4elements.river.exports.IsKmUpEvaluator()">
+        <arg expr="artifact.river"/>
+    </domain-axis>
+    <!-- Default longitudinal section Processors -->
+    <processor class="org.dive4elements.river.exports.process.DeltaWProcessor" axis="deltaW"/>
+    <processor class="org.dive4elements.river.exports.process.AnnotationProcessor" axis="none"/>
+    <processor class="org.dive4elements.river.exports.process.AreaProcessor" axis="none"/>
+    <processor class="org.dive4elements.river.exports.process.WDiffProcessor" axis="diffW"/>
+    <processor class="org.dive4elements.river.exports.process.WOutProcessor" axis="W"/>
+    <processor class="org.dive4elements.river.exports.process.QOutProcessor" axis="Q"/>
+    <processor class="org.dive4elements.river.exports.process.BedHeightSoundingProcessor" axis="SoundingWidth"/>
+    <processor class="org.dive4elements.river.exports.process.BedWidthProcessor" axis="Width"/>
+    <processor class="org.dive4elements.river.exports.process.BedDiffYearProcessor" axis="diffBed"/>
+    <processor class="org.dive4elements.river.exports.process.BedDiffHeightYearProcessor" axis="diffBed/Y"/>
+    <processor class="org.dive4elements.river.exports.process.MiddleBedHeightProcessor" axis="BedHeight"/>
+    <processor class="org.dive4elements.river.exports.process.BedQualityDiameterProcessor" axis="Diameter"/>
+    <processor class="org.dive4elements.river.exports.process.BedQualityPorosityProcessor" axis="Porosity"/>
+    <processor class="org.dive4elements.river.exports.process.BedQualityDensityProcessor" axis="Density"/>
+    <processor class="org.dive4elements.river.exports.process.SedimentLoadProcessor" axis="SedimentLoad"/>
+    <processor class="org.dive4elements.river.exports.process.FlowVelocityProcessor" axis="Velocity"/>
+    <processor class="org.dive4elements.river.exports.process.ShearStressProcessor" axis="Tau"/>
+</longitudinal-defaults>


More information about the Dive4elements-commits mailing list