Showing
1 changed file
with
172 additions
and
29 deletions
... | @@ -772,6 +772,13 @@ rhspin:companyHasLicenceForWellBore | ... | @@ -772,6 +772,13 @@ rhspin:companyHasLicenceForWellBore |
772 | sp:subject | 772 | sp:subject |
773 | [ sp:varName "share"^^xsd:string | 773 | [ sp:varName "share"^^xsd:string |
774 | ] | 774 | ] |
775 | + ] [ rdf:type sp:Filter ; | ||
776 | + sp:expression | ||
777 | + [ rdf:type rhspin:shareIsValid ; | ||
778 | + arg:share | ||
779 | + [ sp:varName "share"^^xsd:string | ||
780 | + ] | ||
781 | + ] | ||
775 | ] [ sp:object | 782 | ] [ sp:object |
776 | [ sp:varName "licence"^^xsd:string | 783 | [ sp:varName "licence"^^xsd:string |
777 | ] ; | 784 | ] ; |
... | @@ -784,18 +791,39 @@ rhspin:companyHasLicenceForWellBore | ... | @@ -784,18 +791,39 @@ rhspin:companyHasLicenceForWellBore |
784 | sp:subject | 791 | sp:subject |
785 | [ sp:varName "licence"^^xsd:string | 792 | [ sp:varName "licence"^^xsd:string |
786 | ] | 793 | ] |
787 | - ] [ sp:object | 794 | + ] [ rdf:type sp:Union ; |
795 | + sp:elements (([ sp:object | ||
788 | [ sp:varName "licence"^^xsd:string | 796 | [ sp:varName "licence"^^xsd:string |
789 | ] ; | 797 | ] ; |
790 | sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; | 798 | sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; |
791 | sp:subject | 799 | sp:subject |
792 | [ sp:varName "wellBore"^^xsd:string | 800 | [ sp:varName "wellBore"^^xsd:string |
793 | ] | 801 | ] |
802 | + ]) ([ rdf:type sp:TriplePath ; | ||
803 | + sp:object | ||
804 | + [ sp:varName "licence"^^xsd:string | ||
805 | + ] ; | ||
806 | + sp:path [ rdf:type sp:SeqPath ; | ||
807 | + sp:path1 | ||
808 | + [ rdf:type sp:SeqPath ; | ||
809 | + sp:path1 <http://www.reportinghub.no/np/schema/npd#partOfWell> ; | ||
810 | + sp:path2 <http://www.reportinghub.no/np/schema/npd#wellPartOfField> | ||
811 | + ] ; | ||
812 | + sp:path2 <http://www.reportinghub.no/np/schema/npd#fieldOwner> | ||
813 | + ] ; | ||
814 | + sp:subject | ||
815 | + [ sp:varName "wellBore"^^xsd:string | ||
816 | + ] | ||
817 | + ])) | ||
794 | ] [ rdf:type sp:Filter ; | 818 | ] [ rdf:type sp:Filter ; |
795 | sp:expression | 819 | sp:expression |
796 | - [ rdf:type rhspin:shareIsValid ; | 820 | + [ rdf:type sp:eq ; |
797 | - arg:share | 821 | + sp:arg1 [ rdf:type rhspin:licenceForWellBore ; |
798 | - [ sp:varName "share"^^xsd:string | 822 | + arg:wellBore |
823 | + [ sp:varName "wellBore"^^xsd:string | ||
824 | + ] | ||
825 | + ] ; | ||
826 | + sp:arg2 [ sp:varName "licence"^^xsd:string | ||
799 | ] | 827 | ] |
800 | ] | 828 | ] |
801 | ]) ; | 829 | ]) ; |
... | @@ -1626,16 +1654,16 @@ rhspin:graphForDDR | ... | @@ -1626,16 +1654,16 @@ rhspin:graphForDDR |
1626 | sp:subject | 1654 | sp:subject |
1627 | [ sp:varName "ddr"^^xsd:string | 1655 | [ sp:varName "ddr"^^xsd:string |
1628 | ] | 1656 | ] |
1629 | - ] [ rdf:type sp:NamedGraph ; | 1657 | + ] [ rdf:type sp:Bind ; |
1630 | - sp:elements ([ sp:object | 1658 | + sp:expression |
1631 | - [ sp:varName "licence"^^xsd:string | 1659 | + [ rdf:type rhspin:licenceForWellBore ; |
1632 | - ] ; | 1660 | + arg:wellBore |
1633 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; | ||
1634 | - sp:subject | ||
1635 | [ sp:varName "wellBore"^^xsd:string | 1661 | [ sp:varName "wellBore"^^xsd:string |
1636 | ] | 1662 | ] |
1637 | - ]) ; | 1663 | + ] ; |
1638 | - sp:graphNameNode npdata:npd | 1664 | + sp:variable |
1665 | + [ sp:varName "licence"^^xsd:string | ||
1666 | + ] | ||
1639 | ]) | 1667 | ]) |
1640 | ] ; | 1668 | ] ; |
1641 | spin:constraint | 1669 | spin:constraint |
... | @@ -1769,13 +1797,16 @@ rhspin:graphForWellBoreWithId | ... | @@ -1769,13 +1797,16 @@ rhspin:graphForWellBoreWithId |
1769 | sp:subject | 1797 | sp:subject |
1770 | [ sp:varName "wellBore"^^xsd:string | 1798 | [ sp:varName "wellBore"^^xsd:string |
1771 | ] | 1799 | ] |
1772 | - ] [ sp:object | 1800 | + ] [ rdf:type sp:Bind ; |
1773 | - [ sp:varName "licence"^^xsd:string | 1801 | + sp:expression |
1774 | - ] ; | 1802 | + [ rdf:type rhspin:licenceForWellBore ; |
1775 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; | 1803 | + arg:wellBore |
1776 | - sp:subject | ||
1777 | [ sp:varName "wellBore"^^xsd:string | 1804 | [ sp:varName "wellBore"^^xsd:string |
1778 | ] | 1805 | ] |
1806 | + ] ; | ||
1807 | + sp:variable | ||
1808 | + [ sp:varName "licence"^^xsd:string | ||
1809 | + ] | ||
1779 | ]) ; | 1810 | ]) ; |
1780 | sp:graphNameNode npdata:npd | 1811 | sp:graphNameNode npdata:npd |
1781 | ]) | 1812 | ]) |
... | @@ -1814,10 +1845,55 @@ rhspin:licenceById | ... | @@ -1814,10 +1845,55 @@ rhspin:licenceById |
1814 | ] ; | 1845 | ] ; |
1815 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Licence> . | 1846 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Licence> . |
1816 | 1847 | ||
1817 | -rhspin:licenceForWellBore | 1848 | +rhspin:licenceForDevelopmentWellBore |
1818 | rdf:type spin:Function ; | 1849 | rdf:type spin:Function ; |
1819 | - rdfs:comment "Gets the licence associated with a given well bore."^^xsd:string ; | 1850 | + rdfs:comment """Gets the licence associated with a given development well bore: |
1820 | - rdfs:label "licence for well bore"^^xsd:string ; | 1851 | +- Find the wellbore’s field association according to NPD fact pages |
1852 | +- For that field, look up field attribute “Owner- current”. This is then the license or BAA that the wellbore should be associated with."""^^xsd:string ; | ||
1853 | + rdfs:label "licence for development well bore"^^xsd:string ; | ||
1854 | + rdfs:seeAlso <http://st.epim.no/EPIM_SPIRATEST/16/Requirement/997.aspx> ; | ||
1855 | + rdfs:subClassOf spin:Functions ; | ||
1856 | + spin:body | ||
1857 | + [ rdf:type sp:Select ; | ||
1858 | + sp:resultVariables ([ sp:varName "licence"^^xsd:string | ||
1859 | + ]) ; | ||
1860 | + sp:where ([ rdf:type sp:NamedGraph ; | ||
1861 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
1862 | + sp:object | ||
1863 | + [ sp:varName "field"^^xsd:string | ||
1864 | + ] ; | ||
1865 | + sp:path [ rdf:type sp:SeqPath ; | ||
1866 | + sp:path1 <http://www.reportinghub.no/np/schema/npd#partOfWell> ; | ||
1867 | + sp:path2 <http://www.reportinghub.no/np/schema/npd#wellPartOfField> | ||
1868 | + ] ; | ||
1869 | + sp:subject | ||
1870 | + [ sp:varName "wellBore"^^xsd:string | ||
1871 | + ] | ||
1872 | + ] [ sp:object | ||
1873 | + [ sp:varName "licence"^^xsd:string | ||
1874 | + ] ; | ||
1875 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#fieldOwner> ; | ||
1876 | + sp:subject | ||
1877 | + [ sp:varName "field"^^xsd:string | ||
1878 | + ] | ||
1879 | + ]) ; | ||
1880 | + sp:graphNameNode npdata:npd | ||
1881 | + ]) | ||
1882 | + ] ; | ||
1883 | + spin:constraint | ||
1884 | + [ rdf:type spl:Argument ; | ||
1885 | + rdfs:comment "The WellBore to get the licence of."^^xsd:string ; | ||
1886 | + spl:predicate arg:wellBore ; | ||
1887 | + spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | ||
1888 | + ] ; | ||
1889 | + spin:returnType <http://www.reportinghub.no/np/schema/npd#Licence> . | ||
1890 | + | ||
1891 | +rhspin:licenceForExplorationWellBore | ||
1892 | + rdf:type spin:Function ; | ||
1893 | + rdfs:comment """Gets the licence associated with a given exporation well bore. | ||
1894 | +Wellbore should be associated with the license specified in the attribute “drilled in production license” from the NPD facts for the given wellbore. """^^xsd:string ; | ||
1895 | + rdfs:label "licence for exploration well bore"^^xsd:string ; | ||
1896 | + rdfs:seeAlso <http://st.epim.no/EPIM_SPIRATEST/16/Requirement/997.aspx> ; | ||
1821 | rdfs:subClassOf spin:Functions ; | 1897 | rdfs:subClassOf spin:Functions ; |
1822 | spin:body | 1898 | spin:body |
1823 | [ rdf:type sp:Select ; | 1899 | [ rdf:type sp:Select ; |
... | @@ -1843,6 +1919,67 @@ rhspin:licenceForWellBore | ... | @@ -1843,6 +1919,67 @@ rhspin:licenceForWellBore |
1843 | ] ; | 1919 | ] ; |
1844 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Licence> . | 1920 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Licence> . |
1845 | 1921 | ||
1922 | +rhspin:licenceForWellBore | ||
1923 | + rdf:type spin:Function ; | ||
1924 | + rdfs:comment """Gets the licence associated with a given well bore. | ||
1925 | + | ||
1926 | +For development wellbores: | ||
1927 | +- Find the wellbore’s field association according to NPD fact pages | ||
1928 | +- For that field, look up field attribute “Owner- current”. This is then the license or BAA that the wellbore should be associated with. | ||
1929 | + | ||
1930 | +For exploration wellbores: | ||
1931 | +Wellbore should be associated with the license specified in the attribute “drilled in production license” from the NPD facts for the given wellbore. | ||
1932 | + | ||
1933 | +Note that SHALLOW well bores are handled like EXPLORATION well bores."""^^xsd:string ; | ||
1934 | + rdfs:label "licence for well bore"^^xsd:string ; | ||
1935 | + rdfs:seeAlso <http://st.epim.no/EPIM_SPIRATEST/16/Requirement/997.aspx> ; | ||
1936 | + rdfs:subClassOf spin:Functions ; | ||
1937 | + spin:body | ||
1938 | + [ rdf:type sp:Select ; | ||
1939 | + sp:resultVariables ([ sp:varName "licence"^^xsd:string | ||
1940 | + ]) ; | ||
1941 | + sp:where ([ rdf:type sp:NamedGraph ; | ||
1942 | + sp:elements ([ sp:object | ||
1943 | + [ sp:varName "type"^^xsd:string | ||
1944 | + ] ; | ||
1945 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#wellBoreType> ; | ||
1946 | + sp:subject | ||
1947 | + [ sp:varName "wellBore"^^xsd:string | ||
1948 | + ] | ||
1949 | + ] [ rdf:type sp:Bind ; | ||
1950 | + sp:expression | ||
1951 | + [ rdf:type sp:if ; | ||
1952 | + sp:arg1 [ rdf:type sp:eq ; | ||
1953 | + sp:arg1 [ sp:varName "type"^^xsd:string | ||
1954 | + ] ; | ||
1955 | + sp:arg2 "DEVELOPMENT" | ||
1956 | + ] ; | ||
1957 | + sp:arg2 [ rdf:type rhspin:licenceForDevelopmentWellBore ; | ||
1958 | + arg:wellBore | ||
1959 | + [ sp:varName "wellBore"^^xsd:string | ||
1960 | + ] | ||
1961 | + ] ; | ||
1962 | + sp:arg3 [ rdf:type rhspin:licenceForExplorationWellBore ; | ||
1963 | + arg:wellBore | ||
1964 | + [ sp:varName "wellBore"^^xsd:string | ||
1965 | + ] | ||
1966 | + ] | ||
1967 | + ] ; | ||
1968 | + sp:variable | ||
1969 | + [ sp:varName "licence"^^xsd:string | ||
1970 | + ] | ||
1971 | + ]) ; | ||
1972 | + sp:graphNameNode npdata:npd | ||
1973 | + ]) | ||
1974 | + ] ; | ||
1975 | + spin:constraint | ||
1976 | + [ rdf:type spl:Argument ; | ||
1977 | + rdfs:comment "The WellBore to get the licence of."^^xsd:string ; | ||
1978 | + spl:predicate arg:wellBore ; | ||
1979 | + spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | ||
1980 | + ] ; | ||
1981 | + spin:returnType <http://www.reportinghub.no/np/schema/npd#Licence> . | ||
1982 | + | ||
1846 | rhspin:normalizeString | 1983 | rhspin:normalizeString |
1847 | rdf:type spin:Function ; | 1984 | rdf:type spin:Function ; |
1848 | rdfs:comment "Takes a raw string and \"normalizes\" it, replacing special characters so that they can be used in URIs."^^xsd:string ; | 1985 | rdfs:comment "Takes a raw string and \"normalizes\" it, replacing special characters so that they can be used in URIs."^^xsd:string ; |
... | @@ -2698,20 +2835,26 @@ rhspin:wellBoreLicenceOperator | ... | @@ -2698,20 +2835,26 @@ rhspin:wellBoreLicenceOperator |
2698 | sp:resultVariables ([ sp:varName "operator"^^xsd:string | 2835 | sp:resultVariables ([ sp:varName "operator"^^xsd:string |
2699 | ]) ; | 2836 | ]) ; |
2700 | sp:where ([ rdf:type sp:NamedGraph ; | 2837 | sp:where ([ rdf:type sp:NamedGraph ; |
2701 | - sp:elements ([ sp:object | 2838 | + sp:elements ([ rdf:type sp:Bind ; |
2702 | - [ sp:varName "licence"^^xsd:string | 2839 | + sp:expression |
2703 | - ] ; | 2840 | + [ rdf:type rhspin:licenceForWellBore ; |
2704 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; | 2841 | + arg:wellBore |
2705 | - sp:subject | ||
2706 | [ sp:varName "wellBore"^^xsd:string | 2842 | [ sp:varName "wellBore"^^xsd:string |
2707 | ] | 2843 | ] |
2708 | - ] [ sp:object | ||
2709 | - [ sp:varName "operator"^^xsd:string | ||
2710 | ] ; | 2844 | ] ; |
2711 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceOperator> ; | 2845 | + sp:variable |
2712 | - sp:subject | ||
2713 | [ sp:varName "licence"^^xsd:string | 2846 | [ sp:varName "licence"^^xsd:string |
2714 | ] | 2847 | ] |
2848 | + ] [ rdf:type sp:Bind ; | ||
2849 | + sp:expression | ||
2850 | + [ rdf:type spl:object ; | ||
2851 | + sp:arg1 [ sp:varName "licence"^^xsd:string | ||
2852 | + ] ; | ||
2853 | + sp:arg2 <http://www.reportinghub.no/np/schema/npd#licenceOperator> | ||
2854 | + ] ; | ||
2855 | + sp:variable | ||
2856 | + [ sp:varName "operator"^^xsd:string | ||
2857 | + ] | ||
2715 | ]) ; | 2858 | ]) ; |
2716 | sp:graphNameNode npdata:npd | 2859 | sp:graphNameNode npdata:npd |
2717 | ]) | 2860 | ]) | ... | ... |
-
Please register or login to post a comment