Mercurial > dive4elements > river
comparison artifacts/doc/conf/meta-data.xml @ 6111:6815714c1f97
Commit changes described in r6110
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 27 May 2013 15:40:42 +0200 |
parents | 5ba28b563614 |
children | 06cb01e8aef3 |
comparison
equal
deleted
inserted
replaced
6110:5ba28b563614 | 6111:6815714c1f97 |
---|---|
406 </dc:if> | 406 </dc:if> |
407 </dc:filter> | 407 </dc:filter> |
408 </dc:macro> | 408 </dc:macro> |
409 | 409 |
410 <dc:macro name="reference-curves"> | 410 <dc:macro name="reference-curves"> |
411 <dc:variable name="facet_type" value="reference_curve"/> | 411 <dc:filter expr="$facet_name = 'reference_curve'"> |
412 <dc:call-macro name="select-facets"> | 412 <dc:if test="dc:has-result()"> |
413 <reference_curves> | 413 <reference_curves> |
414 <dc:for-each> | 414 <dc:for-each> |
415 <dc:element name="${facet_name}"> | 415 <dc:element name="${facet_name}"> |
416 <dc:attribute name="description" value="${facet_description}"/> | 416 <dc:attribute name="description" value="${facet_description}"/> |
417 <dc:attribute name="factory" value="winfo"/> | 417 <dc:attribute name="factory" value="winfo"/> |
418 <dc:attribute name="artifact-id" value="${aid}"/> | 418 <dc:attribute name="artifact-id" value="${a_id}"/> |
419 <dc:attribute name="ids" value="${aid}"/> | 419 <dc:attribute name="ids" value="${a_id}"/> |
420 <dc:attribute name="out" value="reference_curve"/> | 420 <dc:attribute name="out" value="reference_curve"/> |
421 </dc:element> | 421 </dc:element> |
422 </dc:for-each> | 422 </dc:for-each> |
423 </reference_curves> | 423 </reference_curves> |
424 </dc:call-macro> | 424 </dc:if> |
425 </dc:filter> | |
425 </dc:macro> | 426 </dc:macro> |
426 | 427 |
427 <dc:macro name="computed-discharge-curve"> | 428 <dc:macro name="computed-discharge-curve"> |
428 <dc:variable name="facet_type" value="computed_discharge_curve.q"/> | 429 <dc:filter expr="$facet_name = 'computed_discharge_curve.q'"> |
429 <dc:call-macro name="select-facets"> | |
430 <computed_discharge_curves> | |
431 <dc:for-each> | |
432 <dc:element name="${facet_name}"> | |
433 <dc:attribute name="description" value="${facet_description}"/> | |
434 <dc:attribute name="factory" value="winfo"/> | |
435 <dc:attribute name="artifact-id" value="${aid}"/> | |
436 <dc:attribute name="ids" value="${aid}"/> | |
437 <dc:attribute name="out" value="computed_discharge_curve"/> | |
438 </dc:element> | |
439 </dc:for-each> | |
440 </computed_discharge_curves> | |
441 </dc:call-macro> | |
442 </dc:macro> | |
443 | |
444 <dc:macro name="flood-map"> | |
445 <dc:variable name="facet_type" value="floodmap.wsplgen"/> | |
446 <dc:call-macro name="select-facets"> | |
447 <floodmap> | |
448 <dc:for-each> | |
449 <dc:element name="${facet_name}"> | |
450 <dc:attribute name="description" value="${facet_description}"/> | |
451 <dc:attribute name="factory" value="winfo"/> | |
452 <dc:attribute name="artifact-id" value="${aid}"/> | |
453 <dc:attribute name="ids" value="${aid}"/> | |
454 <dc:attribute name="out" value="floodmap"/> | |
455 </dc:element> | |
456 </dc:for-each> | |
457 </floodmap> | |
458 </dc:call-macro> | |
459 </dc:macro> | |
460 | |
461 <dc:macro name="waterlevels"> | |
462 <dc:filter expr="$out_name = 'cross_section'"> | |
463 <dc:if test="dc:has-result()"> | |
464 <waterlevels> | |
465 <dc:for-each> | |
466 <dc:context> | |
467 <dc:statement> | |
468 SELECT name AS facet_name, num AS facet_num, description AS facet_description | |
469 FROM facets | |
470 WHERE out_id = ${out_id} | |
471 ORDER BY num ASC, name DESC | |
472 </dc:statement> | |
473 <longitudinal_section_columns description="{$river} {$a_creation}"> | |
474 <dc:for-each> | |
475 <dc:element name="${facet_name}"> | |
476 <dc:attribute name="description" value="${facet_description}"/> | |
477 <dc:attribute name="ids" value="${facet_num}"/> | |
478 <dc:attribute name="factory" value="winfo"/> | |
479 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
480 <dc:attribute name="out" value="cross_section"/> | |
481 </dc:element> | |
482 </dc:for-each> | |
483 </longitudinal_section_columns> | |
484 </dc:context> | |
485 </dc:for-each> | |
486 </waterlevels> | |
487 </dc:if> | |
488 </dc:filter> | |
489 </dc:macro> | |
490 | |
491 <dc:macro name="longitudinal"> | |
492 <dc:filter expr="$out_name = 'longitudinal_section'"> | |
493 <dc:if test="dc:has-result()"> | |
494 <waterlevels> | |
495 <dc:for-each> | |
496 <dc:context> | |
497 <dc:statement> | |
498 SELECT name AS facet_name, | |
499 num AS facet_num, | |
500 description AS facet_description | |
501 FROM facets | |
502 WHERE out_id = ${out_id} | |
503 ORDER BY num ASC, name DESC | |
504 </dc:statement> | |
505 <longitudinal_section_columns description="{$river} {$a_creation}"> | |
506 <dc:for-each> | |
507 <dc:element name="${facet_name}"> | |
508 <dc:attribute name="description" value="${facet_description}"/> | |
509 <dc:attribute name="ids" value="${facet_num}"/> | |
510 <dc:attribute name="factory" value="winfo"/> | |
511 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
512 <dc:attribute name="out" value="longitudinal_section"/> | |
513 </dc:element> | |
514 </dc:for-each> | |
515 </longitudinal_section_columns> | |
516 </dc:context> | |
517 </dc:for-each> | |
518 </waterlevels> | |
519 </dc:if> | |
520 </dc:filter> | |
521 </dc:macro> | |
522 | |
523 <dc:macro name="longitudinal-section"> | |
524 <dc:filter expr="$out_name = 'fix_longitudinal_section_curve'"> | |
525 <dc:if test="dc:has-result()"> | |
526 <waterlevels> | |
527 <dc:for-each> | |
528 <dc:context> | |
529 <dc:statement> | |
530 SELECT name AS facet_name, | |
531 num AS facet_num, | |
532 description AS facet_description | |
533 FROM facets | |
534 WHERE out_id = ${out_id} AND ( | |
535 name LIKE 'fix_deviation_ls%' OR | |
536 name LIKE 'fix_sector_average_ls%' OR | |
537 name LIKE 'fix_analysis_events_ls%' OR | |
538 name LIKE 'fix_reference_events_ls%') | |
539 ORDER BY num ASC, name DESC | |
540 </dc:statement> | |
541 <waterlevels description="{$river} {$a_creation} {$collection_name}"> | |
542 <dc:for-each> | |
543 <dc:element name="${facet_name}"> | |
544 <dc:attribute name="description" value="${facet_description}"/> | |
545 <dc:attribute name="ids" value="${facet_num}"/> | |
546 <dc:attribute name="factory" value="fixanalysis"/> | |
547 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
548 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> | |
549 </dc:element> | |
550 </dc:for-each> | |
551 </waterlevels> | |
552 </dc:context> | |
553 </dc:for-each> | |
554 </waterlevels> | |
555 </dc:if> | |
556 </dc:filter> | |
557 </dc:macro> | |
558 | |
559 <dc:macro name="delta-wt"> | |
560 <dc:filter expr="$out_name = 'fix_deltawt_curve'"> | |
561 <dc:if test="dc:has-result()"> | |
562 <waterlevels> | |
563 <dc:for-each> | |
564 <dc:context> | |
565 <dc:statement> | |
566 SELECT name AS facet_name, | |
567 num AS facet_num, | |
568 description AS facet_description | |
569 FROM facets | |
570 WHERE out_id = ${out_id} and ( | |
571 name LIKE 'fix_sector_average_dwt%' OR | |
572 name LIKE 'fix_deviation_dwt%' OR | |
573 name = 'fix_analysis_events_dwt' OR | |
574 name = 'fix_reference_events_dwt' OR | |
575 name = 'fix_analysis_periods_dwt') | |
576 ORDER BY num ASC, name DESC | |
577 </dc:statement> | |
578 <waterlevels description="{$river} {$a_creation} {$collection_name}"> | |
579 <dc:for-each> | |
580 <dc:element name="${facet_name}"> | |
581 <dc:attribute name="description" value="${facet_description}"/> | |
582 <dc:attribute name="ids" value="${facet_num}"/> | |
583 <dc:attribute name="factory" value="fixanalysis"/> | |
584 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
585 <dc:attribute name="out" value="fix_deltawt_curve"/> | |
586 </dc:element> | |
587 </dc:for-each> | |
588 </waterlevels> | |
589 </dc:context> | |
590 </dc:for-each> | |
591 </waterlevels> | |
592 </dc:if> | |
593 </dc:filter> | |
594 </dc:macro> | |
595 | |
596 <dc:macro name="delta-wt-ls"> | |
597 <dc:filter expr="$out_name = 'fix_deltawt_curve'"> | |
598 <dc:if test="dc:has-result()"> | |
599 <waterlevels> | |
600 <dc:for-each> | |
601 <dc:context> | |
602 <dc:statement> | |
603 SELECT name AS facet_name, num AS facet_num, description AS facet_description | |
604 FROM facets | |
605 WHERE out_id = ${out_id} and ( | |
606 name LIKE 'fix_sector_average_dwt%' OR | |
607 name LIKE 'fix_deviation_dwt%') | |
608 ORDER BY num ASC, name DESC | |
609 </dc:statement> | |
610 <waterlevels description="{$river} {$a_creation} {$collection_name}"> | |
611 <dc:for-each> | |
612 <dc:element name="${facet_name}"> | |
613 <dc:attribute name="description" value="${facet_description}"/> | |
614 <dc:attribute name="ids" value="${facet_num}"/> | |
615 <dc:attribute name="factory" value="fixanalysis"/> | |
616 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
617 <dc:attribute name="out" value="fix_deltawt_curve"/> | |
618 </dc:element> | |
619 </dc:for-each> | |
620 </waterlevels> | |
621 </dc:context> | |
622 </dc:for-each> | |
623 </waterlevels> | |
624 </dc:if> | |
625 </dc:filter> | |
626 </dc:macro> | |
627 | |
628 <dc:macro name="fix-derivate-curve"> | |
629 <dc:filter expr="$out_name = 'fix_derivate_curve'"> | |
630 <dc:if test="dc:has-result()"> | |
631 <waterlevels> | |
632 <dc:for-each> | |
633 <dc:context> | |
634 <dc:statement> | |
635 SELECT name AS facet_name, num AS facet_num, description AS facet_description | |
636 FROM facets | |
637 WHERE out_id = ${out_id} and name = 'fix_derivate_curve' | |
638 ORDER BY num ASC, name DESC | |
639 </dc:statement> | |
640 <waterlevels description="{$river} {$a_creation} {$collection_name}"> | |
641 <dc:for-each> | |
642 <dc:element name="${facet_name}"> | |
643 <dc:attribute name="description" value="${facet_description}"/> | |
644 <dc:attribute name="ids" value="${facet_num}"/> | |
645 <dc:attribute name="factory" value="fixanalysis"/> | |
646 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
647 <dc:attribute name="out" value="fix_derivate_curve"/> | |
648 </dc:element> | |
649 </dc:for-each> | |
650 </waterlevels> | |
651 </dc:context> | |
652 </dc:for-each> | |
653 </waterlevels> | |
654 </dc:if> | |
655 </dc:filter> | |
656 </dc:macro> | |
657 | |
658 <dc:macro name="fix-wq-curve"> | |
659 <dc:filter expr="$out_name = 'fix_wq_curve'"> | |
660 <dc:if test="dc:has-result()"> | |
661 <waterlevels> | |
662 <dc:for-each> | |
663 <dc:context> | |
664 <dc:statement> | |
665 SELECT name AS facet_name, num AS facet_num, description AS facet_description | |
666 FROM facets | |
667 WHERE out_id = ${out_id} and ( | |
668 name LIKE 'fix_sector_average_wq%' OR | |
669 name = 'fix_wq_curve' OR | |
670 name LIKE 'fix_analysis_events_wq%' OR | |
671 name LIKE 'fix_reference_events_wq%' ) | |
672 ORDER BY num ASC, name DESC | |
673 </dc:statement> | |
674 <waterlevels description="{$river} {$a_creation} {$collection_name}"> | |
675 <dc:for-each> | |
676 <dc:element name="${facet_name}"> | |
677 <dc:attribute name="description" value="${facet_description}"/> | |
678 <dc:attribute name="ids" value="${facet_num}"/> | |
679 <dc:attribute name="factory" value="fixanalysis"/> | |
680 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
681 <dc:attribute name="out" value="fix_wq_curve"/> | |
682 </dc:element> | |
683 </dc:for-each> | |
684 </waterlevels> | |
685 </dc:context> | |
686 </dc:for-each> | |
687 </waterlevels> | |
688 </dc:if> | |
689 </dc:filter> | |
690 </dc:macro> | |
691 | |
692 <dc:macro name="duration-curve"> | |
693 <dc:context> | |
694 <dc:statement> | |
695 SELECT a.gid AS aid, | |
696 f.id AS fid, | |
697 f.name AS facet_name, | |
698 f.num AS facet_num, | |
699 f.description AS facet_description | |
700 FROM outs AS o, facets AS f, artifacts AS a | |
701 WHERE | |
702 (f.name = 'duration_curve.q' OR f.name = 'duration_curve.w') AND | |
703 f.out_id = o.id AND | |
704 o.artifact_id = ${a_id} AND | |
705 a.id = ${a_id} | |
706 </dc:statement> | |
707 <dc:if test="dc:has-result()"> | 430 <dc:if test="dc:has-result()"> |
708 <computed_discharge_curves> | 431 <computed_discharge_curves> |
709 <dc:for-each> | 432 <dc:for-each> |
710 <dc:element name="${facet_name}"> | 433 <dc:element name="${facet_name}"> |
711 <dc:attribute name="description" value="${facet_description}"/> | 434 <dc:attribute name="description" value="${facet_description}"/> |
712 <dc:attribute name="factory" value="winfo"/> | 435 <dc:attribute name="factory" value="winfo"/> |
713 <dc:attribute name="artifact-id" value="${aid}"/> | 436 <dc:attribute name="artifact-id" value="${a_id}"/> |
714 <dc:attribute name="ids" value="${aid}"/> | 437 <dc:attribute name="ids" value="${a_id}"/> |
715 <dc:attribute name="out" value="duration_curve"/> | 438 <dc:attribute name="out" value="computed_discharge_curve"/> |
716 </dc:element> | 439 </dc:element> |
717 </dc:for-each> | 440 </dc:for-each> |
718 </computed_discharge_curves> | 441 </computed_discharge_curves> |
719 </dc:if> | 442 </dc:if> |
720 </dc:context> | 443 </dc:filter> |
721 </dc:macro> | 444 </dc:macro> |
722 | 445 |
723 <dc:comment>TODO doesnt work nicely for fix/wq-diags.</dc:comment> | 446 <dc:macro name="flood-map"> |
724 <dc:macro name="waterlevels-fix"> | 447 <dc:filter expr="$facet_name = 'floodmap.wsplgen'"> |
448 <dc:if test="dc:has-result()"> | |
449 <floodmap> | |
450 <dc:for-each> | |
451 <dc:element name="${facet_name}"> | |
452 <dc:attribute name="description" value="${facet_description}"/> | |
453 <dc:attribute name="factory" value="winfo"/> | |
454 <dc:attribute name="artifact-id" value="${a_id}"/> | |
455 <dc:attribute name="ids" value="${a_id}"/> | |
456 <dc:attribute name="out" value="floodmap"/> | |
457 </dc:element> | |
458 </dc:for-each> | |
459 </floodmap> | |
460 </dc:if> | |
461 </dc:filter> | |
462 </dc:macro> | |
463 | |
464 <dc:macro name="waterlevels"> | |
465 <dc:filter expr="$out_name = 'cross_section'"> | |
466 <dc:if test="dc:has-result()"> | |
467 <waterlevels> | |
468 <dc:group expr="concat($river, ' ', $a_creation)"> | |
469 <dc:comment>Aheinecke: Why is this grouping different from the rest?</dc:comment> | |
470 <longitudinal_section_columns description="{dc:group-key()}"> | |
471 <dc:for-each> | |
472 <dc:element name="${facet_name}"> | |
473 <dc:attribute name="description" value="${facet_description}"/> | |
474 <dc:attribute name="ids" value="${facet_num}"/> | |
475 <dc:attribute name="factory" value="winfo"/> | |
476 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
477 <dc:attribute name="out" value="cross_section"/> | |
478 </dc:element> | |
479 </dc:for-each> | |
480 </longitudinal_section_columns> | |
481 </dc:group> | |
482 </waterlevels> | |
483 </dc:if> | |
484 </dc:filter> | |
485 </dc:macro> | |
486 | |
487 <dc:macro name="longitudinal"> | |
725 <dc:filter expr="$out_name = 'longitudinal_section'"> | 488 <dc:filter expr="$out_name = 'longitudinal_section'"> |
726 <waterlevels> | 489 <dc:if test="dc:has-result()"> |
727 <dc:for-each> | 490 <waterlevels> |
728 <dc:context> | 491 <dc:group expr="$river $a_creation"> |
729 <dc:statement> | 492 <dc:comment>Aheinecke: Why is this grouping different from the rest?</dc:comment> |
730 SELECT name AS facet_name, num AS facet_num, description AS facet_description | 493 <longitudinal_section_columns description="{dc:group-key()}"> |
731 FROM facets | |
732 WHERE out_id = ${out_id} and name = 'longitudinal_section.w' | |
733 ORDER BY num ASC, name DESC | |
734 </dc:statement> | |
735 <waterlevels description="{$river} {$a_creation} {$collection_name}"> | |
736 <dc:for-each> | 494 <dc:for-each> |
737 <dc:element name="${facet_name}"> | 495 <dc:element name="${facet_name}"> |
738 <dc:attribute name="description" value="${facet_description}"/> | 496 <dc:attribute name="description" value="${facet_description}"/> |
739 <dc:attribute name="ids" value="${facet_num}"/> | 497 <dc:attribute name="ids" value="${facet_num}"/> |
740 <dc:attribute name="factory" value="winfo"/> | 498 <dc:attribute name="factory" value="winfo"/> |
741 <dc:attribute name="artifact-id" value="${a_gid}"/> | 499 <dc:attribute name="artifact-id" value="${a_gid}"/> |
742 <dc:attribute name="out" value="longitudinal_section"/> | 500 <dc:attribute name="out" value="longitudinal_section"/> |
743 </dc:element> | 501 </dc:element> |
744 </dc:for-each> | 502 </dc:for-each> |
503 </longitudinal_section_columns> | |
504 </dc:group> | |
505 </waterlevels> | |
506 </dc:if> | |
507 </dc:filter> | |
508 </dc:macro> | |
509 | |
510 <dc:macro name="longitudinal-section"> | |
511 <dc:filter expr="$out_name = 'fix_longitudinal_section_curve' and | |
512 (starts-with($facet_name, 'fix_deviation_ls') or | |
513 starts-with($facet_name, 'fix_sector_average_ls') or | |
514 starts-with($facet_name, 'fix_analysis_events_ls') or | |
515 starts-with($facet_name, 'fix_reference_events_ls'))"> | |
516 <dc:if test="dc:has-result()"> | |
517 <waterlevels> | |
518 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> | |
519 <waterlevels description="{dc:group-key()}"> | |
520 <dc:for-each> | |
521 <dc:element name="${facet_name}"> | |
522 <dc:attribute name="description" value="${facet_description}"/> | |
523 <dc:attribute name="ids" value="${facet_num}"/> | |
524 <dc:attribute name="factory" value="fixanalysis"/> | |
525 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
526 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> | |
527 </dc:element> | |
528 </dc:for-each> | |
745 </waterlevels> | 529 </waterlevels> |
746 </dc:context> | 530 </dc:group> |
531 </waterlevels> | |
532 </dc:if> | |
533 </dc:filter> | |
534 </dc:macro> | |
535 | |
536 <dc:macro name="delta-wt"> | |
537 <dc:filter expr="$out_name = 'fix_deltawt_curve' and | |
538 ($facet_name = 'fix_analysis_events_dwt' or | |
539 $facet_name = 'fix_analysis_periods_dwt' or | |
540 $facet_name = 'fix_reference_events_dwt' or | |
541 starts-with($facet_name, 'fix_deviation_dwt') or | |
542 starts-with($facet_name, 'fix_sector_average_dwt'))"> | |
543 <dc:if test="dc:has-result()"> | |
544 <waterlevels> | |
545 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> | |
546 <waterlevels description="{dc:group-key()}"> | |
547 <dc:for-each> | |
548 <dc:element name="${facet_name}"> | |
549 <dc:attribute name="description" value="${facet_description}"/> | |
550 <dc:attribute name="ids" value="${facet_num}"/> | |
551 <dc:attribute name="factory" value="fixanalysis"/> | |
552 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
553 <dc:attribute name="out" value="fix_deltawt_curve"/> | |
554 </dc:element> | |
555 </dc:for-each> | |
556 </waterlevels> | |
557 </dc:group> | |
558 </waterlevels> | |
559 </dc:if> | |
560 </dc:filter> | |
561 </dc:macro> | |
562 | |
563 <dc:macro name="delta-wt-ls"> | |
564 <dc:filter expr="$out_name = 'fix_deltawt_curve' and | |
565 (starts-with($facet_name, 'fix_sector_average_dwt') or | |
566 starts-with($facet_name, 'fix_deviation_dwt'))"> | |
567 <dc:if test="dc:has-result()"> | |
568 <waterlevels> | |
569 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> | |
570 <waterlevels description="{dc:group-key()}"> | |
571 <dc:for-each> | |
572 <dc:element name="${facet_name}"> | |
573 <dc:attribute name="description" value="${facet_description}"/> | |
574 <dc:attribute name="ids" value="${facet_num}"/> | |
575 <dc:attribute name="factory" value="fixanalysis"/> | |
576 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
577 <dc:attribute name="out" value="fix_deltawt_curve"/> | |
578 </dc:element> | |
579 </dc:for-each> | |
580 </waterlevels> | |
581 </dc:group> | |
582 </waterlevels> | |
583 </dc:if> | |
584 </dc:filter> | |
585 </dc:macro> | |
586 | |
587 <dc:macro name="fix-derivate-curve"> | |
588 <dc:filter expr="$out_name = 'fix_derivate_curve' and $facet_name = 'fix_derivate_curve'"> | |
589 <dc:if test="dc:has-result()"> | |
590 <waterlevels> | |
591 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> | |
592 <waterlevels description="{dc:group-key()}"> | |
593 <dc:for-each> | |
594 <dc:element name="${facet_name}"> | |
595 <dc:attribute name="description" value="${facet_description}"/> | |
596 <dc:attribute name="ids" value="${facet_num}"/> | |
597 <dc:attribute name="factory" value="fixanalysis"/> | |
598 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
599 <dc:attribute name="out" value="fix_derivate_curve"/> | |
600 </dc:element> | |
601 </dc:for-each> | |
602 </waterlevels> | |
603 </dc:group> | |
604 </waterlevels> | |
605 </dc:if> | |
606 </dc:filter> | |
607 </dc:macro> | |
608 | |
609 <dc:macro name="fix-wq-curve"> | |
610 <dc:filter expr="$out_name = 'fix_wq_curve' and | |
611 (starts-with($facet_name, 'fix_analysis_events_wq') or | |
612 starts-with($facet_name, 'fix_reference_events_wq') or | |
613 starts-with($facet_name, 'fix_sector_average_wq') or | |
614 $facet_name = 'fix_wq_curve')"> | |
615 <dc:if test="dc:has-result()"> | |
616 <waterlevels> | |
617 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> | |
618 <waterlevels description="{dc:group-key()}"> | |
619 <dc:for-each> | |
620 <dc:element name="${facet_name}"> | |
621 <dc:attribute name="description" value="${facet_description}"/> | |
622 <dc:attribute name="ids" value="${facet_num}"/> | |
623 <dc:attribute name="factory" value="fixanalysis"/> | |
624 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
625 <dc:attribute name="out" value="fix_wq_curve"/> | |
626 </dc:element> | |
627 </dc:for-each> | |
628 </waterlevels> | |
629 </dc:group> | |
630 </waterlevels> | |
631 </dc:if> | |
632 </dc:filter> | |
633 </dc:macro> | |
634 | |
635 <dc:macro name="duration-curve"> | |
636 <dc:filter expr="$facet_name = 'duration_curve.q' or $facet_name = 'duration_curve.w'"> | |
637 <dc:if test="dc:has-result()"> | |
638 <computed_discharge_curves> | |
639 <dc:for-each> | |
640 <dc:element name="${facet_name}"> | |
641 <dc:attribute name="description" value="${facet_description}"/> | |
642 <dc:attribute name="factory" value="winfo"/> | |
643 <dc:attribute name="artifact-id" value="${a_id}"/> | |
644 <dc:attribute name="ids" value="${a_id}"/> | |
645 <dc:attribute name="out" value="duration_curve"/> | |
646 </dc:element> | |
647 </dc:for-each> | |
648 </computed_discharge_curves> | |
649 </dc:if> | |
650 </dc:filter> | |
651 </dc:macro> | |
652 | |
653 <dc:comment>TODO doesnt work nicely for fix/wq-diags. Aheinecke (27.5.2013): Why?</dc:comment> | |
654 <dc:macro name="waterlevels-fix"> | |
655 <dc:filter expr="$out_name = 'longitudinal_section' and $facet_name = 'longitudinal_section.w'"> | |
656 <dc:if test="dc:has-result()"> | |
657 <waterlevels> | |
658 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> | |
659 <waterlevels description="{dc:group-key()}"> | |
660 <dc:for-each> | |
661 <dc:element name="${facet_name}"> | |
662 <dc:attribute name="description" value="${facet_description}"/> | |
663 <dc:attribute name="ids" value="${facet_num}"/> | |
664 <dc:attribute name="factory" value="winfo"/> | |
665 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
666 <dc:attribute name="out" value="longitudinal_section"/> | |
667 </dc:element> | |
668 </dc:for-each> | |
669 </waterlevels> | |
670 </dc:group> | |
671 </waterlevels> | |
672 </dc:if> | |
673 </dc:filter> | |
674 </dc:macro> | |
675 | |
676 <dc:macro name="floodmap-hws-user"> | |
677 <dc:comment>No grouping in this?</dc:comment> | |
678 <dc:filter expr="$out_name = 'floodmap' and $facet_name = 'floodmap.usershape'"> | |
679 <own-hws> | |
680 <dc:for-each> | |
681 <dc:element name="${facet_name}"> | |
682 <dc:attribute name="description" value="${facet_description}"/> | |
683 <dc:attribute name="ids" value="${facet_num}"/> | |
684 <dc:attribute name="factory" value="winfo"/> | |
685 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
686 <dc:attribute name="out" value="floodmap"/> | |
687 </dc:element> | |
747 </dc:for-each> | 688 </dc:for-each> |
748 </waterlevels> | 689 </own-hws> |
749 </dc:filter> | |
750 </dc:macro> | |
751 | |
752 <dc:macro name="floodmap-hws-user"> | |
753 <dc:filter expr="$out_name = 'floodmap'"> | |
754 <dc:for-each> | |
755 <dc:context> | |
756 <dc:statement> | |
757 SELECT name AS facet_name, | |
758 num AS facet_num, | |
759 description AS facet_description | |
760 FROM facets | |
761 WHERE out_id = ${out_id} AND name = 'floodmap.usershape' | |
762 ORDER BY num ASC, name DESC | |
763 </dc:statement> | |
764 <own-hws> | |
765 <dc:for-each> | |
766 <dc:element name="${facet_name}"> | |
767 <dc:attribute name="description" value="${facet_description}"/> | |
768 <dc:attribute name="ids" value="${facet_num}"/> | |
769 <dc:attribute name="factory" value="winfo"/> | |
770 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
771 <dc:attribute name="out" value="floodmap"/> | |
772 </dc:element> | |
773 </dc:for-each> | |
774 </own-hws> | |
775 </dc:context> | |
776 </dc:for-each> | |
777 </dc:filter> | 690 </dc:filter> |
778 </dc:macro> | 691 </dc:macro> |
779 | 692 |
780 <dc:macro name="bedquality-bed"> | 693 <dc:macro name="bedquality-bed"> |
781 <dc:filter expr="$out_name = 'bed_longitudinal_section'"> | 694 <dc:filter expr="$out_name = 'bed_longitudinal_section' and |
695 ($facet_name = 'bed_longitudinal_section.bed_diameter_toplayer' or | |
696 $facet_name = 'bed_longitudinal_section.bed_diameter_sublayer')"> | |
782 <dc:if test="dc:has-result()"> | 697 <dc:if test="dc:has-result()"> |
783 <bed_quality_bed> | 698 <bed_quality_bed> |
784 <dc:for-each> | 699 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
785 <quality-bed description="{$river} {$a_creation} {$collection_name}"> | 700 <quality-bed description="{dc:group-key()}"> |
786 <dc:context> | 701 <dc:for-each> |
787 <dc:statement> | 702 <dc:element name="${facet_name}"> |
788 SELECT a.gid AS aid, | 703 <dc:attribute name="factory" value="minfo"/> |
789 f.id AS fid, | 704 <dc:attribute name="description" value="${facet_description}"/> |
790 f.name AS facet_name, | 705 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
791 f.num AS facet_num, | 706 <dc:attribute name="artifact-id" value="${a_id}"/> |
792 f.description AS facet_description | 707 <dc:attribute name="out" value="bed_longitudinal_section"/> |
793 FROM outs AS o, facets AS f, artifacts AS a | 708 </dc:element> |
794 WHERE | 709 </dc:for-each> |
795 (f.name = 'bed_longitudinal_section.bed_diameter_toplayer' | |
796 OR f.name = 'bed_longitudinal_section.bed_diameter_sublayer') AND | |
797 f.out_id = o.id AND | |
798 o.artifact_id = ${a_id} AND | |
799 a.id = ${a_id} | |
800 </dc:statement> | |
801 <dc:for-each> | |
802 <dc:element name="${facet_name}"> | |
803 <dc:attribute name="factory" value="minfo"/> | |
804 <dc:attribute name="description" value="${facet_description}"/> | |
805 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
806 <dc:attribute name="artifact-id" value="${aid}"/> | |
807 <dc:attribute name="out" value="bed_longitudinal_section"/> | |
808 </dc:element> | |
809 </dc:for-each> | |
810 </dc:context> | |
811 </quality-bed> | 710 </quality-bed> |
812 </dc:for-each> | 711 </dc:group> |
813 </bed_quality_bed> | 712 </bed_quality_bed> |
814 </dc:if> | 713 </dc:if> |
815 </dc:filter> | 714 </dc:filter> |
816 </dc:macro> | 715 </dc:macro> |
817 | 716 |
818 <dc:macro name="bedquality-load"> | 717 <dc:macro name="bedquality-load"> |
819 <dc:filter expr="$out_name = 'bed_longitudinal_section'"> | 718 <dc:filter expr="$out_name = 'bed_longitudinal_section' and |
719 $facet_name = 'bed_longitudinal_section.bedload_diameter'"> | |
820 <dc:if test="dc:has-result()"> | 720 <dc:if test="dc:has-result()"> |
821 <bed_quality_load> | 721 <bed_quality_load> |
822 <dc:for-each> | 722 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
823 <quality-load description="{$river} {$a_creation} {$collection_name}"> | 723 <quality-load description="{dc:group-key()}"> |
824 <dc:context> | 724 <dc:for-each> |
825 <dc:statement> | 725 <dc:element name="${facet_name}"> |
826 SELECT a.gid AS aid, | 726 <dc:attribute name="factory" value="minfo"/> |
827 f.id AS fid, | 727 <dc:attribute name="description" value="${facet_description}"/> |
828 f.name AS facet_name, | 728 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
829 f.num AS facet_num, | 729 <dc:attribute name="artifact-id" value="${a_id}"/> |
830 f.description AS facet_description | 730 <dc:attribute name="out" value="bed_longitudinal_section"/> |
831 FROM outs AS o, facets AS f, artifacts AS a | 731 </dc:element> |
832 WHERE | 732 </dc:for-each> |
833 f.name = 'bed_longitudinal_section.bedload_diameter' AND | |
834 f.out_id = o.id AND | |
835 o.artifact_id = ${a_id} AND | |
836 a.id = ${a_id} | |
837 </dc:statement> | |
838 <dc:for-each> | |
839 <dc:element name="${facet_name}"> | |
840 <dc:attribute name="factory" value="minfo"/> | |
841 <dc:attribute name="description" value="${facet_description}"/> | |
842 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
843 <dc:attribute name="artifact-id" value="${aid}"/> | |
844 <dc:attribute name="out" value="bed_longitudinal_section"/> | |
845 </dc:element> | |
846 </dc:for-each> | |
847 </dc:context> | |
848 </quality-load> | 733 </quality-load> |
849 </dc:for-each> | 734 </dc:group> |
850 </bed_quality_load> | 735 </bed_quality_load> |
851 </dc:if> | 736 </dc:if> |
852 </dc:filter> | 737 </dc:filter> |
853 </dc:macro> | 738 </dc:macro> |
854 | 739 |
855 <dc:macro name="bedquality-density"> | 740 <dc:macro name="bedquality-density"> |
856 <dc:filter expr="$out_name = 'bed_longitudinal_section'"> | 741 <dc:filter expr="$out_name = 'bed_longitudinal_section' and |
742 ($facet_name = 'bed_longitudinal_section.sediment_density_toplayer' or | |
743 $facet_name = 'bed_longitudinal_section.sediment_density_sublayer')"> | |
857 <dc:if test="dc:has-result()"> | 744 <dc:if test="dc:has-result()"> |
858 <bed_quality_density> | 745 <bed_quality_density> |
859 <dc:for-each> | 746 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
860 <density description="{$river} {$a_creation} {$collection_name}"> | 747 <density description="{dc:group-key()}"> |
861 <dc:context> | 748 <dc:for-each> |
862 <dc:statement> | 749 <dc:element name="${facet_name}"> |
863 SELECT a.gid AS aid, | 750 <dc:attribute name="factory" value="minfo"/> |
864 f.id AS fid, | 751 <dc:attribute name="description" value="${facet_description}"/> |
865 f.name AS facet_name, | 752 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
866 f.num AS facet_num, | 753 <dc:attribute name="artifact-id" value="${a_id}"/> |
867 f.description AS facet_description | 754 <dc:attribute name="out" value="bed_longitudinal_section"/> |
868 FROM outs AS o, facets AS f, artifacts AS a | 755 </dc:element> |
869 WHERE | 756 </dc:for-each> |
870 (f.name = 'bed_longitudinal_section.sediment_density_toplayer' OR | |
871 f.name = 'bed_longitudinal_section.sediment_density_sublayer') AND | |
872 f.out_id = o.id AND | |
873 o.artifact_id = ${a_id} AND | |
874 a.id = ${a_id} | |
875 </dc:statement> | |
876 <dc:for-each> | |
877 <dc:element name="${facet_name}"> | |
878 <dc:attribute name="factory" value="minfo"/> | |
879 <dc:attribute name="description" value="${facet_description}"/> | |
880 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
881 <dc:attribute name="artifact-id" value="${aid}"/> | |
882 <dc:attribute name="out" value="bed_longitudinal_section"/> | |
883 </dc:element> | |
884 </dc:for-each> | |
885 </dc:context> | |
886 </density> | 757 </density> |
887 </dc:for-each> | 758 </dc:group> |
888 </bed_quality_density> | 759 </bed_quality_density> |
889 </dc:if> | 760 </dc:if> |
890 </dc:filter> | 761 </dc:filter> |
891 </dc:macro> | 762 </dc:macro> |
892 | 763 |
893 <dc:macro name="bedquality-porosity"> | 764 <dc:macro name="bedquality-porosity"> |
894 <dc:filter expr="$out_name = 'bed_longitudinal_section'"> | 765 <dc:filter expr="$out_name = 'bed_longitudinal_section' and |
766 ($facet_name = 'bed_longitudinal_section.porosity_toplayer' or | |
767 $facet_name = 'bed_longitudinal_section.porosity_sublayer')"> | |
895 <dc:if test="dc:has-result()"> | 768 <dc:if test="dc:has-result()"> |
896 <bed_quality_porosity> | 769 <bed_quality_porosity> |
897 <dc:for-each> | 770 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
898 <porosity description="{$river} {$a_creation} {$collection_name}"> | 771 <porosity description="{dc:group-key()}"> |
899 <dc:context> | 772 <dc:for-each> |
900 <dc:statement> | 773 <dc:element name="${facet_name}"> |
901 SELECT a.gid AS aid, | 774 <dc:attribute name="factory" value="minfo"/> |
902 f.id AS fid, | 775 <dc:attribute name="description" value="${facet_description}"/> |
903 f.name AS facet_name, | 776 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
904 f.num AS facet_num, | 777 <dc:attribute name="artifact-id" value="${a_id}"/> |
905 f.description AS facet_description | 778 <dc:attribute name="out" value="bed_longitudinal_section"/> |
906 FROM outs AS o, facets AS f, artifacts AS a | 779 </dc:element> |
907 WHERE | 780 </dc:for-each> |
908 (f.name = 'bed_longitudinal_section.porosity_toplayer' OR | |
909 f.name = 'bed_longitudinal_section.porosity_sublayer') AND | |
910 f.out_id = o.id AND | |
911 o.artifact_id = ${a_id} AND | |
912 a.id = ${a_id} | |
913 </dc:statement> | |
914 <dc:for-each> | |
915 <dc:element name="${facet_name}"> | |
916 <dc:attribute name="factory" value="minfo"/> | |
917 <dc:attribute name="description" value="${facet_description}"/> | |
918 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
919 <dc:attribute name="artifact-id" value="${aid}"/> | |
920 <dc:attribute name="out" value="bed_longitudinal_section"/> | |
921 </dc:element> | |
922 </dc:for-each> | |
923 </dc:context> | |
924 </porosity> | 781 </porosity> |
925 </dc:for-each> | 782 </dc:group> |
926 </bed_quality_porosity> | 783 </bed_quality_porosity> |
927 </dc:if> | 784 </dc:if> |
928 </dc:filter> | 785 </dc:filter> |
929 </dc:macro> | 786 </dc:macro> |
930 | 787 |
931 <dc:macro name="flow-velocity"> | 788 <dc:macro name="flow-velocity"> |
932 <dc:filter expr="$out_name = 'flow_velocity'"> | 789 <dc:filter expr="$out_name = 'flow_velocity' and |
790 ($facet_name = 'flow_velocity.totalchannel' or | |
791 $facet_name = 'flow_velocity.mainchannel' or | |
792 $facet_name = 'flow_velocity.totalchannel.filtered' or | |
793 $facet_name = 'flow_velocity.mainchannel.filtered')"> | |
933 <dc:if test="dc:has-result()"> | 794 <dc:if test="dc:has-result()"> |
934 <flow-velocity> | 795 <flow-velocity> |
935 <dc:for-each> | 796 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
936 <flow description="{$river} {$a_creation} {$collection_name}"> | 797 <flow description="{dc:group-key()}"> |
937 <dc:context> | 798 <dc:for-each> |
938 <dc:statement> | 799 <dc:element name="${facet_name}"> |
939 SELECT a.gid AS aid, | 800 <dc:attribute name="factory" value="minfo"/> |
940 f.id AS fid, | 801 <dc:attribute name="description" value="${facet_description}"/> |
941 f.name AS facet_name, | 802 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
942 f.num AS facet_num, | 803 <dc:attribute name="artifact-id" value="${a_id}"/> |
943 f.description AS facet_description | 804 <dc:attribute name="out" value="flow_velocity"/> |
944 FROM outs AS o, facets AS f, artifacts AS a | 805 </dc:element> |
945 WHERE | 806 </dc:for-each> |
946 (f.name = 'flow_velocity.totalchannel' OR | |
947 f.name = 'flow_velocity.mainchannel' OR | |
948 f.name = 'flow_velocity.totalchannel.filtered' OR | |
949 f.name = 'flow_velocity.mainchannel.filtered') AND | |
950 f.out_id = o.id AND | |
951 o.artifact_id = ${a_id} AND | |
952 a.id = ${a_id} | |
953 </dc:statement> | |
954 <dc:for-each> | |
955 <dc:element name="${facet_name}"> | |
956 <dc:attribute name="factory" value="minfo"/> | |
957 <dc:attribute name="description" value="${facet_description}"/> | |
958 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
959 <dc:attribute name="artifact-id" value="${aid}"/> | |
960 <dc:attribute name="out" value="flow_velocity"/> | |
961 </dc:element> | |
962 </dc:for-each> | |
963 </dc:context> | |
964 </flow> | 807 </flow> |
965 </dc:for-each> | 808 </dc:group> |
966 </flow-velocity> | 809 </flow-velocity> |
967 </dc:if> | 810 </dc:if> |
968 </dc:filter> | 811 </dc:filter> |
969 </dc:macro> | 812 </dc:macro> |
970 | 813 |
971 <dc:macro name="sediment-load"> | 814 <dc:macro name="sediment-load"> |
972 <dc:filter expr="$out_name = 'sedimentload_ls'"> | 815 <dc:filter expr="$out_name = 'sedimentload_ls' and starts-with($facet_name, 'sedimentload')"> |
973 <dc:if test="dc:has-result()"> | 816 <dc:if test="dc:has-result()"> |
974 <sediment-load> | 817 <sediment-load> |
975 <dc:for-each> | 818 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
976 <load description="{$river} {$a_creation} {$collection_name}"> | 819 <load description="{dc:group-key()}"> |
977 <dc:context> | 820 <dc:for-each> |
978 <dc:statement> | 821 <dc:element name="${facet_name}"> |
979 SELECT a.gid AS aid, | 822 <dc:attribute name="factory" value="minfo"/> |
980 f.id AS fid, | 823 <dc:attribute name="description" value="${facet_description}"/> |
981 f.name AS facet_name, | 824 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
982 f.num AS facet_num, | 825 <dc:attribute name="artifact-id" value="${a_id}"/> |
983 f.description AS facet_description | 826 <dc:attribute name="out" value="sedimentload_ls"/> |
984 FROM outs AS o, facets AS f, artifacts AS a | 827 </dc:element> |
985 WHERE f.name LIKE 'sedimentload%' AND | 828 </dc:for-each> |
986 f.out_id = o.id AND | |
987 o.artifact_id = ${a_id} AND | |
988 a.id = ${a_id} | |
989 </dc:statement> | |
990 <dc:for-each> | |
991 <dc:element name="${facet_name}"> | |
992 <dc:attribute name="factory" value="minfo"/> | |
993 <dc:attribute name="description" value="${facet_description}"/> | |
994 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
995 <dc:attribute name="artifact-id" value="${aid}"/> | |
996 <dc:attribute name="out" value="sedimentload_ls"/> | |
997 </dc:element> | |
998 </dc:for-each> | |
999 </dc:context> | |
1000 </load> | 829 </load> |
1001 </dc:for-each> | 830 </dc:group> |
1002 </sediment-load> | 831 </sediment-load> |
1003 </dc:if> | 832 </dc:if> |
1004 </dc:filter> | 833 </dc:filter> |
1005 </dc:macro> | 834 </dc:macro> |
1006 | 835 |
1007 <dc:macro name="bedheight-differences"> | 836 <dc:macro name="bedheight-differences"> |
1008 <dc:filter expr="$out_name = 'bed_difference_year' or $out_name = 'bed_difference_epoch'"> | 837 <dc:filter expr="($out_name = 'bed_difference_year' or $out_name = 'bed_difference_epoch') and |
838 (starts-with($facet_name, 'bedheight_difference.year') or starts-with($facet_name, 'bedheight_difference.epoch'))"> | |
1009 <dc:if test="dc:has-result()"> | 839 <dc:if test="dc:has-result()"> |
1010 <bedheight-differences> | 840 <bedheight-differences> |
1011 <dc:for-each> | 841 <dc:group expr="concat($river, ' ', $a_creation, ' ', $collection_name)"> |
1012 <difference description="{$river} {$a_creation} {$collection_name}"> | 842 <difference description="{dc:group-key()}"> |
1013 <dc:context> | 843 <dc:for-each> |
1014 <dc:statement> | 844 <dc:element name="${facet_name}"> |
1015 SELECT a.gid AS aid, | 845 <dc:attribute name="factory" value="minfo"/> |
1016 f.id AS fid, | 846 <dc:attribute name="description" value="${facet_description}"/> |
1017 f.name AS facet_name, | 847 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
1018 f.num AS facet_num, | 848 <dc:attribute name="artifact-id" value="${a_id}"/> |
1019 f.description AS facet_description | 849 <dc:attribute name="out" value="${out}"/> |
1020 FROM outs AS o, facets AS f, artifacts AS a | 850 </dc:element> |
1021 WHERE (f.name LIKE 'bedheight_difference.year%' OR | 851 </dc:for-each> |
1022 f.name LIKE 'bedheight_difference.epoch%') AND | |
1023 f.out_id = o.id AND | |
1024 o.artifact_id = ${a_id} AND | |
1025 a.id = ${a_id} | |
1026 </dc:statement> | |
1027 <dc:for-each> | |
1028 <dc:element name="${facet_name}"> | |
1029 <dc:attribute name="factory" value="minfo"/> | |
1030 <dc:attribute name="description" value="${facet_description}"/> | |
1031 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
1032 <dc:attribute name="artifact-id" value="${aid}"/> | |
1033 <dc:choose> | |
1034 <dc:when test="dc:contains($o_name, 'bed_difference_year')"> | |
1035 <dc:attribute name="out" value="bed_difference_year"/> | |
1036 </dc:when> | |
1037 <dc:otherwise> | |
1038 <dc:attribute name="out" value="bed_difference_epoch"/> | |
1039 </dc:otherwise> | |
1040 </dc:choose> | |
1041 </dc:element> | |
1042 </dc:for-each> | |
1043 </dc:context> | |
1044 </difference> | 852 </difference> |
1045 </dc:for-each> | 853 </dc:group> |
1046 </bedheight-differences> | 854 </bedheight-differences> |
1047 </dc:if> | 855 </dc:if> |
1048 </dc:filter> | 856 </dc:filter> |
1049 </dc:macro> | 857 </dc:macro> |
1050 | 858 |
1051 <dc:macro name="waterlevels-discharge"> | 859 <dc:macro name="waterlevels-discharge"> |
1052 <dc:filter expr="$out_name = 'discharge_longitudinal_section'"> | 860 <dc:filter expr="$out_name = 'discharge_longitudinal_section' and $facet_name = 'discharge_longitudinal_section.w"> |
1053 <dc:if test="dc:has-result()"> | 861 <dc:if test="dc:has-result()"> |
1054 <waterlevels-discharge> | 862 <waterlevels-discharge> |
1055 <dc:for-each> | 863 <dc:group expr="concat($oid, ' ', $river, ' ', $a_id, ' ', $a_creation, ' ', $collection_name)"> |
1056 <discharge description="{$oid} {$river} {$a_id} {$a_creation} {$collection_name}"> | 864 <discharge description="{dc:group-key()}"> |
1057 <dc:context> | 865 <dc:for-each> |
1058 <dc:statement> | 866 <dc:element name="${facet_name}"> |
1059 SELECT a.gid AS aid, | 867 <dc:attribute name="factory" value="winfo"/> |
1060 f.id AS fid, | 868 <dc:attribute name="description" value="${facet_description}"/> |
1061 f.name AS facet_name, | 869 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> |
1062 f.num AS facet_num, | 870 <dc:attribute name="artifact-id" value="${a_id}"/> |
1063 f.description AS facet_description | 871 <dc:attribute name="out" value="longitudinal_section"/> |
1064 FROM outs AS o, facets AS f, artifacts AS a | 872 </dc:element> |
1065 WHERE f.name = 'discharge_longitudinal_section.w' AND | 873 </dc:for-each> |
1066 f.out_id = o.id AND | |
1067 o.artifact_id = ${a_id} AND | |
1068 a.id = ${a_id} | |
1069 </dc:statement> | |
1070 <dc:for-each> | |
1071 <dc:element name="${facet_name}"> | |
1072 <dc:attribute name="factory" value="winfo"/> | |
1073 <dc:attribute name="description" value="${facet_description}"/> | |
1074 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> | |
1075 <dc:attribute name="artifact-id" value="${aid}"/> | |
1076 <dc:attribute name="out" value="longitudinal_section"/> | |
1077 </dc:element> | |
1078 </dc:for-each> | |
1079 </dc:context> | |
1080 </discharge> | 874 </discharge> |
1081 </dc:for-each> | 875 </dc:group> |
1082 </waterlevels-discharge> | 876 </waterlevels-discharge> |
1083 </dc:if> | 877 </dc:if> |
1084 </dc:filter> | 878 </dc:filter> |
1085 </dc:macro> | 879 </dc:macro> |
1086 <!-- Macros to load system data --> | 880 <!-- Macros to load system data --> |
2519 w.id AS wst_id, | 2313 w.id AS wst_id, |
2520 wc.id AS wst_column_id, | 2314 wc.id AS wst_column_id, |
2521 wc.position AS wst_column_position, | 2315 wc.position AS wst_column_position, |
2522 wc.description AS info, | 2316 wc.description AS info, |
2523 w.description AS wst_description, | 2317 w.description AS wst_description, |
2524 wc.name AS wst_column_name, | 2318 COALESCE(wc.name, '') AS wst_column_name, |
2525 wr.a AS deffrom, | 2319 wr.a AS deffrom, |
2526 wr.b AS defto | 2320 wr.b AS defto |
2527 FROM wst_columns wc | 2321 FROM wst_columns wc |
2528 JOIN wsts w ON wc.wst_id = w.id | 2322 JOIN wsts w ON wc.wst_id = w.id |
2529 JOIN wst_ranges wr ON wc.id = wr.wst_column_id | 2323 JOIN wst_ranges wr ON wc.id = wr.wst_column_id |
2546 COALESCE(ma.ld_mode, '') AS ld_m, | 2340 COALESCE(ma.ld_mode, '') AS ld_m, |
2547 COALESCE(ma.ld_locations, '') AS ld_l, | 2341 COALESCE(ma.ld_locations, '') AS ld_l, |
2548 COALESCE(ma.ld_from, '') AS ld_f, | 2342 COALESCE(ma.ld_from, '') AS ld_f, |
2549 COALESCE(ma.ld_to, '') AS ld_t, | 2343 COALESCE(ma.ld_to, '') AS ld_t, |
2550 o.name AS out_name, | 2344 o.name AS out_name, |
2551 o.id AS out_id | 2345 o.id AS out_id, |
2346 f.name AS facet_name, | |
2347 f.num AS facet_num, | |
2348 f.description AS facet_description, | |
2349 f.id AS fid | |
2552 FROM users u | 2350 FROM users u |
2553 JOIN collections c ON c.user_id = u.id | 2351 JOIN collections c ON c.user_id = u.id |
2554 JOIN master_artifacts_range ma ON ma.collection_id = c.id | 2352 JOIN master_artifacts_range ma ON ma.collection_id = c.id |
2555 JOIN outs o ON o.artifact_id = ma.id | 2353 JOIN outs o ON o.artifact_id = ma.id |
2354 JOIN facets f ON f.out_id = o.id | |
2556 WHERE u.gid = CAST(${user-id} AS UUID) | 2355 WHERE u.gid = CAST(${user-id} AS UUID) |
2557 AND ma.gid <> CAST(${artifact-id} AS uuid) | 2356 AND ma.gid <> CAST(${artifact-id} AS uuid) |
2558 AND EXISTS ( | 2357 AND EXISTS ( |
2559 SELECT id | 2358 SELECT id |
2560 FROM artifact_data ad | 2359 FROM artifact_data ad |