[PATCH] Consider new SQ-diagrams in datacage config
Wald Commits
scm-commit at wald.intevation.org
Wed Sep 17 13:24:23 CEST 2014
# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1410953053 -7200
# Node ID f12a5c55864d35cf79a251c96ea5f3a8a35d8ba9
# Parent 2f7f9ced46a5d8e5917d3270276ace930888af4f
Consider new SQ-diagrams in datacage config.
diff -r 2f7f9ced46a5 -r f12a5c55864d artifacts/contrib/list-non-existant-outs.sh
--- a/artifacts/contrib/list-non-existant-outs.sh Wed Sep 17 13:12:12 2014 +0200
+++ b/artifacts/contrib/list-non-existant-outs.sh Wed Sep 17 13:24:13 2014 +0200
@@ -9,6 +9,9 @@
sed "s/ *<dc:when test=\"\$out = '\(.*\)'\">/\1/" | \
sort -u > /tmp/$tmpfile
+echo "WARNING:"
+echo "Only tests having exactly the pattern \"\$out = 'outname'\" will be recognised!"
+echo
echo "outs not used in any artifact-configuration:"
for out in `cat /tmp/$tmpfile`
do
diff -r 2f7f9ced46a5 -r f12a5c55864d artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Wed Sep 17 13:12:12 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml Wed Sep 17 13:24:13 2014 +0200
@@ -278,7 +278,8 @@
<dc:call-macro name="basedata_4_heightmarks-points"/>
<dc:call-macro name="basedata_5_flood-protections"/>
</dc:when>
- <dc:when test="starts-with($out, 'sq_relation')">
+ <dc:when test="starts-with($out, 'sq_relation') or
+ $out = 'sq_overview'">
<dc:call-macro name="sqrelations"/>
</dc:when>
</dc:choose>
@@ -396,7 +397,8 @@
<dc:when test="$out = 'historical_discharge_wq'">
<dc:call-macro name="historical-discharge-wq-user"/>
</dc:when>
- <dc:when test="starts-with($out, 'sq_relation')">
+ <dc:when test="starts-with($out, 'sq_relation') or
+ $out = 'sq_overview'">
<dc:call-macro name="sqrelations_user"/>
</dc:when>
</dc:choose>
@@ -1071,13 +1073,15 @@
</dc:macro>
<dc:macro name="sqrelations_user">
- <dc:filter expr="
+ <dc:filter expr="not(dc:contains($facet_name, 'overview')) and (
($out = 'sq_relation_a' and starts-with($facet_name, 'sq_a_')) or
($out = 'sq_relation_b' and starts-with($facet_name, 'sq_b_')) or
($out = 'sq_relation_c' and starts-with($facet_name, 'sq_c_')) or
($out = 'sq_relation_d' and starts-with($facet_name, 'sq_d_')) or
($out = 'sq_relation_e' and starts-with($facet_name, 'sq_e_')) or
- ($out = 'sq_relation_f' and starts-with($facet_name, 'sq_f_'))">
+ ($out = 'sq_relation_f' and starts-with($facet_name, 'sq_f_')) or
+ ($out = 'sq_relation_g' and starts-with($facet_name, 'sq_g_'))) or
+ $out = 'sq_overview' and dc:contains($facet_name, 'overview')">
<dc:if test="dc:has-result()">
<sq_relations>
<dc:call-macro name="collection-group">
@@ -2106,17 +2110,31 @@
</dc:statement>
<dc:if test="dc:has-result()">
<sq_relations>
- <dc:filter expr="$out = concat('sq_relation_', $parameter)">
- <dc:group expr="$station_km" type="number">
- <dc:group expr="concat('km ', $station_km, ': ', $station_name)">
- <station description="{dc:group-key()}">
- <dc:for-each>
- <dc:variable name="combined_desc" expr="concat(dc:date-format('yyyy', $start_time), ' bis ', dc:date-format('yyyy', $stop_time))"/>
- <sqvalue factory="staticsqrelation" target_out="{$out}"
- ids="{$sqvid};{$station_name}: {$combined_desc}" description="{$combined_desc}"/>
- </dc:for-each>
- </station>
- </dc:group>
+ <dc:filter expr="$out = concat('sq_relation_', $parameter) or
+ $out = 'sq_overview'">
+ <dc:group expr="concat('Parameter ', dc:uppercase($parameter))">
+ <parameter description="{dc:group-key()}">
+ <dc:for-each>
+ <dc:group expr="$station_km" type="number">
+ <dc:group expr="concat('km ', $station_km, ': ',
+ $station_name)">
+ <station description="{dc:group-key()}">
+ <dc:for-each>
+ <dc:variable name="combined_desc"
+ expr="concat(dc:date-format('yyyy',
+ $start_time), ' bis ',
+ dc:date-format('yyyy',
+ $stop_time))"/>
+ <sqvalue factory="staticsqrelation"
+ target_out="{$out}"
+ ids="{$sqvid};{dc:uppercase($parameter)} - {$station_name}: {$combined_desc}"
+ description="{$combined_desc}"/>
+ </dc:for-each>
+ </station>
+ </dc:group>
+ </dc:group>
+ </dc:for-each>
+ </parameter>
</dc:group>
</dc:filter>
</sq_relations>
More information about the Dive4Elements-commits
mailing list