Showing
1 changed file
with
111 additions
and
51 deletions
| ... | @@ -69,6 +69,11 @@ arg:startDate | ... | @@ -69,6 +69,11 @@ arg:startDate |
| 69 | rdfs:label "start date"^^xsd:string ; | 69 | rdfs:label "start date"^^xsd:string ; |
| 70 | rdfs:subPropertyOf sp:arg . | 70 | rdfs:subPropertyOf sp:arg . |
| 71 | 71 | ||
| 72 | +arg:type | ||
| 73 | + rdf:type rdf:Property ; | ||
| 74 | + rdfs:label "type"^^xsd:string ; | ||
| 75 | + rdfs:subPropertyOf sp:arg . | ||
| 76 | + | ||
| 72 | arg:well | 77 | arg:well |
| 73 | rdf:type rdf:Property ; | 78 | rdf:type rdf:Property ; |
| 74 | rdfs:label "well"^^xsd:string ; | 79 | rdfs:label "well"^^xsd:string ; |
| ... | @@ -1468,6 +1473,61 @@ rhspin:npdId | ... | @@ -1468,6 +1473,61 @@ rhspin:npdId |
| 1468 | spl:valueType <http://www.reportinghub.no/np/schema/npd#NPDIndividual> | 1473 | spl:valueType <http://www.reportinghub.no/np/schema/npd#NPDIndividual> |
| 1469 | ] . | 1474 | ] . |
| 1470 | 1475 | ||
| 1476 | +rhspin:npdIndividualByName | ||
| 1477 | + rdf:type spin:Function ; | ||
| 1478 | + rdfs:comment "Finds an NPD individual by its npd:name (?name). The individual also has to have the given class (?type) as a direct or indirect rdf:type."^^xsd:string ; | ||
| 1479 | + rdfs:label "NPD individual by name"^^xsd:string ; | ||
| 1480 | + rdfs:subClassOf spin:Functions ; | ||
| 1481 | + spin:body | ||
| 1482 | + [ rdf:type sp:Select ; | ||
| 1483 | + sp:resultVariables ([ sp:varName "individual"^^xsd:string | ||
| 1484 | + ]) ; | ||
| 1485 | + sp:where ([ rdf:type sp:NamedGraph ; | ||
| 1486 | + sp:elements ([ sp:object | ||
| 1487 | + [ sp:varName "name"^^xsd:string | ||
| 1488 | + ] ; | ||
| 1489 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
| 1490 | + sp:subject | ||
| 1491 | + [ sp:varName "individual"^^xsd:string | ||
| 1492 | + ] | ||
| 1493 | + ] [ rdf:type sp:TriplePath ; | ||
| 1494 | + sp:object | ||
| 1495 | + [ sp:varName "type"^^xsd:string | ||
| 1496 | + ] ; | ||
| 1497 | + sp:path [ rdf:type sp:ModPath ; | ||
| 1498 | + sp:modMax -2 ; | ||
| 1499 | + sp:modMin 0 ; | ||
| 1500 | + sp:subPath rdfs:subClassOf | ||
| 1501 | + ] ; | ||
| 1502 | + sp:subject | ||
| 1503 | + [ sp:varName "a"^^xsd:string | ||
| 1504 | + ] | ||
| 1505 | + ] [ sp:object | ||
| 1506 | + [ sp:varName "a"^^xsd:string | ||
| 1507 | + ] ; | ||
| 1508 | + sp:predicate rdf:type ; | ||
| 1509 | + sp:subject | ||
| 1510 | + [ sp:varName "individual"^^xsd:string | ||
| 1511 | + ] | ||
| 1512 | + ]) ; | ||
| 1513 | + sp:graphNameNode npdata:npd | ||
| 1514 | + ]) | ||
| 1515 | + ] ; | ||
| 1516 | + spin:constraint | ||
| 1517 | + [ rdf:type spl:Argument ; | ||
| 1518 | + rdfs:comment "The NPD name to match."^^xsd:string ; | ||
| 1519 | + spl:predicate arg:name ; | ||
| 1520 | + spl:valueType xsd:string | ||
| 1521 | + ] ; | ||
| 1522 | + spin:constraint | ||
| 1523 | + [ rdf:type spl:Argument ; | ||
| 1524 | + rdfs:comment "The rdf:type that the result must have."^^xsd:string ; | ||
| 1525 | + spl:optional "true"^^xsd:boolean ; | ||
| 1526 | + spl:predicate arg:type ; | ||
| 1527 | + spl:valueType rdfs:Class | ||
| 1528 | + ] ; | ||
| 1529 | + spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . | ||
| 1530 | + | ||
| 1471 | rhspin:npdName | 1531 | rhspin:npdName |
| 1472 | rdf:type spin:Function ; | 1532 | rdf:type spin:Function ; |
| 1473 | rdfs:comment "Gets the npd:name of a given resource in the NPD named graph."^^xsd:string ; | 1533 | rdfs:comment "Gets the npd:name of a given resource in the NPD named graph."^^xsd:string ; |
| ... | @@ -1692,86 +1752,86 @@ rhspin:wellByName | ... | @@ -1692,86 +1752,86 @@ rhspin:wellByName |
| 1692 | ] ; | 1752 | ] ; |
| 1693 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . | 1753 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . |
| 1694 | 1754 | ||
| 1695 | -_:b31 | 1755 | +_:b1 sp:varName "subject"^^xsd:string . |
| 1696 | - sp:varName "name"^^xsd:string . | ||
| 1697 | - | ||
| 1698 | -_:b30 | ||
| 1699 | - sp:varName "id"^^xsd:string . | ||
| 1700 | - | ||
| 1701 | -_:b29 | ||
| 1702 | - sp:varName "t4"^^xsd:string . | ||
| 1703 | 1756 | ||
| 1704 | -_:b28 | 1757 | +_:b2 sp:varName "wellBoreName"^^xsd:string . |
| 1705 | - sp:varName "t3"^^xsd:string . | ||
| 1706 | 1758 | ||
| 1707 | -_:b27 | 1759 | +_:b3 sp:varName "wellBoreId"^^xsd:string . |
| 1708 | - sp:varName "t2"^^xsd:string . | ||
| 1709 | 1760 | ||
| 1710 | -_:b26 | 1761 | +_:b4 sp:varName "wellBore"^^xsd:string . |
| 1711 | - sp:varName "t1"^^xsd:string . | ||
| 1712 | 1762 | ||
| 1713 | -_:b25 | 1763 | +_:b5 sp:varName "wellName"^^xsd:string . |
| 1714 | - sp:varName "t0b"^^xsd:string . | ||
| 1715 | 1764 | ||
| 1716 | -_:b24 | 1765 | +_:b6 sp:varName "well"^^xsd:string . |
| 1717 | - sp:varName "t0a"^^xsd:string . | ||
| 1718 | 1766 | ||
| 1719 | -_:b23 | 1767 | +_:b7 sp:varName "company"^^xsd:string . |
| 1720 | - sp:varName "s2"^^xsd:string . | ||
| 1721 | 1768 | ||
| 1722 | -_:b22 | 1769 | +_:b8 sp:varName "wellBore"^^xsd:string . |
| 1723 | - sp:varName "s1"^^xsd:string . | ||
| 1724 | 1770 | ||
| 1725 | -_:b21 | 1771 | +_:b9 sp:varName "licence"^^xsd:string . |
| 1726 | - sp:varName "normalizedStr"^^xsd:string . | ||
| 1727 | 1772 | ||
| 1728 | -_:b20 | 1773 | +_:b10 |
| 1729 | - sp:varName "licence"^^xsd:string . | 1774 | + sp:varName "share"^^xsd:string . |
| 1730 | 1775 | ||
| 1731 | -_:b19 | 1776 | +_:b11 |
| 1732 | - sp:varName "reif"^^xsd:string . | 1777 | + sp:varName "wellBore"^^xsd:string . |
| 1733 | 1778 | ||
| 1734 | -_:b18 | 1779 | +_:b12 |
| 1735 | - sp:varName "value"^^xsd:string . | 1780 | + sp:varName "share"^^xsd:string . |
| 1736 | 1781 | ||
| 1737 | -_:b17 | 1782 | +_:b13 |
| 1738 | - sp:varName "wellBore"^^xsd:string . | 1783 | + sp:varName "licence"^^xsd:string . |
| 1739 | 1784 | ||
| 1740 | -_:b16 | 1785 | +_:b14 |
| 1741 | sp:varName "company"^^xsd:string . | 1786 | sp:varName "company"^^xsd:string . |
| 1742 | 1787 | ||
| 1743 | _:b15 | 1788 | _:b15 |
| 1744 | sp:varName "companyName"^^xsd:string . | 1789 | sp:varName "companyName"^^xsd:string . |
| 1745 | 1790 | ||
| 1746 | -_:b14 | 1791 | +_:b16 |
| 1747 | sp:varName "company"^^xsd:string . | 1792 | sp:varName "company"^^xsd:string . |
| 1748 | 1793 | ||
| 1749 | -_:b13 | 1794 | +_:b17 |
| 1750 | - sp:varName "licence"^^xsd:string . | 1795 | + sp:varName "wellBore"^^xsd:string . |
| 1751 | 1796 | ||
| 1752 | -_:b12 | 1797 | +_:b18 |
| 1753 | - sp:varName "share"^^xsd:string . | 1798 | + sp:varName "value"^^xsd:string . |
| 1754 | 1799 | ||
| 1755 | -_:b11 | 1800 | +_:b19 |
| 1756 | - sp:varName "wellBore"^^xsd:string . | 1801 | + sp:varName "reif"^^xsd:string . |
| 1757 | 1802 | ||
| 1758 | -_:b10 | 1803 | +_:b20 |
| 1759 | - sp:varName "share"^^xsd:string . | 1804 | + sp:varName "licence"^^xsd:string . |
| 1760 | 1805 | ||
| 1761 | -_:b9 sp:varName "licence"^^xsd:string . | 1806 | +_:b21 |
| 1807 | + sp:varName "normalizedStr"^^xsd:string . | ||
| 1762 | 1808 | ||
| 1763 | -_:b8 sp:varName "wellBore"^^xsd:string . | 1809 | +_:b22 |
| 1810 | + sp:varName "s1"^^xsd:string . | ||
| 1764 | 1811 | ||
| 1765 | -_:b7 sp:varName "company"^^xsd:string . | 1812 | +_:b23 |
| 1813 | + sp:varName "s2"^^xsd:string . | ||
| 1766 | 1814 | ||
| 1767 | -_:b6 sp:varName "well"^^xsd:string . | 1815 | +_:b24 |
| 1816 | + sp:varName "t0a"^^xsd:string . | ||
| 1768 | 1817 | ||
| 1769 | -_:b5 sp:varName "wellName"^^xsd:string . | 1818 | +_:b25 |
| 1819 | + sp:varName "t0b"^^xsd:string . | ||
| 1770 | 1820 | ||
| 1771 | -_:b4 sp:varName "wellBore"^^xsd:string . | 1821 | +_:b26 |
| 1822 | + sp:varName "t1"^^xsd:string . | ||
| 1772 | 1823 | ||
| 1773 | -_:b3 sp:varName "wellBoreId"^^xsd:string . | 1824 | +_:b27 |
| 1825 | + sp:varName "t2"^^xsd:string . | ||
| 1774 | 1826 | ||
| 1775 | -_:b2 sp:varName "wellBoreName"^^xsd:string . | 1827 | +_:b28 |
| 1828 | + sp:varName "t3"^^xsd:string . | ||
| 1776 | 1829 | ||
| 1777 | -_:b1 sp:varName "subject"^^xsd:string . | 1830 | +_:b29 |
| 1831 | + sp:varName "t4"^^xsd:string . | ||
| 1832 | + | ||
| 1833 | +_:b30 | ||
| 1834 | + sp:varName "id"^^xsd:string . | ||
| 1835 | + | ||
| 1836 | +_:b31 | ||
| 1837 | + sp:varName "name"^^xsd:string . | ... | ... |
-
Please register or login to post a comment