Showing
1 changed file
with
131 additions
and
85 deletions
... | @@ -54,6 +54,11 @@ arg:name | ... | @@ -54,6 +54,11 @@ arg:name |
54 | rdfs:label "name"^^xsd:string ; | 54 | rdfs:label "name"^^xsd:string ; |
55 | rdfs:subPropertyOf sp:arg . | 55 | rdfs:subPropertyOf sp:arg . |
56 | 56 | ||
57 | +arg:owner | ||
58 | + rdf:type rdf:Property ; | ||
59 | + rdfs:label "owner"^^xsd:string ; | ||
60 | + rdfs:subPropertyOf sp:arg . | ||
61 | + | ||
57 | arg:report | 62 | arg:report |
58 | rdf:type rdf:Property ; | 63 | rdf:type rdf:Property ; |
59 | rdfs:label "report"^^xsd:string ; | 64 | rdfs:label "report"^^xsd:string ; |
... | @@ -111,15 +116,15 @@ arg:wellName | ... | @@ -111,15 +116,15 @@ arg:wellName |
111 | ] ; | 116 | ] ; |
112 | spin:constraint | 117 | spin:constraint |
113 | [ rdf:type spl:Argument ; | 118 | [ rdf:type spl:Argument ; |
114 | - rdfs:comment "The value to match against."^^xsd:string ; | ||
115 | - spl:predicate sp:arg1 | ||
116 | - ] ; | ||
117 | - spin:constraint | ||
118 | - [ rdf:type spl:Argument ; | ||
119 | rdfs:comment "The property that must be used in the result resource."^^xsd:string ; | 119 | rdfs:comment "The property that must be used in the result resource."^^xsd:string ; |
120 | spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; | 120 | spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; |
121 | spl:valueType rdf:Property | 121 | spl:valueType rdf:Property |
122 | ] ; | 122 | ] ; |
123 | + spin:constraint | ||
124 | + [ rdf:type spl:Argument ; | ||
125 | + rdfs:comment "The value to match against."^^xsd:string ; | ||
126 | + spl:predicate sp:arg1 | ||
127 | + ] ; | ||
123 | spin:returnType rdfs:Resource . | 128 | spin:returnType rdfs:Resource . |
124 | 129 | ||
125 | npdata:npd | 130 | npdata:npd |
... | @@ -406,15 +411,15 @@ rhspin:WDRTableTemplates | ... | @@ -406,15 +411,15 @@ rhspin:WDRTableTemplates |
406 | spin:abstract "true"^^xsd:boolean ; | 411 | spin:abstract "true"^^xsd:boolean ; |
407 | spin:constraint | 412 | spin:constraint |
408 | [ rdf:type spl:Argument ; | 413 | [ rdf:type spl:Argument ; |
409 | - rdfs:comment "The start date of the reporting week."^^xsd:string ; | ||
410 | - spl:predicate arg:startDate ; | ||
411 | - spl:valueType xsd:date | ||
412 | - ] ; | ||
413 | - spin:constraint | ||
414 | - [ rdf:type spl:Argument ; | ||
415 | rdfs:comment "The DDR that serves as root of the query."^^xsd:string ; | 414 | rdfs:comment "The DDR that serves as root of the query."^^xsd:string ; |
416 | spl:predicate arg:wellBore ; | 415 | spl:predicate arg:wellBore ; |
417 | spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | 416 | spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> |
417 | + ] ; | ||
418 | + spin:constraint | ||
419 | + [ rdf:type spl:Argument ; | ||
420 | + rdfs:comment "The start date of the reporting week."^^xsd:string ; | ||
421 | + spl:predicate arg:startDate ; | ||
422 | + spl:valueType xsd:date | ||
418 | ] . | 423 | ] . |
419 | 424 | ||
420 | rhspin:baaById | 425 | rhspin:baaById |
... | @@ -673,6 +678,47 @@ rhspin:companyWithName | ... | @@ -673,6 +678,47 @@ rhspin:companyWithName |
673 | ] ; | 678 | ] ; |
674 | spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> . | 679 | spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> . |
675 | 680 | ||
681 | +rhspin:currentUserHasAccessToOwner | ||
682 | + rdf:type spin:Function ; | ||
683 | + rdfs:comment "Tests whether the currently logged in user is working for a company that has a given licence or BAA. This function is used by the download service to validate access privileges."^^xsd:string ; | ||
684 | + rdfs:label "current user has access to owner"^^xsd:string ; | ||
685 | + rdfs:subClassOf spin:Functions ; | ||
686 | + spin:body | ||
687 | + [ rdf:type sp:Ask ; | ||
688 | + sp:where ([ rdf:type sp:Bind ; | ||
689 | + sp:expression | ||
690 | + [ rdf:type rhspin:companyName | ||
691 | + ] ; | ||
692 | + sp:variable | ||
693 | + [ sp:varName "companyName"^^xsd:string | ||
694 | + ] | ||
695 | + ] [ rdf:type sp:Bind ; | ||
696 | + sp:expression | ||
697 | + [ rdf:type rhspin:companyWithName ; | ||
698 | + arg:name | ||
699 | + [ sp:varName "companyName"^^xsd:string | ||
700 | + ] | ||
701 | + ] ; | ||
702 | + sp:variable | ||
703 | + [ sp:varName "company"^^xsd:string | ||
704 | + ] | ||
705 | + ] [ sp:object | ||
706 | + [ sp:varName "owner"^^xsd:string | ||
707 | + ] ; | ||
708 | + sp:predicate rhspin:companyHasLicenceOrBAA ; | ||
709 | + sp:subject | ||
710 | + [ sp:varName "company"^^xsd:string | ||
711 | + ] | ||
712 | + ]) | ||
713 | + ] ; | ||
714 | + spin:constraint | ||
715 | + [ rdf:type spl:Argument ; | ||
716 | + rdfs:comment "The licence or BAA."^^xsd:string ; | ||
717 | + spl:predicate arg:owner ; | ||
718 | + spl:valueType <http://www.reportinghub.no/np/schema/npd#Owner> | ||
719 | + ] ; | ||
720 | + spin:returnType xsd:boolean . | ||
721 | + | ||
676 | rhspin:currentUserHasAccessToWellBoreWithId | 722 | rhspin:currentUserHasAccessToWellBoreWithId |
677 | rdf:type spin:Function ; | 723 | rdf:type spin:Function ; |
678 | rdfs:comment "Tests whether the currently logged in user is working for a company that has a valid licence for a well bore with a given id. This function is used by the download service to validate access privileges."^^xsd:string ; | 724 | rdfs:comment "Tests whether the currently logged in user is working for a company that has a valid licence for a well bore with a given id. This function is used by the download service to validate access privileges."^^xsd:string ; |
... | @@ -823,16 +869,16 @@ rhspin:ddrOfWeek | ... | @@ -823,16 +869,16 @@ rhspin:ddrOfWeek |
823 | ] ; | 869 | ] ; |
824 | spin:constraint | 870 | spin:constraint |
825 | [ rdf:type spl:Argument ; | 871 | [ rdf:type spl:Argument ; |
826 | - rdfs:comment "The first day of the week."^^xsd:string ; | ||
827 | - spl:predicate sp:arg1 ; | ||
828 | - spl:valueType xsd:date | ||
829 | - ] ; | ||
830 | - spin:constraint | ||
831 | - [ rdf:type spl:Argument ; | ||
832 | rdfs:comment "The well bore that the DDR must be about."^^xsd:string ; | 872 | rdfs:comment "The well bore that the DDR must be about."^^xsd:string ; |
833 | spl:predicate sp:arg2 ; | 873 | spl:predicate sp:arg2 ; |
834 | spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | 874 | spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> |
835 | ] ; | 875 | ] ; |
876 | + spin:constraint | ||
877 | + [ rdf:type spl:Argument ; | ||
878 | + rdfs:comment "The first day of the week."^^xsd:string ; | ||
879 | + spl:predicate sp:arg1 ; | ||
880 | + spl:valueType xsd:date | ||
881 | + ] ; | ||
836 | spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> . | 882 | spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> . |
837 | 883 | ||
838 | rhspin:ddrWellBoreId | 884 | rhspin:ddrWellBoreId |
... | @@ -919,15 +965,15 @@ rhspin:dtypeValue | ... | @@ -919,15 +965,15 @@ rhspin:dtypeValue |
919 | ] ; | 965 | ] ; |
920 | spin:constraint | 966 | spin:constraint |
921 | [ rdf:type spl:Argument ; | 967 | [ rdf:type spl:Argument ; |
922 | - rdfs:comment "The predicate that points to the reified value."^^xsd:string ; | ||
923 | - spl:predicate sp:arg2 ; | ||
924 | - spl:valueType rdf:Property | ||
925 | - ] ; | ||
926 | - spin:constraint | ||
927 | - [ rdf:type spl:Argument ; | ||
928 | rdfs:comment "The subject of the value."^^xsd:string ; | 968 | rdfs:comment "The subject of the value."^^xsd:string ; |
929 | spl:predicate sp:arg1 ; | 969 | spl:predicate sp:arg1 ; |
930 | spl:valueType rdfs:Resource | 970 | spl:valueType rdfs:Resource |
971 | + ] ; | ||
972 | + spin:constraint | ||
973 | + [ rdf:type spl:Argument ; | ||
974 | + rdfs:comment "The predicate that points to the reified value."^^xsd:string ; | ||
975 | + spl:predicate sp:arg2 ; | ||
976 | + spl:valueType rdf:Property | ||
931 | ] . | 977 | ] . |
932 | 978 | ||
933 | rhspin:facilityById | 979 | rhspin:facilityById |
... | @@ -1535,17 +1581,17 @@ rhspin:npdIndividualByName | ... | @@ -1535,17 +1581,17 @@ rhspin:npdIndividualByName |
1535 | ] ; | 1581 | ] ; |
1536 | spin:constraint | 1582 | spin:constraint |
1537 | [ rdf:type spl:Argument ; | 1583 | [ rdf:type spl:Argument ; |
1538 | - rdfs:comment "The NPD name to match."^^xsd:string ; | ||
1539 | - spl:predicate arg:name ; | ||
1540 | - spl:valueType xsd:string | ||
1541 | - ] ; | ||
1542 | - spin:constraint | ||
1543 | - [ rdf:type spl:Argument ; | ||
1544 | rdfs:comment "The rdf:type that the result must have."^^xsd:string ; | 1584 | rdfs:comment "The rdf:type that the result must have."^^xsd:string ; |
1545 | spl:optional "true"^^xsd:boolean ; | 1585 | spl:optional "true"^^xsd:boolean ; |
1546 | spl:predicate arg:type ; | 1586 | spl:predicate arg:type ; |
1547 | spl:valueType rdfs:Class | 1587 | spl:valueType rdfs:Class |
1548 | ] ; | 1588 | ] ; |
1589 | + spin:constraint | ||
1590 | + [ rdf:type spl:Argument ; | ||
1591 | + rdfs:comment "The NPD name to match."^^xsd:string ; | ||
1592 | + spl:predicate arg:name ; | ||
1593 | + spl:valueType xsd:string | ||
1594 | + ] ; | ||
1549 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . | 1595 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . |
1550 | 1596 | ||
1551 | rhspin:npdName | 1597 | rhspin:npdName |
... | @@ -1591,8 +1637,9 @@ rhspin:npdTripleExists | ... | @@ -1591,8 +1637,9 @@ rhspin:npdTripleExists |
1591 | ] ; | 1637 | ] ; |
1592 | spin:constraint | 1638 | spin:constraint |
1593 | [ rdf:type spl:Argument ; | 1639 | [ rdf:type spl:Argument ; |
1594 | - rdfs:comment "The object to match."^^xsd:string ; | 1640 | + rdfs:comment "The subject to find"^^xsd:string ; |
1595 | - spl:predicate sp:arg3 | 1641 | + spl:predicate sp:arg1 ; |
1642 | + spl:valueType rdfs:Resource | ||
1596 | ] ; | 1643 | ] ; |
1597 | spin:constraint | 1644 | spin:constraint |
1598 | [ rdf:type spl:Argument ; | 1645 | [ rdf:type spl:Argument ; |
... | @@ -1602,9 +1649,8 @@ rhspin:npdTripleExists | ... | @@ -1602,9 +1649,8 @@ rhspin:npdTripleExists |
1602 | ] ; | 1649 | ] ; |
1603 | spin:constraint | 1650 | spin:constraint |
1604 | [ rdf:type spl:Argument ; | 1651 | [ rdf:type spl:Argument ; |
1605 | - rdfs:comment "The subject to find"^^xsd:string ; | 1652 | + rdfs:comment "The object to match."^^xsd:string ; |
1606 | - spl:predicate sp:arg1 ; | 1653 | + spl:predicate sp:arg3 |
1607 | - spl:valueType rdfs:Resource | ||
1608 | ] ; | 1654 | ] ; |
1609 | spin:returnType xsd:boolean . | 1655 | spin:returnType xsd:boolean . |
1610 | 1656 | ||
... | @@ -1772,86 +1818,86 @@ rhspin:wellByName | ... | @@ -1772,86 +1818,86 @@ rhspin:wellByName |
1772 | ] ; | 1818 | ] ; |
1773 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . | 1819 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . |
1774 | 1820 | ||
1775 | -_:b1 sp:varName "subject"^^xsd:string . | 1821 | +_:b31 |
1776 | - | 1822 | + sp:varName "name"^^xsd:string . |
1777 | -_:b2 sp:varName "wellBoreName"^^xsd:string . | ||
1778 | 1823 | ||
1779 | -_:b3 sp:varName "wellBoreId"^^xsd:string . | 1824 | +_:b30 |
1825 | + sp:varName "id"^^xsd:string . | ||
1780 | 1826 | ||
1781 | -_:b4 sp:varName "wellBore"^^xsd:string . | 1827 | +_:b29 |
1828 | + sp:varName "t4"^^xsd:string . | ||
1782 | 1829 | ||
1783 | -_:b5 sp:varName "wellName"^^xsd:string . | 1830 | +_:b28 |
1831 | + sp:varName "t3"^^xsd:string . | ||
1784 | 1832 | ||
1785 | -_:b6 sp:varName "well"^^xsd:string . | 1833 | +_:b27 |
1834 | + sp:varName "t2"^^xsd:string . | ||
1786 | 1835 | ||
1787 | -_:b7 sp:varName "company"^^xsd:string . | 1836 | +_:b26 |
1837 | + sp:varName "t1"^^xsd:string . | ||
1788 | 1838 | ||
1789 | -_:b8 sp:varName "wellBore"^^xsd:string . | 1839 | +_:b25 |
1840 | + sp:varName "t0b"^^xsd:string . | ||
1790 | 1841 | ||
1791 | -_:b9 sp:varName "licence"^^xsd:string . | 1842 | +_:b24 |
1843 | + sp:varName "t0a"^^xsd:string . | ||
1792 | 1844 | ||
1793 | -_:b10 | 1845 | +_:b23 |
1794 | - sp:varName "share"^^xsd:string . | 1846 | + sp:varName "s2"^^xsd:string . |
1795 | 1847 | ||
1796 | -_:b11 | 1848 | +_:b22 |
1797 | - sp:varName "wellBore"^^xsd:string . | 1849 | + sp:varName "s1"^^xsd:string . |
1798 | 1850 | ||
1799 | -_:b12 | 1851 | +_:b21 |
1800 | - sp:varName "share"^^xsd:string . | 1852 | + sp:varName "normalizedStr"^^xsd:string . |
1801 | 1853 | ||
1802 | -_:b13 | 1854 | +_:b20 |
1803 | sp:varName "licence"^^xsd:string . | 1855 | sp:varName "licence"^^xsd:string . |
1804 | 1856 | ||
1805 | -_:b14 | 1857 | +_:b19 |
1806 | - sp:varName "company"^^xsd:string . | 1858 | + sp:varName "reif"^^xsd:string . |
1807 | - | ||
1808 | -_:b15 | ||
1809 | - sp:varName "companyName"^^xsd:string . | ||
1810 | 1859 | ||
1811 | -_:b16 | 1860 | +_:b18 |
1812 | - sp:varName "company"^^xsd:string . | 1861 | + sp:varName "value"^^xsd:string . |
1813 | 1862 | ||
1814 | _:b17 | 1863 | _:b17 |
1815 | sp:varName "wellBore"^^xsd:string . | 1864 | sp:varName "wellBore"^^xsd:string . |
1816 | 1865 | ||
1817 | -_:b18 | 1866 | +_:b16 |
1818 | - sp:varName "value"^^xsd:string . | 1867 | + sp:varName "company"^^xsd:string . |
1819 | 1868 | ||
1820 | -_:b19 | 1869 | +_:b15 |
1821 | - sp:varName "reif"^^xsd:string . | 1870 | + sp:varName "companyName"^^xsd:string . |
1822 | 1871 | ||
1823 | -_:b20 | 1872 | +_:b14 |
1873 | + sp:varName "company"^^xsd:string . | ||
1874 | + | ||
1875 | +_:b13 | ||
1824 | sp:varName "licence"^^xsd:string . | 1876 | sp:varName "licence"^^xsd:string . |
1825 | 1877 | ||
1826 | -_:b21 | 1878 | +_:b12 |
1827 | - sp:varName "normalizedStr"^^xsd:string . | 1879 | + sp:varName "share"^^xsd:string . |
1828 | 1880 | ||
1829 | -_:b22 | 1881 | +_:b11 |
1830 | - sp:varName "s1"^^xsd:string . | 1882 | + sp:varName "wellBore"^^xsd:string . |
1831 | 1883 | ||
1832 | -_:b23 | 1884 | +_:b10 |
1833 | - sp:varName "s2"^^xsd:string . | 1885 | + sp:varName "share"^^xsd:string . |
1834 | 1886 | ||
1835 | -_:b24 | 1887 | +_:b9 sp:varName "licence"^^xsd:string . |
1836 | - sp:varName "t0a"^^xsd:string . | ||
1837 | 1888 | ||
1838 | -_:b25 | 1889 | +_:b8 sp:varName "wellBore"^^xsd:string . |
1839 | - sp:varName "t0b"^^xsd:string . | ||
1840 | 1890 | ||
1841 | -_:b26 | 1891 | +_:b7 sp:varName "company"^^xsd:string . |
1842 | - sp:varName "t1"^^xsd:string . | ||
1843 | 1892 | ||
1844 | -_:b27 | 1893 | +_:b6 sp:varName "well"^^xsd:string . |
1845 | - sp:varName "t2"^^xsd:string . | ||
1846 | 1894 | ||
1847 | -_:b28 | 1895 | +_:b5 sp:varName "wellName"^^xsd:string . |
1848 | - sp:varName "t3"^^xsd:string . | ||
1849 | 1896 | ||
1850 | -_:b29 | 1897 | +_:b4 sp:varName "wellBore"^^xsd:string . |
1851 | - sp:varName "t4"^^xsd:string . | ||
1852 | 1898 | ||
1853 | -_:b30 | 1899 | +_:b3 sp:varName "wellBoreId"^^xsd:string . |
1854 | - sp:varName "id"^^xsd:string . | ||
1855 | 1900 | ||
1856 | -_:b31 | 1901 | +_:b2 sp:varName "wellBoreName"^^xsd:string . |
1857 | - sp:varName "name"^^xsd:string . | 1902 | + |
1903 | +_:b1 sp:varName "subject"^^xsd:string . | ... | ... |
-
Please register or login to post a comment