comparison artifacts/doc/conf/meta-data.xml @ 8079:1c57c9dc1661

Datacage config for new sediment load structures. Missing: some facets and everything down from the innermost macros for sediment load at measurement stations.
author Tom Gottfried <tom@intevation.de>
date Fri, 08 Aug 2014 13:24:11 +0200
parents 5f28aa1be795
children 1d2a9c5ee97b
comparison
equal deleted inserted replaced
8078:a403dbdb9e81 8079:1c57c9dc1661
1405 </dc:if> 1405 </dc:if>
1406 </dc:context> 1406 </dc:context>
1407 </densities> 1407 </densities>
1408 </dc:macro> 1408 </dc:macro>
1409 1409
1410 <dc:macro name="one-load"> 1410 <dc:macro name="one-load_ls">
1411 <dc:for-each> 1411 <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $year)"/>
1412 <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $year)"/> 1412 <year description="{$syear}"
1413 <year description="{$syear}" 1413 factory="sedimentyield"
1414 factory="sedimentyield" 1414 target_out="{$out}"
1415 target_out="{$out}" 1415 info="{$description}"
1416 info="{$description}" 1416 ids="{$syid}" />
1417 ids="{$syid}" /> 1417 </dc:macro>
1418 </dc:for-each> 1418
1419 </dc:macro> 1419 <dc:macro name="epoch-load_ls">
1420 1420 <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $startyear)"/>
1421 <dc:macro name="epoch-load"> 1421 <dc:variable name="eyear" type="string" expr="dc:date-format('yyyy', $endyear)"/>
1422 <dc:for-each> 1422 <year description="{$syear}-{$eyear}"
1423 <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $startyear)"/> 1423 factory="sedimentyield"
1424 <dc:variable name="eyear" type="string" expr="dc:date-format('yyyy', $endyear)"/> 1424 target_out="{$out}"
1425 <year description="{$syear}-{$eyear}" 1425 info="{$description}"
1426 factory="sedimentyield" 1426 ids="{$syid}" />
1427 target_out="{$out}"
1428 info="{$description}"
1429 ids="{$syid}" />
1430 </dc:for-each>
1431 </dc:macro> 1427 </dc:macro>
1432 1428
1433 <dc:macro name="loads"> 1429 <dc:macro name="loads">
1434 <dc:if test="dc:has-result()"> 1430 <dc:if test="dc:has-result()">
1435 <dc:filter expr="$fraction='sand'"> 1431 <dc:group expr="$fraction">
1436 <dc:if test="dc:has-result()"> 1432 <dc:variable name="fraction_name" expr="concat('\${', dc:group-key(), '}')"/>
1437 <sand> 1433 <fraction description="{$fraction_name}">
1438 <dc:macro-body/> 1434 <dc:for-each>
1439 </sand> 1435 <dc:macro-body/>
1440 </dc:if> 1436 </dc:for-each>
1441 </dc:filter> 1437 </fraction>
1442 <dc:filter expr="$fraction='fine_middle'"> 1438 </dc:group>
1443 <dc:if test="dc:has-result()">
1444 <fine_middle>
1445 <dc:macro-body/>
1446 </fine_middle>
1447 </dc:if>
1448 </dc:filter>
1449 <dc:filter expr="$fraction='coarse'">
1450 <dc:if test="dc:has-result()">
1451 <coarse>
1452 <dc:macro-body/>
1453 </coarse>
1454 </dc:if>
1455 </dc:filter>
1456 <dc:filter expr="$fraction='suspended_sediment'">
1457 <dc:if test="dc:has-result()">
1458 <susp_sediment>
1459 <dc:macro-body/>
1460 </susp_sediment>
1461 </dc:if>
1462 </dc:filter>
1463 <dc:filter expr="$fraction='susp_sand'">
1464 <dc:if test="dc:has-result()">
1465 <susp_sand>
1466 <dc:macro-body/>
1467 </susp_sand>
1468 </dc:if>
1469 </dc:filter>
1470 <dc:filter expr="$fraction='susp_sand_bed'">
1471 <dc:if test="dc:has-result()">
1472 <susp_sand_bed>
1473 <dc:macro-body/>
1474 </susp_sand_bed>
1475 </dc:if>
1476 </dc:filter>
1477 <dc:filter expr="$fraction='total'">
1478 <dc:if test="dc:has-result()">
1479 <total_load>
1480 <dc:macro-body/>
1481 </total_load>
1482 </dc:if>
1483 </dc:filter>
1484 </dc:if> 1439 </dc:if>
1485 </dc:macro> 1440 </dc:macro>
1486 1441
1487 <dc:macro name="yields"> 1442 <dc:macro name="yields">
1488 <yields> 1443 <yields>
1489 <dc:call-macro name="annotations_sediment_load_ls"/> 1444 <dc:call-macro name="annotations_sediment_load_ls"/>
1490 <years> 1445 <measurement_stations>
1491 <dc:context> 1446 <years>
1492 <dc:statement> 1447 <dc:context>
1493 SELECT DISTINCT 1448 <dc:statement>
1494 sy.id AS syid, 1449 SELECT DISTINCT
1495 sy.description AS description, 1450 sy.id AS syid,
1496 ti.start_time AS year, 1451 sy.description AS description,
1497 gf.name AS fraction 1452 ti.start_time AS year,
1498 FROM sediment_load_ls sy 1453 gf.name AS fraction
1499 JOIN rivers r ON sy.river_id = r.id 1454 FROM sediment_load sy
1500 JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id 1455 JOIN sediment_load_values syv
1501 JOIN time_intervals ti ON sy.time_interval_id = ti.id 1456 ON sy.id = syv.sediment_load_id
1502 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id 1457 JOIN measurement_station ms
1503 WHERE r.id = ${river_id} 1458 ON ms.id = syv.measurement_station_id
1504 AND ti.stop_time IS NULL 1459 JOIN rivers r ON ms.river_id = r.id
1505 AND syv.station BETWEEN ${fromkm} AND ${tokm} 1460 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1506 ORDER BY fraction, year DESC 1461 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
1507 </dc:statement> 1462 WHERE r.id = ${river_id}
1508 <dc:call-macro name="loads"> 1463 AND ti.stop_time IS NULL
1509 <dc:call-macro name="one-load"/> 1464 AND ms.station BETWEEN ${fromkm} AND ${tokm}
1510 </dc:call-macro> 1465 ORDER BY fraction, year DESC
1511 </dc:context> 1466 </dc:statement>
1512 </years> 1467 <dc:call-macro name="loads">
1513 <epochs> 1468 <dc:call-macro name="one-load"/>
1514 <dc:context> 1469 </dc:call-macro>
1515 <dc:statement> 1470 </dc:context>
1516 SELECT DISTINCT 1471 </years>
1517 sy.id AS syid, 1472 <epochs>
1518 sy.description AS description, 1473 <dc:context>
1519 ti.start_time AS startyear, 1474 <dc:statement>
1520 ti.stop_time AS endyear, 1475 SELECT DISTINCT
1521 gf.name AS fraction 1476 sy.id AS syid,
1522 FROM sediment_load_ls sy 1477 sy.description AS description,
1523 JOIN rivers r ON sy.river_id = r.id 1478 ti.start_time AS startyear,
1524 JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id 1479 ti.stop_time AS endyear,
1525 JOIN time_intervals ti ON sy.time_interval_id = ti.id 1480 gf.name AS fraction
1526 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id 1481 FROM sediment_load sy
1527 WHERE r.id = ${river_id} 1482 JOIN sediment_load_values syv
1528 AND ti.stop_time IS NOT NULL 1483 ON sy.id = syv.sediment_load_id
1529 AND syv.station BETWEEN ${fromkm} AND ${tokm} 1484 JOIN measurement_station ms
1530 ORDER BY fraction, startyear DESC, endyear DESC 1485 ON ms.id = syv.measurement_station_id
1531 </dc:statement> 1486 JOIN rivers r ON ms.river_id = r.id
1532 <dc:call-macro name="loads"> 1487 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1533 <dc:call-macro name="epoch-load"/> 1488 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
1534 </dc:call-macro> 1489 WHERE r.id = ${river_id}
1535 </dc:context> 1490 AND ti.stop_time IS NOT NULL
1536 </epochs> 1491 AND ms.station BETWEEN ${fromkm} AND ${tokm}
1492 ORDER BY fraction, startyear DESC, endyear DESC
1493 </dc:statement>
1494 <dc:call-macro name="loads">
1495 <dc:call-macro name="epoch-load"/>
1496 </dc:call-macro>
1497 </dc:context>
1498 </epochs>
1499 </measurement_stations>
1500 <sediment_load_ls>
1501 <years>
1502 <dc:context>
1503 <dc:statement>
1504 SELECT DISTINCT
1505 sy.id AS syid,
1506 sy.description AS description,
1507 ti.start_time AS year,
1508 gf.name AS fraction
1509 FROM sediment_load_ls sy
1510 JOIN rivers r ON sy.river_id = r.id
1511 JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
1512 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1513 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
1514 WHERE r.id = ${river_id}
1515 AND ti.stop_time IS NULL
1516 AND syv.station BETWEEN ${fromkm} AND ${tokm}
1517 ORDER BY fraction, year DESC
1518 </dc:statement>
1519 <dc:call-macro name="loads">
1520 <dc:call-macro name="one-load_ls"/>
1521 </dc:call-macro>
1522 </dc:context>
1523 </years>
1524 <epochs>
1525 <dc:context>
1526 <dc:statement>
1527 SELECT DISTINCT
1528 sy.id AS syid,
1529 sy.description AS description,
1530 ti.start_time AS startyear,
1531 ti.stop_time AS endyear,
1532 gf.name AS fraction
1533 FROM sediment_load_ls sy
1534 JOIN rivers r ON sy.river_id = r.id
1535 JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
1536 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1537 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
1538 WHERE r.id = ${river_id}
1539 AND ti.stop_time IS NOT NULL
1540 AND syv.station BETWEEN ${fromkm} AND ${tokm}
1541 ORDER BY fraction, startyear DESC, endyear DESC
1542 </dc:statement>
1543 <dc:call-macro name="loads">
1544 <dc:call-macro name="epoch-load_ls"/>
1545 </dc:call-macro>
1546 </dc:context>
1547 </epochs>
1548 </sediment_load_ls>
1537 </yields> 1549 </yields>
1538 </dc:macro> 1550 </dc:macro>
1539 1551
1540 1552
1541 <dc:macro name="basedata_5_flood-protections"> 1553 <dc:macro name="basedata_5_flood-protections">

http://dive4elements.wald.intevation.org