Mercurial > dive4elements > river
comparison flys-artifacts/doc/conf/meta-data.xml @ 1879:d7369f395a80
Somewhat unified user-part of dc config.
flys-artifacts/trunk@3238 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 11 Nov 2011 11:59:41 +0000 |
parents | 4fb81eb8b45b |
children | ebd16028efa3 |
comparison
equal
deleted
inserted
replaced
1878:84cf67a2a19e | 1879:d7369f395a80 |
---|---|
585 <dc:comment> | 585 <dc:comment> |
586 User specific part | 586 User specific part |
587 ------------------ | 587 ------------------ |
588 </dc:comment> | 588 </dc:comment> |
589 <dc:when test="dc:contains($parameters, 'user-id')"> | 589 <dc:when test="dc:contains($parameters, 'user-id')"> |
590 <dc:comment> | 590 |
591 Show diffferences if longitudinal sections are there. | 591 <old_calculations> |
592 ----------------------------------------------------- | 592 <dc:context connection="user"> |
593 </dc:comment> | 593 <dc:comment> |
594 <dc:choose> | 594 Get the user and collection-id. |
595 <dc:when test="dc:contains($artifact-outs, 'longitudinal_section')"> | 595 </dc:comment> |
596 <differences> | |
597 <dc:context> | |
598 <dc:statement> | 596 <dc:statement> |
599 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | 597 SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name |
600 FROM outs as o, facets as f, artifacts as a | 598 FROM collections c JOIN users u ON c.user_id = u.id |
601 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = a.id; | 599 WHERE u.gid = CAST(${user-id} AS uuid) |
600 ORDER BY c.creation DESC | |
602 </dc:statement> | 601 </dc:statement> |
602 | |
603 | |
604 <dc:comment> | |
605 SHOW W-DIFFERENCES | |
606 </dc:comment> | |
607 | |
608 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section')))"> | |
609 <differences> | |
603 <dc:elements> | 610 <dc:elements> |
604 <dc:element name="${facet_name}"> | 611 <dc:context> |
605 <dc:attribute name="description" value="${facet_description}"/> | 612 <dc:statement> |
606 <dc:attribute name="factory" value="winfo"/> | 613 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation |
607 <dc:attribute name="artifact-id" value="${aid}"/> | 614 FROM master_artifacts m |
608 <dc:attribute name="ids" value="${aid}"/> | 615 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) |
609 <dc:attribute name="out" value="w_differences"/> | 616 AND EXISTS ( |
610 </dc:element> | 617 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) |
618 </dc:statement> | |
619 <dc:elements> | |
620 <dc:context> | |
621 <dc:statement> | |
622 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
623 FROM outs as o, facets as f, artifacts as a | |
624 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
625 </dc:statement> | |
626 <dc:elements> | |
627 <dc:element name="${facet_name}"> | |
628 <dc:attribute name="description" value="${facet_description}"/> | |
629 <dc:attribute name="factory" value="winfo"/> | |
630 <dc:attribute name="artifact-id" value="${aid}"/> | |
631 <dc:attribute name="ids" value="${aid}"/> | |
632 <dc:attribute name="out" value="w_differences"/> | |
633 </dc:element> | |
634 </dc:elements> | |
635 </dc:context> | |
636 </dc:elements> | |
637 </dc:context> | |
611 </dc:elements> | 638 </dc:elements> |
612 </dc:context> | 639 </differences> |
613 </differences> | 640 </dc:if> |
614 </dc:when> | 641 |
615 </dc:choose> | 642 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> |
616 <old_calculations> | 643 <waterlevels> |
617 <dc:context connection="user"> | 644 <dc:elements> |
618 <dc:statement>SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name | 645 <dc:context> |
619 FROM collections c JOIN users u ON c.user_id = u.id | 646 <dc:statement> |
620 WHERE u.gid = CAST(${user-id} AS uuid) | 647 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation |
621 ORDER BY c.creation DESC | 648 FROM master_artifacts m |
622 </dc:statement> | 649 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) |
623 <dc:elements> | 650 AND EXISTS ( |
624 <dc:comment><!-- | 651 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) |
625 <hello_collection><dc:attribute name="description" value="Collection: id=${collection_id} name='${collection_name}'"/></hello_collection> | 652 </dc:statement> |
626 --></dc:comment> | 653 <dc:elements> |
627 <dc:context> | 654 <dc:context> |
628 <dc:statement>SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | 655 <dc:statement> |
629 FROM master_artifacts m | 656 SELECT id AS out_id |
630 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | 657 FROM outs |
631 AND EXISTS ( | 658 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' |
632 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | 659 </dc:statement> |
633 </dc:statement> | 660 <dc:elements> |
634 <dc:elements> | 661 <dc:context> |
635 <dc:comment><!-- | 662 <dc:statement> |
636 <hello_artifact><dc:attribute name="description" value="Artifact UUID: ${a_gid}"/></hello_artifact> | 663 SELECT name AS facet_name, num as facet_num, description AS facet_description |
637 --></dc:comment> | 664 FROM facets |
638 <dc:choose> | 665 WHERE out_id = ${out_id} |
639 | 666 ORDER BY num ASC, name DESC |
640 | 667 </dc:statement> |
641 <dc:comment> | 668 <longitudinal_section_columns> |
642 Import longitudinal sections only if the ${artifact-out} is defined as 'longitudinal_section' | 669 <dc:attribute name="description" value="${river} ${a_creation}"/> |
643 --------------------------------------------------------------------------------------------- | 670 <dc:elements> |
644 </dc:comment> | 671 <dc:element name="${facet_name}"> |
645 <dc:when test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> | 672 <dc:attribute name="description" value="${facet_description}"/> |
646 <dc:context> | 673 <dc:attribute name="ids" value="${facet_num}"/> |
647 <dc:statement> | 674 <dc:attribute name="factory" value="winfo"/> |
648 SELECT id AS out_id | 675 <dc:attribute name="artifact-id" value="${a_gid}"/> |
649 FROM outs | 676 <dc:attribute name="out" value="longitudinal_section"/> |
650 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' | 677 </dc:element> |
651 </dc:statement> | 678 </dc:elements> |
652 <dc:elements> | 679 </longitudinal_section_columns> |
653 <dc:context> | 680 </dc:context> |
654 <dc:statement> | 681 </dc:elements> |
655 SELECT name AS facet_name, num as facet_num, description AS facet_description | 682 </dc:context> |
656 FROM facets | 683 </dc:elements> |
657 WHERE out_id = ${out_id} | 684 </dc:context> |
658 ORDER BY num ASC, name DESC | 685 </dc:elements> |
659 </dc:statement> | 686 </waterlevels> |
660 <longitudinal_section_columns> | 687 </dc:if> |
661 <dc:attribute name="description" value="${river} ${a_creation}"/> | 688 |
662 <dc:elements> | 689 <dc:comment> |
663 <dc:element name="${facet_name}"> | 690 WATERLEVELS - ONLY SHOW Ws |
664 <dc:attribute name="description" value="${facet_description}"/> | 691 </dc:comment> |
665 <dc:attribute name="ids" value="${facet_num}"/> | 692 |
666 <dc:attribute name="factory" value="winfo"/> | 693 <dc:if test="dc:contains($artifact-outs, 'waterlevels')"> |
667 <dc:attribute name="artifact-id" value="${a_gid}"/> | 694 <waterlevels> |
668 <dc:attribute name="out" value="longitudinal_section"/> | 695 <dc:elements> |
669 </dc:element> | 696 <dc:context> |
670 </dc:elements> | 697 <dc:statement> |
671 </longitudinal_section_columns> | 698 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation |
672 </dc:context> | 699 FROM master_artifacts m |
673 </dc:elements> | 700 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) |
674 </dc:context> | 701 AND EXISTS ( |
675 </dc:when> | 702 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) |
676 <dc:comment> | 703 </dc:statement> |
677 Import of longitudinal sections finished | 704 <dc:elements> |
678 </dc:comment> | 705 |
679 | 706 <dc:context> |
680 | 707 <dc:statement> |
681 <dc:comment> | 708 SELECT id AS out_id |
682 Import Waterlevels only if the ${artifact-out} is defined as 'waterlevels' | 709 FROM outs |
683 -------------------------------------------------------------------------- | 710 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' |
684 </dc:comment> | 711 </dc:statement> |
685 <dc:when test="dc:contains($artifact-outs, 'waterlevels')"> | 712 <dc:elements> |
686 <dc:context> | 713 <dc:context> |
687 <dc:statement> | 714 <dc:statement> |
688 SELECT id AS out_id | 715 SELECT name AS facet_name, num as facet_num, description AS facet_description |
689 FROM outs | 716 FROM facets |
690 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' | 717 WHERE out_id = ${out_id} and name = 'longitudinal_section.w' |
691 </dc:statement> | 718 ORDER BY num ASC, name DESC |
692 <dc:elements> | 719 </dc:statement> |
693 <dc:context> | 720 <waterlevels> |
694 <dc:statement> | 721 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> |
695 SELECT name AS facet_name, num as facet_num, description AS facet_description | 722 <dc:elements> |
696 FROM facets | 723 <dc:element name="${facet_name}"> |
697 WHERE out_id = ${out_id} and name = 'longitudinal_section.w' | 724 <dc:attribute name="description" value="${facet_description}"/> |
698 ORDER BY num ASC, name DESC | 725 <dc:attribute name="ids" value="${facet_num}"/> |
699 </dc:statement> | 726 <dc:attribute name="factory" value="winfo"/> |
700 <waterlevels> | 727 <dc:attribute name="artifact-id" value="${a_gid}"/> |
701 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | 728 <dc:attribute name="out" value="longitudinal_section"/> |
702 <dc:elements> | 729 </dc:element> |
703 <dc:element name="${facet_name}"> | 730 </dc:elements> |
704 <dc:attribute name="description" value="${facet_description}"/> | 731 </waterlevels> |
705 <dc:attribute name="ids" value="${facet_num}"/> | 732 </dc:context> |
706 <dc:attribute name="factory" value="winfo"/> | 733 </dc:elements> |
707 <dc:attribute name="artifact-id" value="${a_gid}"/> | 734 </dc:context> |
708 <dc:attribute name="out" value="longitudinal_section"/> | 735 </dc:elements> |
709 </dc:element> | 736 </dc:context> |
710 </dc:elements> | 737 </dc:elements> |
711 </waterlevels> | 738 </waterlevels> |
712 </dc:context> | 739 </dc:if> |
713 </dc:elements> | 740 |
714 </dc:context> | 741 </dc:context> |
715 </dc:when> | |
716 <dc:comment> | |
717 Import of waterlevels finished | |
718 </dc:comment> | |
719 | |
720 </dc:choose> | |
721 </dc:elements> | |
722 </dc:context> | |
723 </dc:elements> | |
724 </dc:context> | |
725 </old_calculations> | 742 </old_calculations> |
726 | 743 |
727 | 744 |
728 <dc:comment> | 745 <dc:comment> |
729 Include System specific part when 'load-system' is in parameters. | 746 Include System specific part when 'load-system' is in parameters. |