Mercurial > dive4elements > river
comparison artifacts/doc/conf/meta-data.xml @ 9625:07f02019065e
Nachtrag Pos. 20: infrastructure query added, calculation updated for extended access class
author | mschaefer |
---|---|
date | Mon, 14 Oct 2019 08:14:58 +0200 |
parents | 02ca823ec9c6 |
children | ad852be69900 |
comparison
equal
deleted
inserted
replaced
9624:02ca823ec9c6 | 9625:07f02019065e |
---|---|
1416 | 1416 |
1417 <!-- XXXXXXX --> | 1417 <!-- XXXXXXX --> |
1418 <dc:macro name="predefined_infrastructures"> | 1418 <dc:macro name="predefined_infrastructures"> |
1419 <infrastructures TODO="i10n"> | 1419 <infrastructures TODO="i10n"> |
1420 <dc:context connection="system"> | 1420 <dc:context connection="system"> |
1421 <dc:statement> | 1421 <!--dc:choose> |
1422 SELECT * | 1422 <dc:when test="dc:contains($riverside, 'left')"> |
1423 FROM infrastructure | 1423 <dc:call-macro name="infrastructures_leftside_statement" /> |
1424 WHERE river_id = ${river_id} | 1424 <dc:call-macro name="infrastructures_groups_fill" /> |
1425 </dc:statement> | 1425 </dc:when> |
1426 <dc:group expr="$group_id"> | 1426 <dc:when test="dc:contains($riverside, 'right')"> |
1427 <infrastructure_group description="{dc:group-key()}"> | 1427 <dc:call-macro name="infrastructures_rightside_statement" /> |
1428 <dc:for-each> | 1428 <dc:call-macro name="infrastructures_groups_fill" /> |
1429 <!-- name="{$annotation_type_id}" --> | 1429 </dc:when> |
1430 <!-- not necessary: target_out="{$out}" --> | 1430 <dc:otherwise> |
1431 <infrastructure_type description="{$FILENAME}" factory="FAKE_FACTORY" group_label="{$group_id}" group_id="{$group_id}" type_id="{$annotation_type_id}" type_label="{$annotation_type_id}" /> | 1431 <dc:call-macro name="infrastructures_bothsides_statement" /> |
1432 </dc:for-each> | 1432 <dc:call-macro name="infrastructures_groups_fill" /> |
1433 </infrastructure_group> | 1433 </dc:otherwise> |
1434 </dc:group> | 1434 </dc:choose--> |
1435 <dc:call-macro name="infrastructures_bothsides_statement" /> | |
1436 <dc:call-macro name="infrastructures_groups_fill" /> | |
1435 </dc:context> | 1437 </dc:context> |
1436 </infrastructures> | 1438 </infrastructures> |
1439 </dc:macro> | |
1440 | |
1441 <dc:macro name="infrastructures_groups_fill"> | |
1442 <dc:group expr="$group_label"> | |
1443 <infrastructure_group name="{dc:group-key()}" description="{dc:group-key()}"> | |
1444 <dc:for-each> | |
1445 <!-- name="{$annotation_type_id}" --> | |
1446 <!-- not necessary: target_out="{$out}" --> | |
1447 <infrastructure_type name="{$type_label}" description="{$filename}" factory="FAKE_FACTORY" group_label="{$group_label}" group_id="{$group_id}" type_id="{$type_id}" type_label="{$type_label}" /> | |
1448 </dc:for-each> | |
1449 </infrastructure_group> | |
1450 </dc:group> | |
1451 </dc:macro> | |
1452 | |
1453 <dc:macro name="infrastructures_leftside_statement"> | |
1454 <dc:statement> | |
1455 SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, | |
1456 MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label | |
1457 FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id) | |
1458 INNER JOIN annotation_types AS g ON s.group_id = g.id) | |
1459 INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id) | |
1460 INNER JOIN attributes AS rs ON v.attribute_id = rs.id | |
1461 WHERE (s.river_id = ${river_id}) | |
1462 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) | |
1463 AND (lower(rs.value) = 'links') | |
1464 GROUP BY s.id | |
1465 ORDER BY MIN(g.name), MIN(t.name) | |
1466 </dc:statement> | |
1467 </dc:macro> | |
1468 | |
1469 <dc:macro name="infrastructures_rightside_statement"> | |
1470 <dc:statement> | |
1471 SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, | |
1472 MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label | |
1473 FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id) | |
1474 INNER JOIN annotation_types AS g ON s.group_id = g.id) | |
1475 INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id) | |
1476 INNER JOIN attributes AS rs ON v.attribute_id = rs.id | |
1477 WHERE (s.river_id = ${river_id}) | |
1478 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) | |
1479 AND (lower(rs.value) = 'rechts') | |
1480 GROUP BY s.id | |
1481 ORDER BY MIN(g.name), MIN(t.name) | |
1482 </dc:statement> | |
1483 </dc:macro> | |
1484 | |
1485 <dc:macro name="infrastructures_bothsides_statement"> | |
1486 <dc:statement> | |
1487 SELECT s.id, MIN(s.filename) AS filename, MIN(s.group_id) AS group_id, MIN(g.name) AS group_label, | |
1488 MIN(s.annotation_type_id) AS type_id, MIN(t.name) AS type_label | |
1489 FROM (((infrastructure AS s INNER JOIN infrastructure_values AS v ON v.infrastructure_id = s.id) | |
1490 INNER JOIN annotation_types AS g ON s.group_id = g.id) | |
1491 INNER JOIN annotation_types AS t ON s.annotation_type_id = t.id) | |
1492 INNER JOIN attributes AS rs ON v.attribute_id = rs.id | |
1493 WHERE (s.river_id = ${river_id}) | |
1494 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) | |
1495 GROUP BY s.id | |
1496 ORDER BY MIN(g.name), MIN(t.name) | |
1497 </dc:statement> | |
1437 </dc:macro> | 1498 </dc:macro> |
1438 | 1499 |
1439 <!-- wst-data --> | 1500 <!-- wst-data --> |
1440 | 1501 |
1441 <!-- model-waterlevels --> | 1502 <!-- model-waterlevels --> |