Showing
1 changed file
with
102 additions
and
40 deletions
| ... | @@ -134,14 +134,14 @@ arg:wellName | ... | @@ -134,14 +134,14 @@ arg:wellName |
| 134 | ] ; | 134 | ] ; |
| 135 | spin:constraint | 135 | spin:constraint |
| 136 | [ rdf:type spl:Argument ; | 136 | [ rdf:type spl:Argument ; |
| 137 | - rdfs:comment "The property that must be used in the result resource."^^xsd:string ; | 137 | + rdfs:comment "The value to match against."^^xsd:string ; |
| 138 | - spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; | 138 | + spl:predicate sp:arg1 |
| 139 | - spl:valueType rdf:Property | ||
| 140 | ] ; | 139 | ] ; |
| 141 | spin:constraint | 140 | spin:constraint |
| 142 | [ rdf:type spl:Argument ; | 141 | [ rdf:type spl:Argument ; |
| 143 | - rdfs:comment "The value to match against."^^xsd:string ; | 142 | + rdfs:comment "The property that must be used in the result resource."^^xsd:string ; |
| 144 | - spl:predicate sp:arg1 | 143 | + spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; |
| 144 | + spl:valueType rdf:Property | ||
| 145 | ] ; | 145 | ] ; |
| 146 | spin:returnType rdfs:Resource . | 146 | spin:returnType rdfs:Resource . |
| 147 | 147 | ||
| ... | @@ -664,15 +664,15 @@ rhspin:WDRTableTemplates | ... | @@ -664,15 +664,15 @@ rhspin:WDRTableTemplates |
| 664 | spin:abstract "true"^^xsd:boolean ; | 664 | spin:abstract "true"^^xsd:boolean ; |
| 665 | spin:constraint | 665 | spin:constraint |
| 666 | [ rdf:type spl:Argument ; | 666 | [ rdf:type spl:Argument ; |
| 667 | - rdfs:comment "The DDR that serves as root of the query."^^xsd:string ; | ||
| 668 | - spl:predicate arg:wellBore ; | ||
| 669 | - spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | ||
| 670 | - ] ; | ||
| 671 | - spin:constraint | ||
| 672 | - [ rdf:type spl:Argument ; | ||
| 673 | rdfs:comment "The start date of the reporting week."^^xsd:string ; | 667 | rdfs:comment "The start date of the reporting week."^^xsd:string ; |
| 674 | spl:predicate arg:startDate ; | 668 | spl:predicate arg:startDate ; |
| 675 | spl:valueType xsd:date | 669 | spl:valueType xsd:date |
| 670 | + ] ; | ||
| 671 | + spin:constraint | ||
| 672 | + [ rdf:type spl:Argument ; | ||
| 673 | + rdfs:comment "The DDR that serves as root of the query."^^xsd:string ; | ||
| 674 | + spl:predicate arg:wellBore ; | ||
| 675 | + spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | ||
| 676 | ] . | 676 | ] . |
| 677 | 677 | ||
| 678 | rhspin:baaById | 678 | rhspin:baaById |
| ... | @@ -1022,6 +1022,68 @@ rhspin:companyWithName | ... | @@ -1022,6 +1022,68 @@ rhspin:companyWithName |
| 1022 | ] ; | 1022 | ] ; |
| 1023 | spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> . | 1023 | spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> . |
| 1024 | 1024 | ||
| 1025 | +rhspin:currentUserHasAccessToFieldByName | ||
| 1026 | + rdf:type spin:Function ; | ||
| 1027 | + rdfs:comment "Tests whether the currently logged in user is working for a company that has a share in a licence or BAA for a field with a given name. This function is used by the download service to validate access privileges."^^xsd:string ; | ||
| 1028 | + rdfs:label "current user has access to field by name"^^xsd:string ; | ||
| 1029 | + rdfs:subClassOf spin:Functions ; | ||
| 1030 | + spin:body | ||
| 1031 | + [ rdf:type sp:Ask ; | ||
| 1032 | + sp:where ([ rdf:type sp:Bind ; | ||
| 1033 | + sp:expression | ||
| 1034 | + [ rdf:type rhspin:companyName | ||
| 1035 | + ] ; | ||
| 1036 | + sp:variable | ||
| 1037 | + [ sp:varName "companyName"^^xsd:string | ||
| 1038 | + ] | ||
| 1039 | + ] [ rdf:type sp:Bind ; | ||
| 1040 | + sp:expression | ||
| 1041 | + [ rdf:type rhspin:companyWithName ; | ||
| 1042 | + arg:name | ||
| 1043 | + [ sp:varName "companyName"^^xsd:string | ||
| 1044 | + ] | ||
| 1045 | + ] ; | ||
| 1046 | + sp:variable | ||
| 1047 | + [ sp:varName "company"^^xsd:string | ||
| 1048 | + ] | ||
| 1049 | + ] [ rdf:type sp:Bind ; | ||
| 1050 | + sp:expression | ||
| 1051 | + [ rdf:type rhspin:npdIndividualByName ; | ||
| 1052 | + arg:name | ||
| 1053 | + [ sp:varName "fieldName"^^xsd:string | ||
| 1054 | + ] ; | ||
| 1055 | + arg:type <http://www.reportinghub.no/ep/schema/facility#Field> | ||
| 1056 | + ] ; | ||
| 1057 | + sp:variable | ||
| 1058 | + [ sp:varName "field"^^xsd:string | ||
| 1059 | + ] | ||
| 1060 | + ] [ rdf:type sp:NamedGraph ; | ||
| 1061 | + sp:elements ([ sp:object | ||
| 1062 | + [ sp:varName "owner"^^xsd:string | ||
| 1063 | + ] ; | ||
| 1064 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#fieldOwner> ; | ||
| 1065 | + sp:subject | ||
| 1066 | + [ sp:varName "field"^^xsd:string | ||
| 1067 | + ] | ||
| 1068 | + ]) ; | ||
| 1069 | + sp:graphNameNode npdata:npd | ||
| 1070 | + ] [ sp:object | ||
| 1071 | + [ sp:varName "owner"^^xsd:string | ||
| 1072 | + ] ; | ||
| 1073 | + sp:predicate rhspin:companyHasLicenceOrBAA ; | ||
| 1074 | + sp:subject | ||
| 1075 | + [ sp:varName "company"^^xsd:string | ||
| 1076 | + ] | ||
| 1077 | + ]) | ||
| 1078 | + ] ; | ||
| 1079 | + spin:constraint | ||
| 1080 | + [ rdf:type spl:Argument ; | ||
| 1081 | + rdfs:comment "The name of the field to check."^^xsd:string ; | ||
| 1082 | + spl:predicate arg:fieldName ; | ||
| 1083 | + spl:valueType xsd:string | ||
| 1084 | + ] ; | ||
| 1085 | + spin:returnType xsd:boolean . | ||
| 1086 | + | ||
| 1025 | rhspin:currentUserHasAccessToOwner | 1087 | rhspin:currentUserHasAccessToOwner |
| 1026 | rdf:type spin:Function ; | 1088 | rdf:type spin:Function ; |
| 1027 | 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 ; | 1089 | 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 ; |
| ... | @@ -1404,16 +1466,16 @@ rhspin:ddrOfWeek | ... | @@ -1404,16 +1466,16 @@ rhspin:ddrOfWeek |
| 1404 | ] ; | 1466 | ] ; |
| 1405 | spin:constraint | 1467 | spin:constraint |
| 1406 | [ rdf:type spl:Argument ; | 1468 | [ rdf:type spl:Argument ; |
| 1407 | - rdfs:comment "The well bore that the DDR must be about."^^xsd:string ; | ||
| 1408 | - spl:predicate sp:arg2 ; | ||
| 1409 | - spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | ||
| 1410 | - ] ; | ||
| 1411 | - spin:constraint | ||
| 1412 | - [ rdf:type spl:Argument ; | ||
| 1413 | rdfs:comment "The first day of the week."^^xsd:string ; | 1469 | rdfs:comment "The first day of the week."^^xsd:string ; |
| 1414 | spl:predicate sp:arg1 ; | 1470 | spl:predicate sp:arg1 ; |
| 1415 | spl:valueType xsd:date | 1471 | spl:valueType xsd:date |
| 1416 | ] ; | 1472 | ] ; |
| 1473 | + spin:constraint | ||
| 1474 | + [ rdf:type spl:Argument ; | ||
| 1475 | + rdfs:comment "The well bore that the DDR must be about."^^xsd:string ; | ||
| 1476 | + spl:predicate sp:arg2 ; | ||
| 1477 | + spl:valueType <http://www.reportinghub.no/ep/schema/well#WellBore> | ||
| 1478 | + ] ; | ||
| 1417 | spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> . | 1479 | spin:returnType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> . |
| 1418 | 1480 | ||
| 1419 | rhspin:ddrWellBoreId | 1481 | rhspin:ddrWellBoreId |
| ... | @@ -1510,15 +1572,15 @@ rhspin:dtypeValue | ... | @@ -1510,15 +1572,15 @@ rhspin:dtypeValue |
| 1510 | ] ; | 1572 | ] ; |
| 1511 | spin:constraint | 1573 | spin:constraint |
| 1512 | [ rdf:type spl:Argument ; | 1574 | [ rdf:type spl:Argument ; |
| 1513 | - rdfs:comment "The predicate that points to the reified value."^^xsd:string ; | ||
| 1514 | - spl:predicate sp:arg2 ; | ||
| 1515 | - spl:valueType rdf:Property | ||
| 1516 | - ] ; | ||
| 1517 | - spin:constraint | ||
| 1518 | - [ rdf:type spl:Argument ; | ||
| 1519 | rdfs:comment "The subject of the value."^^xsd:string ; | 1575 | rdfs:comment "The subject of the value."^^xsd:string ; |
| 1520 | spl:predicate sp:arg1 ; | 1576 | spl:predicate sp:arg1 ; |
| 1521 | spl:valueType rdfs:Resource | 1577 | spl:valueType rdfs:Resource |
| 1578 | + ] ; | ||
| 1579 | + spin:constraint | ||
| 1580 | + [ rdf:type spl:Argument ; | ||
| 1581 | + rdfs:comment "The predicate that points to the reified value."^^xsd:string ; | ||
| 1582 | + spl:predicate sp:arg2 ; | ||
| 1583 | + spl:valueType rdf:Property | ||
| 1522 | ] . | 1584 | ] . |
| 1523 | 1585 | ||
| 1524 | rhspin:facilityById | 1586 | rhspin:facilityById |
| ... | @@ -2408,17 +2470,17 @@ rhspin:npdIndividualById | ... | @@ -2408,17 +2470,17 @@ rhspin:npdIndividualById |
| 2408 | ] ; | 2470 | ] ; |
| 2409 | spin:constraint | 2471 | spin:constraint |
| 2410 | [ rdf:type spl:Argument ; | 2472 | [ rdf:type spl:Argument ; |
| 2473 | + rdfs:comment "The NPD id to match."^^xsd:string ; | ||
| 2474 | + spl:predicate arg:id ; | ||
| 2475 | + spl:valueType xsd:string | ||
| 2476 | + ] ; | ||
| 2477 | + spin:constraint | ||
| 2478 | + [ rdf:type spl:Argument ; | ||
| 2411 | rdfs:comment "The rdf:type that the result must have."^^xsd:string ; | 2479 | rdfs:comment "The rdf:type that the result must have."^^xsd:string ; |
| 2412 | spl:optional "true"^^xsd:boolean ; | 2480 | spl:optional "true"^^xsd:boolean ; |
| 2413 | spl:predicate arg:type ; | 2481 | spl:predicate arg:type ; |
| 2414 | spl:valueType rdfs:Class | 2482 | spl:valueType rdfs:Class |
| 2415 | ] ; | 2483 | ] ; |
| 2416 | - spin:constraint | ||
| 2417 | - [ rdf:type spl:Argument ; | ||
| 2418 | - rdfs:comment "The NPD id to match."^^xsd:string ; | ||
| 2419 | - spl:predicate arg:id ; | ||
| 2420 | - spl:valueType xsd:string | ||
| 2421 | - ] ; | ||
| 2422 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . | 2484 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . |
| 2423 | 2485 | ||
| 2424 | rhspin:npdIndividualByName | 2486 | rhspin:npdIndividualByName |
| ... | @@ -2483,17 +2545,17 @@ rhspin:npdIndividualByName | ... | @@ -2483,17 +2545,17 @@ rhspin:npdIndividualByName |
| 2483 | ] ; | 2545 | ] ; |
| 2484 | spin:constraint | 2546 | spin:constraint |
| 2485 | [ rdf:type spl:Argument ; | 2547 | [ rdf:type spl:Argument ; |
| 2548 | + rdfs:comment "The NPD name to match."^^xsd:string ; | ||
| 2549 | + spl:predicate arg:name ; | ||
| 2550 | + spl:valueType xsd:string | ||
| 2551 | + ] ; | ||
| 2552 | + spin:constraint | ||
| 2553 | + [ rdf:type spl:Argument ; | ||
| 2486 | rdfs:comment "The rdf:type that the result must have."^^xsd:string ; | 2554 | rdfs:comment "The rdf:type that the result must have."^^xsd:string ; |
| 2487 | spl:optional "true"^^xsd:boolean ; | 2555 | spl:optional "true"^^xsd:boolean ; |
| 2488 | spl:predicate arg:type ; | 2556 | spl:predicate arg:type ; |
| 2489 | spl:valueType rdfs:Class | 2557 | spl:valueType rdfs:Class |
| 2490 | ] ; | 2558 | ] ; |
| 2491 | - spin:constraint | ||
| 2492 | - [ rdf:type spl:Argument ; | ||
| 2493 | - rdfs:comment "The NPD name to match."^^xsd:string ; | ||
| 2494 | - spl:predicate arg:name ; | ||
| 2495 | - spl:valueType xsd:string | ||
| 2496 | - ] ; | ||
| 2497 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . | 2559 | spin:returnType <http://www.reportinghub.no/np/schema/npd#Individual> . |
| 2498 | 2560 | ||
| 2499 | rhspin:npdName | 2561 | rhspin:npdName |
| ... | @@ -2542,8 +2604,9 @@ rhspin:npdTripleExists | ... | @@ -2542,8 +2604,9 @@ rhspin:npdTripleExists |
| 2542 | ] ; | 2604 | ] ; |
| 2543 | spin:constraint | 2605 | spin:constraint |
| 2544 | [ rdf:type spl:Argument ; | 2606 | [ rdf:type spl:Argument ; |
| 2545 | - rdfs:comment "The object to match."^^xsd:string ; | 2607 | + rdfs:comment "The subject to find"^^xsd:string ; |
| 2546 | - spl:predicate sp:arg3 | 2608 | + spl:predicate sp:arg1 ; |
| 2609 | + spl:valueType rdfs:Resource | ||
| 2547 | ] ; | 2610 | ] ; |
| 2548 | spin:constraint | 2611 | spin:constraint |
| 2549 | [ rdf:type spl:Argument ; | 2612 | [ rdf:type spl:Argument ; |
| ... | @@ -2553,9 +2616,8 @@ rhspin:npdTripleExists | ... | @@ -2553,9 +2616,8 @@ rhspin:npdTripleExists |
| 2553 | ] ; | 2616 | ] ; |
| 2554 | spin:constraint | 2617 | spin:constraint |
| 2555 | [ rdf:type spl:Argument ; | 2618 | [ rdf:type spl:Argument ; |
| 2556 | - rdfs:comment "The subject to find"^^xsd:string ; | 2619 | + rdfs:comment "The object to match."^^xsd:string ; |
| 2557 | - spl:predicate sp:arg1 ; | 2620 | + spl:predicate sp:arg3 |
| 2558 | - spl:valueType rdfs:Resource | ||
| 2559 | ] ; | 2621 | ] ; |
| 2560 | spin:returnType xsd:boolean . | 2622 | spin:returnType xsd:boolean . |
| 2561 | 2623 | ... | ... |
-
Please register or login to post a comment