Adjusted constraints to new ontologies
Added normalization to wellBoreByName function
Showing
3 changed files
with
92 additions
and
82 deletions
This diff is collapsed. Click to expand it.
| 1 | -# Saved by TopBraid on Thu Sep 15 16:25:34 BST 2011 | ||
| 2 | # baseURI: http://www.reportinghub.no/ep/spin/report-constraints | 1 | # baseURI: http://www.reportinghub.no/ep/spin/report-constraints |
| 3 | -# imports: http://www.reportinghub.no/ep/schema/1.0/organization | 2 | +# imports: http://spinrdf.org/spin |
| 4 | -# imports: http://www.reportinghub.no/ep/schema/1.0/report | 3 | +# imports: http://www.reportinghub.no/ep/schema/1.0/activity |
| 5 | -# imports: http://www.reportinghub.no/ep/schema/1.0/well | ||
| 6 | # imports: http://www.reportinghub.no/ep/schema/1.0/core | 4 | # imports: http://www.reportinghub.no/ep/schema/1.0/core |
| 7 | # imports: http://www.reportinghub.no/ep/schema/1.0/equipment | 5 | # imports: http://www.reportinghub.no/ep/schema/1.0/equipment |
| 8 | -# imports: http://www.reportinghub.no/ep/schema/1.0/activity | ||
| 9 | # imports: http://www.reportinghub.no/ep/schema/1.0/facility | 6 | # imports: http://www.reportinghub.no/ep/schema/1.0/facility |
| 7 | +# imports: http://www.reportinghub.no/ep/schema/1.0/organization | ||
| 8 | +# imports: http://www.reportinghub.no/ep/schema/1.0/report | ||
| 9 | +# imports: http://www.reportinghub.no/ep/schema/1.0/well | ||
| 10 | # imports: http://www.reportinghub.no/np/schema/1.0/npd | 10 | # imports: http://www.reportinghub.no/np/schema/1.0/npd |
| 11 | -# imports: http://spinrdf.org/spin | ||
| 12 | # imports: http://www.reportinghub.no/spin/rh | 11 | # imports: http://www.reportinghub.no/spin/rh |
| 13 | 12 | ||
| 14 | @prefix : <http://www.reportinghub.no/ep/spin/report-constraints#> . | 13 | @prefix : <http://www.reportinghub.no/ep/spin/report-constraints#> . |
| ... | @@ -35,7 +34,7 @@ | ... | @@ -35,7 +34,7 @@ |
| 35 | <http://www.reportinghub.no/ep/spin/report-constraints> | 34 | <http://www.reportinghub.no/ep/spin/report-constraints> |
| 36 | rdf:type owl:Ontology ; | 35 | rdf:type owl:Ontology ; |
| 37 | rdfs:comment "Constraints that need to be executed after ep-report:Report generation (without SXML triples)."^^xsd:string ; | 36 | rdfs:comment "Constraints that need to be executed after ep-report:Report generation (without SXML triples)."^^xsd:string ; |
| 38 | - owl:imports <http://www.reportinghub.no/spin/rh> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/activity> ; | 37 | + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/organization> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/spin/rh> ; |
| 39 | owl:versionInfo "0.1.0"^^xsd:string . | 38 | owl:versionInfo "0.1.0"^^xsd:string . |
| 40 | 39 | ||
| 41 | :DDRSuperclass | 40 | :DDRSuperclass |
| ... | @@ -64,7 +63,7 @@ | ... | @@ -64,7 +63,7 @@ |
| 64 | sp:path [ rdf:type sp:SeqPath ; | 63 | sp:path [ rdf:type sp:SeqPath ; |
| 65 | sp:path1 | 64 | sp:path1 |
| 66 | [ rdf:type sp:SeqPath ; | 65 | [ rdf:type sp:SeqPath ; |
| 67 | - sp:path1 <http://www.reportinghub.no/ep/schema/activity#reportOn> ; | 66 | + sp:path1 <http://www.reportinghub.no/ep/schema/report#reportOn> ; |
| 68 | sp:path2 <http://www.reportinghub.no/ep/schema/activity#onWellBore> | 67 | sp:path2 <http://www.reportinghub.no/ep/schema/activity#onWellBore> |
| 69 | ] ; | 68 | ] ; |
| 70 | sp:path2 <http://www.reportinghub.no/ep/schema/core#temporalPartOf> | 69 | sp:path2 <http://www.reportinghub.no/ep/schema/core#temporalPartOf> | ... | ... |
| ... | @@ -99,15 +99,15 @@ arg:wellName | ... | @@ -99,15 +99,15 @@ arg:wellName |
| 99 | ] ; | 99 | ] ; |
| 100 | spin:constraint | 100 | spin:constraint |
| 101 | [ rdf:type spl:Argument ; | 101 | [ rdf:type spl:Argument ; |
| 102 | - rdfs:comment "The value to match against."^^xsd:string ; | ||
| 103 | - spl:predicate sp:arg1 | ||
| 104 | - ] ; | ||
| 105 | - spin:constraint | ||
| 106 | - [ rdf:type spl:Argument ; | ||
| 107 | rdfs:comment "The property that must be used in the result resource."^^xsd:string ; | 102 | rdfs:comment "The property that must be used in the result resource."^^xsd:string ; |
| 108 | spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; | 103 | spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; |
| 109 | spl:valueType rdf:Property | 104 | spl:valueType rdf:Property |
| 110 | ] ; | 105 | ] ; |
| 106 | + spin:constraint | ||
| 107 | + [ rdf:type spl:Argument ; | ||
| 108 | + rdfs:comment "The value to match against."^^xsd:string ; | ||
| 109 | + spl:predicate sp:arg1 | ||
| 110 | + ] ; | ||
| 111 | spin:returnType rdfs:Resource . | 111 | spin:returnType rdfs:Resource . |
| 112 | 112 | ||
| 113 | npdata:npd | 113 | npdata:npd |
| ... | @@ -634,15 +634,15 @@ rhspin:dtypeValue | ... | @@ -634,15 +634,15 @@ rhspin:dtypeValue |
| 634 | ] ; | 634 | ] ; |
| 635 | spin:constraint | 635 | spin:constraint |
| 636 | [ rdf:type spl:Argument ; | 636 | [ rdf:type spl:Argument ; |
| 637 | - rdfs:comment "The predicate that points to the reified value."^^xsd:string ; | ||
| 638 | - spl:predicate sp:arg2 ; | ||
| 639 | - spl:valueType rdf:Property | ||
| 640 | - ] ; | ||
| 641 | - spin:constraint | ||
| 642 | - [ rdf:type spl:Argument ; | ||
| 643 | rdfs:comment "The subject of the value."^^xsd:string ; | 637 | rdfs:comment "The subject of the value."^^xsd:string ; |
| 644 | spl:predicate sp:arg1 ; | 638 | spl:predicate sp:arg1 ; |
| 645 | spl:valueType rdfs:Resource | 639 | spl:valueType rdfs:Resource |
| 640 | + ] ; | ||
| 641 | + spin:constraint | ||
| 642 | + [ rdf:type spl:Argument ; | ||
| 643 | + rdfs:comment "The predicate that points to the reified value."^^xsd:string ; | ||
| 644 | + spl:predicate sp:arg2 ; | ||
| 645 | + spl:valueType rdf:Property | ||
| 646 | ] . | 646 | ] . |
| 647 | 647 | ||
| 648 | rhspin:facilityById | 648 | rhspin:facilityById |
| ... | @@ -1222,8 +1222,9 @@ rhspin:npdTripleExists | ... | @@ -1222,8 +1222,9 @@ rhspin:npdTripleExists |
| 1222 | ] ; | 1222 | ] ; |
| 1223 | spin:constraint | 1223 | spin:constraint |
| 1224 | [ rdf:type spl:Argument ; | 1224 | [ rdf:type spl:Argument ; |
| 1225 | - rdfs:comment "The object to match."^^xsd:string ; | 1225 | + rdfs:comment "The subject to find"^^xsd:string ; |
| 1226 | - spl:predicate sp:arg3 | 1226 | + spl:predicate sp:arg1 ; |
| 1227 | + spl:valueType rdfs:Resource | ||
| 1227 | ] ; | 1228 | ] ; |
| 1228 | spin:constraint | 1229 | spin:constraint |
| 1229 | [ rdf:type spl:Argument ; | 1230 | [ rdf:type spl:Argument ; |
| ... | @@ -1233,9 +1234,8 @@ rhspin:npdTripleExists | ... | @@ -1233,9 +1234,8 @@ rhspin:npdTripleExists |
| 1233 | ] ; | 1234 | ] ; |
| 1234 | spin:constraint | 1235 | spin:constraint |
| 1235 | [ rdf:type spl:Argument ; | 1236 | [ rdf:type spl:Argument ; |
| 1236 | - rdfs:comment "The subject to find"^^xsd:string ; | 1237 | + rdfs:comment "The object to match."^^xsd:string ; |
| 1237 | - spl:predicate sp:arg1 ; | 1238 | + spl:predicate sp:arg3 |
| 1238 | - spl:valueType rdfs:Resource | ||
| 1239 | ] ; | 1239 | ] ; |
| 1240 | spin:returnType xsd:boolean . | 1240 | spin:returnType xsd:boolean . |
| 1241 | 1241 | ||
| ... | @@ -1341,16 +1341,30 @@ rhspin:wellBoreByName | ... | @@ -1341,16 +1341,30 @@ rhspin:wellBoreByName |
| 1341 | rdfs:subClassOf spl:URIFunctions ; | 1341 | rdfs:subClassOf spl:URIFunctions ; |
| 1342 | spin:body | 1342 | spin:body |
| 1343 | [ rdf:type sp:Select ; | 1343 | [ rdf:type sp:Select ; |
| 1344 | - sp:resultVariables (_:b32) ; | 1344 | + sp:resultVariables ([ sp:varName "wellBore"^^xsd:string |
| 1345 | - sp:where ([ rdf:type sp:NamedGraph ; | 1345 | + ]) ; |
| 1346 | + sp:where ([ rdf:type sp:Bind ; | ||
| 1347 | + sp:expression | ||
| 1348 | + [ rdf:type rhspin:normalizeWellBoreName ; | ||
| 1349 | + sp:arg1 [ sp:varName "wellBoreName"^^xsd:string | ||
| 1350 | + ] | ||
| 1351 | + ] ; | ||
| 1352 | + sp:variable | ||
| 1353 | + [ sp:varName "name"^^xsd:string | ||
| 1354 | + ] | ||
| 1355 | + ] [ rdf:type sp:NamedGraph ; | ||
| 1346 | sp:elements ([ sp:object | 1356 | sp:elements ([ sp:object |
| 1347 | - [ sp:varName "wellBoreName"^^xsd:string | 1357 | + [ sp:varName "name"^^xsd:string |
| 1348 | ] ; | 1358 | ] ; |
| 1349 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | 1359 | sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; |
| 1350 | - sp:subject _:b32 | 1360 | + sp:subject |
| 1361 | + [ sp:varName "wellBore"^^xsd:string | ||
| 1362 | + ] | ||
| 1351 | ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; | 1363 | ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; |
| 1352 | sp:predicate rdf:type ; | 1364 | sp:predicate rdf:type ; |
| 1353 | - sp:subject _:b32 | 1365 | + sp:subject |
| 1366 | + [ sp:varName "wellBore"^^xsd:string | ||
| 1367 | + ] | ||
| 1354 | ]) ; | 1368 | ]) ; |
| 1355 | sp:graphNameNode npdata:npd | 1369 | sp:graphNameNode npdata:npd |
| 1356 | ]) | 1370 | ]) |
| ... | @@ -1389,89 +1403,86 @@ rhspin:wellByName | ... | @@ -1389,89 +1403,86 @@ rhspin:wellByName |
| 1389 | ] ; | 1403 | ] ; |
| 1390 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . | 1404 | spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . |
| 1391 | 1405 | ||
| 1392 | -_:b1 sp:varName "subject"^^xsd:string . | 1406 | +_:b31 |
| 1393 | - | 1407 | + sp:varName "name"^^xsd:string . |
| 1394 | -_:b2 sp:varName "wellBoreName"^^xsd:string . | ||
| 1395 | 1408 | ||
| 1396 | -_:b3 sp:varName "wellBoreId"^^xsd:string . | 1409 | +_:b30 |
| 1410 | + sp:varName "id"^^xsd:string . | ||
| 1397 | 1411 | ||
| 1398 | -_:b4 sp:varName "wellBore"^^xsd:string . | 1412 | +_:b29 |
| 1413 | + sp:varName "t4"^^xsd:string . | ||
| 1399 | 1414 | ||
| 1400 | -_:b5 sp:varName "wellName"^^xsd:string . | 1415 | +_:b28 |
| 1416 | + sp:varName "t3"^^xsd:string . | ||
| 1401 | 1417 | ||
| 1402 | -_:b6 sp:varName "well"^^xsd:string . | 1418 | +_:b27 |
| 1419 | + sp:varName "t2"^^xsd:string . | ||
| 1403 | 1420 | ||
| 1404 | -_:b7 sp:varName "company"^^xsd:string . | 1421 | +_:b26 |
| 1422 | + sp:varName "t1"^^xsd:string . | ||
| 1405 | 1423 | ||
| 1406 | -_:b8 sp:varName "wellBore"^^xsd:string . | 1424 | +_:b25 |
| 1425 | + sp:varName "t0b"^^xsd:string . | ||
| 1407 | 1426 | ||
| 1408 | -_:b9 sp:varName "licence"^^xsd:string . | 1427 | +_:b24 |
| 1428 | + sp:varName "t0a"^^xsd:string . | ||
| 1409 | 1429 | ||
| 1410 | -_:b10 | 1430 | +_:b23 |
| 1411 | - sp:varName "share"^^xsd:string . | 1431 | + sp:varName "s2"^^xsd:string . |
| 1412 | 1432 | ||
| 1413 | -_:b11 | 1433 | +_:b22 |
| 1414 | - sp:varName "wellBore"^^xsd:string . | 1434 | + sp:varName "s1"^^xsd:string . |
| 1415 | 1435 | ||
| 1416 | -_:b12 | 1436 | +_:b21 |
| 1417 | - sp:varName "share"^^xsd:string . | 1437 | + sp:varName "normalizedStr"^^xsd:string . |
| 1418 | 1438 | ||
| 1419 | -_:b13 | 1439 | +_:b20 |
| 1420 | sp:varName "licence"^^xsd:string . | 1440 | sp:varName "licence"^^xsd:string . |
| 1421 | 1441 | ||
| 1422 | -_:b14 | 1442 | +_:b19 |
| 1423 | - sp:varName "company"^^xsd:string . | 1443 | + sp:varName "reif"^^xsd:string . |
| 1424 | - | ||
| 1425 | -_:b15 | ||
| 1426 | - sp:varName "companyName"^^xsd:string . | ||
| 1427 | 1444 | ||
| 1428 | -_:b16 | 1445 | +_:b18 |
| 1429 | - sp:varName "company"^^xsd:string . | 1446 | + sp:varName "value"^^xsd:string . |
| 1430 | 1447 | ||
| 1431 | _:b17 | 1448 | _:b17 |
| 1432 | sp:varName "wellBore"^^xsd:string . | 1449 | sp:varName "wellBore"^^xsd:string . |
| 1433 | 1450 | ||
| 1434 | -_:b18 | 1451 | +_:b16 |
| 1435 | - sp:varName "value"^^xsd:string . | 1452 | + sp:varName "company"^^xsd:string . |
| 1436 | 1453 | ||
| 1437 | -_:b19 | 1454 | +_:b15 |
| 1438 | - sp:varName "reif"^^xsd:string . | 1455 | + sp:varName "companyName"^^xsd:string . |
| 1439 | 1456 | ||
| 1440 | -_:b20 | 1457 | +_:b14 |
| 1458 | + sp:varName "company"^^xsd:string . | ||
| 1459 | + | ||
| 1460 | +_:b13 | ||
| 1441 | sp:varName "licence"^^xsd:string . | 1461 | sp:varName "licence"^^xsd:string . |
| 1442 | 1462 | ||
| 1443 | -_:b21 | 1463 | +_:b12 |
| 1444 | - sp:varName "normalizedStr"^^xsd:string . | 1464 | + sp:varName "share"^^xsd:string . |
| 1445 | 1465 | ||
| 1446 | -_:b22 | 1466 | +_:b11 |
| 1447 | - sp:varName "s1"^^xsd:string . | 1467 | + sp:varName "wellBore"^^xsd:string . |
| 1448 | 1468 | ||
| 1449 | -_:b23 | 1469 | +_:b10 |
| 1450 | - sp:varName "s2"^^xsd:string . | 1470 | + sp:varName "share"^^xsd:string . |
| 1451 | 1471 | ||
| 1452 | -_:b24 | 1472 | +_:b9 sp:varName "licence"^^xsd:string . |
| 1453 | - sp:varName "t0a"^^xsd:string . | ||
| 1454 | 1473 | ||
| 1455 | -_:b25 | 1474 | +_:b8 sp:varName "wellBore"^^xsd:string . |
| 1456 | - sp:varName "t0b"^^xsd:string . | ||
| 1457 | 1475 | ||
| 1458 | -_:b26 | 1476 | +_:b7 sp:varName "company"^^xsd:string . |
| 1459 | - sp:varName "t1"^^xsd:string . | ||
| 1460 | 1477 | ||
| 1461 | -_:b27 | 1478 | +_:b6 sp:varName "well"^^xsd:string . |
| 1462 | - sp:varName "t2"^^xsd:string . | ||
| 1463 | 1479 | ||
| 1464 | -_:b28 | 1480 | +_:b5 sp:varName "wellName"^^xsd:string . |
| 1465 | - sp:varName "t3"^^xsd:string . | ||
| 1466 | 1481 | ||
| 1467 | -_:b29 | 1482 | +_:b4 sp:varName "wellBore"^^xsd:string . |
| 1468 | - sp:varName "t4"^^xsd:string . | ||
| 1469 | 1483 | ||
| 1470 | -_:b30 | 1484 | +_:b3 sp:varName "wellBoreId"^^xsd:string . |
| 1471 | - sp:varName "id"^^xsd:string . | ||
| 1472 | 1485 | ||
| 1473 | -_:b31 | 1486 | +_:b2 sp:varName "wellBoreName"^^xsd:string . |
| 1474 | - sp:varName "name"^^xsd:string . | ||
| 1475 | 1487 | ||
| 1476 | -_:b32 | 1488 | +_:b1 sp:varName "subject"^^xsd:string . |
| 1477 | - sp:varName "wellBore"^^xsd:string . | ... | ... |
-
Please register or login to post a comment