Showing
1 changed file
with
202 additions
and
113 deletions
... | @@ -69,6 +69,11 @@ arg:resource | ... | @@ -69,6 +69,11 @@ arg:resource |
69 | rdfs:label "resource"^^xsd:string ; | 69 | rdfs:label "resource"^^xsd:string ; |
70 | rdfs:subPropertyOf sp:arg . | 70 | rdfs:subPropertyOf sp:arg . |
71 | 71 | ||
72 | +arg:share | ||
73 | + rdf:type rdf:Property ; | ||
74 | + rdfs:label "share"^^xsd:string ; | ||
75 | + rdfs:subPropertyOf sp:arg . | ||
76 | + | ||
72 | arg:startDate | 77 | arg:startDate |
73 | rdf:type rdf:Property ; | 78 | rdf:type rdf:Property ; |
74 | rdfs:label "start date"^^xsd:string ; | 79 | rdfs:label "start date"^^xsd:string ; |
... | @@ -481,14 +486,28 @@ rhspin:companyHasLicence | ... | @@ -481,14 +486,28 @@ rhspin:companyHasLicence |
481 | spin:body | 486 | spin:body |
482 | [ rdf:type sp:Select ; | 487 | [ rdf:type sp:Select ; |
483 | sp:distinct "true"^^xsd:boolean ; | 488 | sp:distinct "true"^^xsd:boolean ; |
484 | - sp:resultVariables (_:b9) ; | 489 | + sp:resultVariables ([ sp:varName "licence"^^xsd:string |
490 | + ]) ; | ||
485 | sp:where ([ rdf:type sp:NamedGraph ; | 491 | sp:where ([ rdf:type sp:NamedGraph ; |
486 | sp:elements ([ sp:object spin:_arg1 ; | 492 | sp:elements ([ sp:object spin:_arg1 ; |
487 | sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; | 493 | sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; |
488 | - sp:subject _:b10 | 494 | + sp:subject |
489 | - ] [ sp:object _:b9 ; | 495 | + [ sp:varName "share"^^xsd:string |
496 | + ] | ||
497 | + ] [ sp:object | ||
498 | + [ sp:varName "licence"^^xsd:string | ||
499 | + ] ; | ||
490 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceShared> ; | 500 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceShared> ; |
491 | - sp:subject _:b10 | 501 | + sp:subject |
502 | + [ sp:varName "share"^^xsd:string | ||
503 | + ] | ||
504 | + ] [ rdf:type sp:Filter ; | ||
505 | + sp:expression | ||
506 | + [ rdf:type rhspin:shareIsValid ; | ||
507 | + arg:share | ||
508 | + [ sp:varName "share"^^xsd:string | ||
509 | + ] | ||
510 | + ] | ||
492 | ]) ; | 511 | ]) ; |
493 | sp:graphNameNode npdata:npd | 512 | sp:graphNameNode npdata:npd |
494 | ]) | 513 | ]) |
... | @@ -509,20 +528,40 @@ rhspin:companyHasLicenceForWellBore | ... | @@ -509,20 +528,40 @@ rhspin:companyHasLicenceForWellBore |
509 | spin:body | 528 | spin:body |
510 | [ rdf:type sp:Select ; | 529 | [ rdf:type sp:Select ; |
511 | sp:distinct "true"^^xsd:boolean ; | 530 | sp:distinct "true"^^xsd:boolean ; |
512 | - sp:resultVariables (_:b11) ; | 531 | + sp:resultVariables ([ sp:varName "wellBore"^^xsd:string |
532 | + ]) ; | ||
513 | sp:where ([ rdf:type sp:NamedGraph ; | 533 | sp:where ([ rdf:type sp:NamedGraph ; |
514 | sp:elements ([ sp:object spin:_arg1 ; | 534 | sp:elements ([ sp:object spin:_arg1 ; |
515 | sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; | 535 | sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; |
516 | - sp:subject _:b12 | 536 | + sp:subject |
517 | - ] [ sp:object _:b13 ; | 537 | + [ sp:varName "share"^^xsd:string |
538 | + ] | ||
539 | + ] [ sp:object | ||
540 | + [ sp:varName "licence"^^xsd:string | ||
541 | + ] ; | ||
518 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceShared> ; | 542 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceShared> ; |
519 | - sp:subject _:b12 | 543 | + sp:subject |
544 | + [ sp:varName "share"^^xsd:string | ||
545 | + ] | ||
520 | ] [ sp:object <http://www.reportinghub.no/np/schema/npd#LS_Active> ; | 546 | ] [ sp:object <http://www.reportinghub.no/np/schema/npd#LS_Active> ; |
521 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceStatus> ; | 547 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceStatus> ; |
522 | - sp:subject _:b13 | 548 | + sp:subject |
523 | - ] [ sp:object _:b13 ; | 549 | + [ sp:varName "licence"^^xsd:string |
550 | + ] | ||
551 | + ] [ sp:object | ||
552 | + [ sp:varName "licence"^^xsd:string | ||
553 | + ] ; | ||
524 | sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; | 554 | sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; |
525 | - sp:subject _:b11 | 555 | + sp:subject |
556 | + [ sp:varName "wellBore"^^xsd:string | ||
557 | + ] | ||
558 | + ] [ rdf:type sp:Filter ; | ||
559 | + sp:expression | ||
560 | + [ rdf:type rhspin:shareIsValid ; | ||
561 | + arg:share | ||
562 | + [ sp:varName "share"^^xsd:string | ||
563 | + ] | ||
564 | + ] | ||
526 | ]) ; | 565 | ]) ; |
527 | sp:graphNameNode npdata:npd | 566 | sp:graphNameNode npdata:npd |
528 | ]) | 567 | ]) |
... | @@ -546,20 +585,25 @@ rhspin:companyHasLicenceOrBAA | ... | @@ -546,20 +585,25 @@ rhspin:companyHasLicenceOrBAA |
546 | sp:resultVariables ([ sp:varName "owner"^^xsd:string | 585 | sp:resultVariables ([ sp:varName "owner"^^xsd:string |
547 | ]) ; | 586 | ]) ; |
548 | sp:where ([ rdf:type sp:NamedGraph ; | 587 | sp:where ([ rdf:type sp:NamedGraph ; |
549 | - sp:elements ([ sp:object spin:_arg1 ; | 588 | + sp:elements ([ rdf:type sp:Union ; |
550 | - sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; | 589 | + sp:elements (([ sp:object spin:_arg1 ; |
551 | - sp:subject | 590 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; |
552 | - [ sp:varName "share"^^xsd:string | 591 | + sp:subject |
553 | - ] | 592 | + [ sp:varName "share"^^xsd:string |
554 | - ] [ rdf:type sp:Union ; | 593 | + ] |
555 | - sp:elements (([ sp:object | 594 | + ] [ sp:object |
556 | [ sp:varName "owner"^^xsd:string | 595 | [ sp:varName "owner"^^xsd:string |
557 | ] ; | 596 | ] ; |
558 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceShared> ; | 597 | sp:predicate <http://www.reportinghub.no/np/schema/npd#licenceShared> ; |
559 | sp:subject | 598 | sp:subject |
560 | [ sp:varName "share"^^xsd:string | 599 | [ sp:varName "share"^^xsd:string |
561 | ] | 600 | ] |
562 | - ]) ([ sp:object | 601 | + ]) ([ sp:object spin:_arg1 ; |
602 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#shareHolder> ; | ||
603 | + sp:subject | ||
604 | + [ sp:varName "share"^^xsd:string | ||
605 | + ] | ||
606 | + ] [ sp:object | ||
563 | [ sp:varName "owner"^^xsd:string | 607 | [ sp:varName "owner"^^xsd:string |
564 | ] ; | 608 | ] ; |
565 | sp:predicate <http://www.reportinghub.no/np/schema/npd#baaShared> ; | 609 | sp:predicate <http://www.reportinghub.no/np/schema/npd#baaShared> ; |
... | @@ -567,6 +611,13 @@ rhspin:companyHasLicenceOrBAA | ... | @@ -567,6 +611,13 @@ rhspin:companyHasLicenceOrBAA |
567 | [ sp:varName "share"^^xsd:string | 611 | [ sp:varName "share"^^xsd:string |
568 | ] | 612 | ] |
569 | ])) | 613 | ])) |
614 | + ] [ rdf:type sp:Filter ; | ||
615 | + sp:expression | ||
616 | + [ rdf:type rhspin:shareIsValid ; | ||
617 | + arg:share | ||
618 | + [ sp:varName "share"^^xsd:string | ||
619 | + ] | ||
620 | + ] | ||
570 | ]) ; | 621 | ]) ; |
571 | sp:graphNameNode npdata:npd | 622 | sp:graphNameNode npdata:npd |
572 | ]) | 623 | ]) |
... | @@ -626,6 +677,13 @@ rhspin:companyNameHasLicenceForGraph | ... | @@ -626,6 +677,13 @@ rhspin:companyNameHasLicenceForGraph |
626 | sp:subject | 677 | sp:subject |
627 | [ sp:varName "licence"^^xsd:string | 678 | [ sp:varName "licence"^^xsd:string |
628 | ] | 679 | ] |
680 | + ] [ rdf:type sp:Filter ; | ||
681 | + sp:expression | ||
682 | + [ rdf:type rhspin:shareIsValid ; | ||
683 | + arg:share | ||
684 | + [ sp:varName "share"^^xsd:string | ||
685 | + ] | ||
686 | + ] | ||
629 | ] [ sp:object | 687 | ] [ sp:object |
630 | [ sp:varName "id"^^xsd:string | 688 | [ sp:varName "id"^^xsd:string |
631 | ] ; | 689 | ] ; |
... | @@ -663,16 +721,16 @@ rhspin:companyWithName | ... | @@ -663,16 +721,16 @@ rhspin:companyWithName |
663 | rdfs:subClassOf spin:Functions ; | 721 | rdfs:subClassOf spin:Functions ; |
664 | spin:body | 722 | spin:body |
665 | [ rdf:type sp:Select ; | 723 | [ rdf:type sp:Select ; |
666 | - sp:resultVariables (_:b14) ; | 724 | + sp:resultVariables (_:b9) ; |
667 | sp:where ([ rdf:type sp:NamedGraph ; | 725 | sp:where ([ rdf:type sp:NamedGraph ; |
668 | sp:elements ([ sp:object | 726 | sp:elements ([ sp:object |
669 | [ sp:varName "name"^^xsd:string | 727 | [ sp:varName "name"^^xsd:string |
670 | ] ; | 728 | ] ; |
671 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | 729 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; |
672 | - sp:subject _:b14 | 730 | + sp:subject _:b9 |
673 | ] [ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ; | 731 | ] [ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ; |
674 | sp:predicate rdf:type ; | 732 | sp:predicate rdf:type ; |
675 | - sp:subject _:b14 | 733 | + sp:subject _:b9 |
676 | ]) ; | 734 | ]) ; |
677 | sp:graphNameNode npdata:npd | 735 | sp:graphNameNode npdata:npd |
678 | ]) | 736 | ]) |
... | @@ -737,33 +795,33 @@ rhspin:currentUserHasAccessToWellBoreWithId | ... | @@ -737,33 +795,33 @@ rhspin:currentUserHasAccessToWellBoreWithId |
737 | sp:expression | 795 | sp:expression |
738 | [ rdf:type rhspin:companyName | 796 | [ rdf:type rhspin:companyName |
739 | ] ; | 797 | ] ; |
740 | - sp:variable _:b15 | 798 | + sp:variable _:b10 |
741 | ] [ rdf:type sp:Bind ; | 799 | ] [ rdf:type sp:Bind ; |
742 | sp:expression | 800 | sp:expression |
743 | [ rdf:type rhspin:companyWithName ; | 801 | [ rdf:type rhspin:companyWithName ; |
744 | - arg:name _:b15 | 802 | + arg:name _:b10 |
745 | ] ; | 803 | ] ; |
746 | - sp:variable _:b16 | 804 | + sp:variable _:b11 |
747 | ] [ rdf:type sp:Bind ; | 805 | ] [ rdf:type sp:Bind ; |
748 | sp:expression | 806 | sp:expression |
749 | [ rdf:type rhspin:wellBoreById ; | 807 | [ rdf:type rhspin:wellBoreById ; |
750 | arg:id [ sp:varName "id"^^xsd:string | 808 | arg:id [ sp:varName "id"^^xsd:string |
751 | ] | 809 | ] |
752 | ] ; | 810 | ] ; |
753 | - sp:variable _:b17 | 811 | + sp:variable _:b12 |
754 | ] [ rdf:type sp:Filter ; | 812 | ] [ rdf:type sp:Filter ; |
755 | sp:expression | 813 | sp:expression |
756 | [ rdf:type sp:and ; | 814 | [ rdf:type sp:and ; |
757 | sp:arg1 [ rdf:type sp:bound ; | 815 | sp:arg1 [ rdf:type sp:bound ; |
758 | - sp:arg1 _:b17 | 816 | + sp:arg1 _:b12 |
759 | ] ; | 817 | ] ; |
760 | sp:arg2 [ rdf:type sp:bound ; | 818 | sp:arg2 [ rdf:type sp:bound ; |
761 | - sp:arg1 _:b16 | 819 | + sp:arg1 _:b11 |
762 | ] | 820 | ] |
763 | ] | 821 | ] |
764 | - ] [ sp:object _:b17 ; | 822 | + ] [ sp:object _:b12 ; |
765 | sp:predicate rhspin:companyHasLicenceForWellBore ; | 823 | sp:predicate rhspin:companyHasLicenceForWellBore ; |
766 | - sp:subject _:b16 | 824 | + sp:subject _:b11 |
767 | ]) | 825 | ]) |
768 | ] ; | 826 | ] ; |
769 | spin:constraint | 827 | spin:constraint |
... | @@ -961,13 +1019,13 @@ rhspin:dtypeValue | ... | @@ -961,13 +1019,13 @@ rhspin:dtypeValue |
961 | rdfs:subClassOf spl:OntologyFunctions ; | 1019 | rdfs:subClassOf spl:OntologyFunctions ; |
962 | spin:body | 1020 | spin:body |
963 | [ rdf:type sp:Select ; | 1021 | [ rdf:type sp:Select ; |
964 | - sp:resultVariables (_:b18) ; | 1022 | + sp:resultVariables (_:b13) ; |
965 | - sp:where ([ sp:object _:b19 ; | 1023 | + sp:where ([ sp:object _:b14 ; |
966 | sp:predicate spin:_arg2 ; | 1024 | sp:predicate spin:_arg2 ; |
967 | sp:subject spin:_arg1 | 1025 | sp:subject spin:_arg1 |
968 | - ] [ sp:object _:b18 ; | 1026 | + ] [ sp:object _:b13 ; |
969 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; | 1027 | sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; |
970 | - sp:subject _:b19 | 1028 | + sp:subject _:b14 |
971 | ]) | 1029 | ]) |
972 | ] ; | 1030 | ] ; |
973 | spin:constraint | 1031 | spin:constraint |
... | @@ -1219,9 +1277,9 @@ rhspin:licenceForWellBore | ... | @@ -1219,9 +1277,9 @@ rhspin:licenceForWellBore |
1219 | rdfs:subClassOf spin:Functions ; | 1277 | rdfs:subClassOf spin:Functions ; |
1220 | spin:body | 1278 | spin:body |
1221 | [ rdf:type sp:Select ; | 1279 | [ rdf:type sp:Select ; |
1222 | - sp:resultVariables (_:b20) ; | 1280 | + sp:resultVariables (_:b15) ; |
1223 | sp:where ([ rdf:type sp:NamedGraph ; | 1281 | sp:where ([ rdf:type sp:NamedGraph ; |
1224 | - sp:elements ([ sp:object _:b20 ; | 1282 | + sp:elements ([ sp:object _:b15 ; |
1225 | sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; | 1283 | sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; |
1226 | sp:subject | 1284 | sp:subject |
1227 | [ sp:varName "wellBore"^^xsd:string | 1285 | [ sp:varName "wellBore"^^xsd:string |
... | @@ -1245,7 +1303,7 @@ rhspin:normalizeString | ... | @@ -1245,7 +1303,7 @@ rhspin:normalizeString |
1245 | rdfs:subClassOf spl:StringFunctions ; | 1303 | rdfs:subClassOf spl:StringFunctions ; |
1246 | spin:body | 1304 | spin:body |
1247 | [ rdf:type sp:Select ; | 1305 | [ rdf:type sp:Select ; |
1248 | - sp:resultVariables (_:b21) ; | 1306 | + sp:resultVariables (_:b16) ; |
1249 | sp:where ([ rdf:type sp:Bind ; | 1307 | sp:where ([ rdf:type sp:Bind ; |
1250 | sp:expression | 1308 | sp:expression |
1251 | [ rdf:type spif:regex ; | 1309 | [ rdf:type spif:regex ; |
... | @@ -1253,67 +1311,67 @@ rhspin:normalizeString | ... | @@ -1253,67 +1311,67 @@ rhspin:normalizeString |
1253 | sp:arg2 "\\((.*)\\)" ; | 1311 | sp:arg2 "\\((.*)\\)" ; |
1254 | sp:arg3 "" | 1312 | sp:arg3 "" |
1255 | ] ; | 1313 | ] ; |
1256 | - sp:variable _:b22 | 1314 | + sp:variable _:b17 |
1257 | ] [ rdf:type sp:Bind ; | 1315 | ] [ rdf:type sp:Bind ; |
1258 | sp:expression | 1316 | sp:expression |
1259 | [ rdf:type spif:trim ; | 1317 | [ rdf:type spif:trim ; |
1260 | - sp:arg1 _:b22 | 1318 | + sp:arg1 _:b17 |
1261 | ] ; | 1319 | ] ; |
1262 | - sp:variable _:b23 | 1320 | + sp:variable _:b18 |
1263 | ] [ rdf:type sp:Bind ; | 1321 | ] [ rdf:type sp:Bind ; |
1264 | sp:expression | 1322 | sp:expression |
1265 | [ rdf:type spif:encodeURL ; | 1323 | [ rdf:type spif:encodeURL ; |
1266 | - sp:arg1 _:b23 | 1324 | + sp:arg1 _:b18 |
1267 | ] ; | 1325 | ] ; |
1268 | - sp:variable _:b24 | 1326 | + sp:variable _:b19 |
1269 | ] [ rdf:type sp:Bind ; | 1327 | ] [ rdf:type sp:Bind ; |
1270 | sp:expression | 1328 | sp:expression |
1271 | [ rdf:type spif:regex ; | 1329 | [ rdf:type spif:regex ; |
1272 | - sp:arg1 _:b24 ; | 1330 | + sp:arg1 _:b19 ; |
1273 | sp:arg2 "%2F" ; | 1331 | sp:arg2 "%2F" ; |
1274 | sp:arg3 "_" | 1332 | sp:arg3 "_" |
1275 | ] ; | 1333 | ] ; |
1276 | - sp:variable _:b25 | 1334 | + sp:variable _:b20 |
1277 | ] [ rdf:type sp:Bind ; | 1335 | ] [ rdf:type sp:Bind ; |
1278 | sp:expression | 1336 | sp:expression |
1279 | [ rdf:type spif:regex ; | 1337 | [ rdf:type spif:regex ; |
1280 | - sp:arg1 _:b25 ; | 1338 | + sp:arg1 _:b20 ; |
1281 | sp:arg2 "%[0-9A-F][0-9A-F]" ; | 1339 | sp:arg2 "%[0-9A-F][0-9A-F]" ; |
1282 | sp:arg3 "" | 1340 | sp:arg3 "" |
1283 | ] ; | 1341 | ] ; |
1284 | - sp:variable _:b26 | 1342 | + sp:variable _:b21 |
1285 | ] [ rdf:type sp:Bind ; | 1343 | ] [ rdf:type sp:Bind ; |
1286 | sp:expression | 1344 | sp:expression |
1287 | [ rdf:type spif:regex ; | 1345 | [ rdf:type spif:regex ; |
1288 | - sp:arg1 _:b26 ; | 1346 | + sp:arg1 _:b21 ; |
1289 | sp:arg2 "\\+" ; | 1347 | sp:arg2 "\\+" ; |
1290 | sp:arg3 "_" | 1348 | sp:arg3 "_" |
1291 | ] ; | 1349 | ] ; |
1292 | - sp:variable _:b27 | 1350 | + sp:variable _:b22 |
1293 | ] [ rdf:type sp:Bind ; | 1351 | ] [ rdf:type sp:Bind ; |
1294 | sp:expression | 1352 | sp:expression |
1295 | [ rdf:type spif:regex ; | 1353 | [ rdf:type spif:regex ; |
1296 | - sp:arg1 _:b27 ; | 1354 | + sp:arg1 _:b22 ; |
1297 | sp:arg2 "_+" ; | 1355 | sp:arg2 "_+" ; |
1298 | sp:arg3 "_" | 1356 | sp:arg3 "_" |
1299 | ] ; | 1357 | ] ; |
1300 | - sp:variable _:b28 | 1358 | + sp:variable _:b23 |
1301 | ] [ rdf:type sp:Bind ; | 1359 | ] [ rdf:type sp:Bind ; |
1302 | sp:expression | 1360 | sp:expression |
1303 | [ rdf:type spif:regex ; | 1361 | [ rdf:type spif:regex ; |
1304 | - sp:arg1 _:b28 ; | 1362 | + sp:arg1 _:b23 ; |
1305 | sp:arg2 "\\*" ; | 1363 | sp:arg2 "\\*" ; |
1306 | sp:arg3 "" | 1364 | sp:arg3 "" |
1307 | ] ; | 1365 | ] ; |
1308 | - sp:variable _:b29 | 1366 | + sp:variable _:b24 |
1309 | ] [ rdf:type sp:Bind ; | 1367 | ] [ rdf:type sp:Bind ; |
1310 | sp:expression | 1368 | sp:expression |
1311 | [ rdf:type xsd:string ; | 1369 | [ rdf:type xsd:string ; |
1312 | sp:arg1 [ rdf:type spif:upperCase ; | 1370 | sp:arg1 [ rdf:type spif:upperCase ; |
1313 | - sp:arg1 _:b29 | 1371 | + sp:arg1 _:b24 |
1314 | ] | 1372 | ] |
1315 | ] ; | 1373 | ] ; |
1316 | - sp:variable _:b21 | 1374 | + sp:variable _:b16 |
1317 | ]) | 1375 | ]) |
1318 | ] ; | 1376 | ] ; |
1319 | spin:constraint | 1377 | spin:constraint |
... | @@ -1543,9 +1601,9 @@ rhspin:npdId | ... | @@ -1543,9 +1601,9 @@ rhspin:npdId |
1543 | rdfs:subClassOf spl:StringFunctions ; | 1601 | rdfs:subClassOf spl:StringFunctions ; |
1544 | spin:body | 1602 | spin:body |
1545 | [ rdf:type sp:Select ; | 1603 | [ rdf:type sp:Select ; |
1546 | - sp:resultVariables (_:b30) ; | 1604 | + sp:resultVariables (_:b25) ; |
1547 | sp:where ([ rdf:type sp:NamedGraph ; | 1605 | sp:where ([ rdf:type sp:NamedGraph ; |
1548 | - sp:elements ([ sp:object _:b30 ; | 1606 | + sp:elements ([ sp:object _:b25 ; |
1549 | sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; | 1607 | sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; |
1550 | sp:subject | 1608 | sp:subject |
1551 | [ sp:varName "resource"^^xsd:string | 1609 | [ sp:varName "resource"^^xsd:string |
... | @@ -1718,9 +1776,9 @@ rhspin:npdName | ... | @@ -1718,9 +1776,9 @@ rhspin:npdName |
1718 | rdfs:subClassOf spl:StringFunctions ; | 1776 | rdfs:subClassOf spl:StringFunctions ; |
1719 | spin:body | 1777 | spin:body |
1720 | [ rdf:type sp:Select ; | 1778 | [ rdf:type sp:Select ; |
1721 | - sp:resultVariables (_:b31) ; | 1779 | + sp:resultVariables (_:b26) ; |
1722 | sp:where ([ rdf:type sp:NamedGraph ; | 1780 | sp:where ([ rdf:type sp:NamedGraph ; |
1723 | - sp:elements ([ sp:object _:b31 ; | 1781 | + sp:elements ([ sp:object _:b26 ; |
1724 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | 1782 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; |
1725 | sp:subject | 1783 | sp:subject |
1726 | [ sp:varName "resource"^^xsd:string | 1784 | [ sp:varName "resource"^^xsd:string |
... | @@ -1797,6 +1855,52 @@ rhspin:parentCompanyByName | ... | @@ -1797,6 +1855,52 @@ rhspin:parentCompanyByName |
1797 | ] ; | 1855 | ] ; |
1798 | spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> . | 1856 | spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> . |
1799 | 1857 | ||
1858 | +rhspin:shareIsValid | ||
1859 | + rdf:type spin:Function ; | ||
1860 | + rdfs:comment "Tests whether a Share is still active, i.e. its end date must either be empty or after the current date."^^xsd:string ; | ||
1861 | + rdfs:label "share is valid"^^xsd:string ; | ||
1862 | + rdfs:subClassOf spin:Functions ; | ||
1863 | + spin:body | ||
1864 | + [ rdf:type sp:Ask ; | ||
1865 | + sp:where ([ rdf:type sp:Bind ; | ||
1866 | + sp:expression | ||
1867 | + [ rdf:type spl:object ; | ||
1868 | + sp:arg1 [ sp:varName "share"^^xsd:string | ||
1869 | + ] ; | ||
1870 | + sp:arg2 <http://www.reportinghub.no/np/schema/npd#endDate> | ||
1871 | + ] ; | ||
1872 | + sp:variable | ||
1873 | + [ sp:varName "endDate"^^xsd:string | ||
1874 | + ] | ||
1875 | + ] [ rdf:type sp:Filter ; | ||
1876 | + sp:expression | ||
1877 | + [ rdf:type sp:or ; | ||
1878 | + sp:arg1 [ rdf:type sp:not ; | ||
1879 | + sp:arg1 [ rdf:type sp:bound ; | ||
1880 | + sp:arg1 [ sp:varName "endDate"^^xsd:string | ||
1881 | + ] | ||
1882 | + ] | ||
1883 | + ] ; | ||
1884 | + sp:arg2 [ rdf:type sp:ge ; | ||
1885 | + sp:arg1 [ sp:varName "endDate"^^xsd:string | ||
1886 | + ] ; | ||
1887 | + sp:arg2 [ rdf:type xsd:date ; | ||
1888 | + sp:arg1 [ rdf:type sp:now | ||
1889 | + ] | ||
1890 | + ] | ||
1891 | + ] | ||
1892 | + ] | ||
1893 | + ]) | ||
1894 | + ] ; | ||
1895 | + spin:constraint | ||
1896 | + [ rdf:type spl:Argument ; | ||
1897 | + rdfs:comment "The Share to test."^^xsd:string ; | ||
1898 | + spl:predicate arg:share ; | ||
1899 | + spl:valueType <http://www.reportinghub.no/np/schema/npd#Share> | ||
1900 | + ] ; | ||
1901 | + spin:private "true"^^xsd:boolean ; | ||
1902 | + spin:returnType xsd:boolean . | ||
1903 | + | ||
1800 | rhspin:tableHeaders | 1904 | rhspin:tableHeaders |
1801 | rdf:type owl:ObjectProperty ; | 1905 | rdf:type owl:ObjectProperty ; |
1802 | rdfs:comment "Points to an rdf:List of xsd:string literals, one for each result column of the associated template."^^xsd:string ; | 1906 | rdfs:comment "Points to an rdf:List of xsd:string literals, one for each result column of the associated template."^^xsd:string ; |
... | @@ -1949,86 +2053,71 @@ rhspin:wellByName | ... | @@ -1949,86 +2053,71 @@ rhspin:wellByName |
1949 | ] ; | 2053 | ] ; |
1950 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . | 2054 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . |
1951 | 2055 | ||
1952 | -_:b31 | 2056 | +_:b1 sp:varName "subject"^^xsd:string . |
1953 | - sp:varName "name"^^xsd:string . | ||
1954 | - | ||
1955 | -_:b30 | ||
1956 | - sp:varName "id"^^xsd:string . | ||
1957 | - | ||
1958 | -_:b29 | ||
1959 | - sp:varName "t4"^^xsd:string . | ||
1960 | - | ||
1961 | -_:b28 | ||
1962 | - sp:varName "t3"^^xsd:string . | ||
1963 | 2057 | ||
1964 | -_:b27 | 2058 | +_:b2 sp:varName "wellBoreName"^^xsd:string . |
1965 | - sp:varName "t2"^^xsd:string . | ||
1966 | 2059 | ||
1967 | -_:b26 | 2060 | +_:b3 sp:varName "wellBoreId"^^xsd:string . |
1968 | - sp:varName "t1"^^xsd:string . | ||
1969 | 2061 | ||
1970 | -_:b25 | 2062 | +_:b4 sp:varName "wellBore"^^xsd:string . |
1971 | - sp:varName "t0b"^^xsd:string . | ||
1972 | 2063 | ||
1973 | -_:b24 | 2064 | +_:b5 sp:varName "wellName"^^xsd:string . |
1974 | - sp:varName "t0a"^^xsd:string . | ||
1975 | 2065 | ||
1976 | -_:b23 | 2066 | +_:b6 sp:varName "well"^^xsd:string . |
1977 | - sp:varName "s2"^^xsd:string . | ||
1978 | 2067 | ||
1979 | -_:b22 | 2068 | +_:b7 sp:varName "company"^^xsd:string . |
1980 | - sp:varName "s1"^^xsd:string . | ||
1981 | 2069 | ||
1982 | -_:b21 | 2070 | +_:b8 sp:varName "wellBore"^^xsd:string . |
1983 | - sp:varName "normalizedStr"^^xsd:string . | ||
1984 | 2071 | ||
1985 | -_:b20 | 2072 | +_:b9 sp:varName "company"^^xsd:string . |
1986 | - sp:varName "licence"^^xsd:string . | ||
1987 | 2073 | ||
1988 | -_:b19 | 2074 | +_:b10 |
1989 | - sp:varName "reif"^^xsd:string . | 2075 | + sp:varName "companyName"^^xsd:string . |
1990 | 2076 | ||
1991 | -_:b18 | 2077 | +_:b11 |
1992 | - sp:varName "value"^^xsd:string . | 2078 | + sp:varName "company"^^xsd:string . |
1993 | 2079 | ||
1994 | -_:b17 | 2080 | +_:b12 |
1995 | sp:varName "wellBore"^^xsd:string . | 2081 | sp:varName "wellBore"^^xsd:string . |
1996 | 2082 | ||
1997 | -_:b16 | 2083 | +_:b13 |
1998 | - sp:varName "company"^^xsd:string . | 2084 | + sp:varName "value"^^xsd:string . |
1999 | - | ||
2000 | -_:b15 | ||
2001 | - sp:varName "companyName"^^xsd:string . | ||
2002 | 2085 | ||
2003 | _:b14 | 2086 | _:b14 |
2004 | - sp:varName "company"^^xsd:string . | 2087 | + sp:varName "reif"^^xsd:string . |
2005 | 2088 | ||
2006 | -_:b13 | 2089 | +_:b15 |
2007 | sp:varName "licence"^^xsd:string . | 2090 | sp:varName "licence"^^xsd:string . |
2008 | 2091 | ||
2009 | -_:b12 | 2092 | +_:b16 |
2010 | - sp:varName "share"^^xsd:string . | 2093 | + sp:varName "normalizedStr"^^xsd:string . |
2011 | - | ||
2012 | -_:b11 | ||
2013 | - sp:varName "wellBore"^^xsd:string . | ||
2014 | 2094 | ||
2015 | -_:b10 | 2095 | +_:b17 |
2016 | - sp:varName "share"^^xsd:string . | 2096 | + sp:varName "s1"^^xsd:string . |
2017 | 2097 | ||
2018 | -_:b9 sp:varName "licence"^^xsd:string . | 2098 | +_:b18 |
2099 | + sp:varName "s2"^^xsd:string . | ||
2019 | 2100 | ||
2020 | -_:b8 sp:varName "wellBore"^^xsd:string . | 2101 | +_:b19 |
2102 | + sp:varName "t0a"^^xsd:string . | ||
2021 | 2103 | ||
2022 | -_:b7 sp:varName "company"^^xsd:string . | 2104 | +_:b20 |
2105 | + sp:varName "t0b"^^xsd:string . | ||
2023 | 2106 | ||
2024 | -_:b6 sp:varName "well"^^xsd:string . | 2107 | +_:b21 |
2108 | + sp:varName "t1"^^xsd:string . | ||
2025 | 2109 | ||
2026 | -_:b5 sp:varName "wellName"^^xsd:string . | 2110 | +_:b22 |
2111 | + sp:varName "t2"^^xsd:string . | ||
2027 | 2112 | ||
2028 | -_:b4 sp:varName "wellBore"^^xsd:string . | 2113 | +_:b23 |
2114 | + sp:varName "t3"^^xsd:string . | ||
2029 | 2115 | ||
2030 | -_:b3 sp:varName "wellBoreId"^^xsd:string . | 2116 | +_:b24 |
2117 | + sp:varName "t4"^^xsd:string . | ||
2031 | 2118 | ||
2032 | -_:b2 sp:varName "wellBoreName"^^xsd:string . | 2119 | +_:b25 |
2120 | + sp:varName "id"^^xsd:string . | ||
2033 | 2121 | ||
2034 | -_:b1 sp:varName "subject"^^xsd:string . | 2122 | +_:b26 |
2123 | + sp:varName "name"^^xsd:string . | ... | ... |
-
Please register or login to post a comment