Added SPIN functions to assert mappings formally based on select functions
Showing
2 changed files
with
128 additions
and
66 deletions
| ... | @@ -2,6 +2,7 @@ | ... | @@ -2,6 +2,7 @@ |
| 2 | # imports: http://spinrdf.org/spin | 2 | # imports: http://spinrdf.org/spin |
| 3 | # imports: http://www.reportinghub.no/ep/schema/1.0/production | 3 | # imports: http://www.reportinghub.no/ep/schema/1.0/production |
| 4 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-core | 4 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-core |
| 5 | +# imports: http://www.reportinghub.no/ep/spin/1.1/lib | ||
| 5 | # imports: http://www.witsml.org/schemas/131/addendum/combo | 6 | # imports: http://www.witsml.org/schemas/131/addendum/combo |
| 6 | 7 | ||
| 7 | @prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> . | 8 | @prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> . |
| ... | @@ -18,9 +19,36 @@ | ... | @@ -18,9 +19,36 @@ |
| 18 | @prefix spl: <http://spinrdf.org/spl#> . | 19 | @prefix spl: <http://spinrdf.org/spl#> . |
| 19 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | 20 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
| 20 | 21 | ||
| 22 | +sp:if | ||
| 23 | + spin:rule | ||
| 24 | + [ rdf:type sp:Construct ; | ||
| 25 | + sp:templates ([ sp:object | ||
| 26 | + [ sp:varName "source"^^xsd:string | ||
| 27 | + ] ; | ||
| 28 | + sp:predicate ep-dpr-spin-lib:selectMap ; | ||
| 29 | + sp:subject | ||
| 30 | + [ sp:varName "target"^^xsd:string | ||
| 31 | + ] | ||
| 32 | + ]) ; | ||
| 33 | + sp:where ([ sp:object spin:_arg1 ; | ||
| 34 | + sp:predicate sp:arg1 ; | ||
| 35 | + sp:subject spin:_this | ||
| 36 | + ] [ sp:object | ||
| 37 | + [ sp:varName "source"^^xsd:string | ||
| 38 | + ] ; | ||
| 39 | + sp:predicate sp:arg2 ; | ||
| 40 | + sp:subject spin:_arg1 | ||
| 41 | + ] [ sp:object | ||
| 42 | + [ sp:varName "target"^^xsd:string | ||
| 43 | + ] ; | ||
| 44 | + sp:predicate sp:arg2 ; | ||
| 45 | + sp:subject spin:_this | ||
| 46 | + ]) | ||
| 47 | + ] . | ||
| 48 | + | ||
| 21 | <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> | 49 | <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> |
| 22 | rdf:type owl:Ontology ; | 50 | rdf:type owl:Ontology ; |
| 23 | - owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production-core> ; | 51 | + owl:imports <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://spinrdf.org/spin> ; |
| 24 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 52 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . |
| 25 | 53 | ||
| 26 | ep-dpr-spin-lib:BuildDailyProductionReportURI | 54 | ep-dpr-spin-lib:BuildDailyProductionReportURI |
| ... | @@ -2884,6 +2912,9 @@ ep-dpr-spin-lib:selectMagneticFieldStrengthScale | ... | @@ -2884,6 +2912,9 @@ ep-dpr-spin-lib:selectMagneticFieldStrengthScale |
| 2884 | ]) | 2912 | ]) |
| 2885 | ] . | 2913 | ] . |
| 2886 | 2914 | ||
| 2915 | +ep-dpr-spin-lib:selectMap | ||
| 2916 | + rdf:type owl:ObjectProperty . | ||
| 2917 | + | ||
| 2887 | ep-dpr-spin-lib:selectMassConcentrationScale | 2918 | ep-dpr-spin-lib:selectMassConcentrationScale |
| 2888 | rdf:type spin:Function ; | 2919 | rdf:type spin:Function ; |
| 2889 | rdfs:subClassOf ep-dpr-spin-lib:Function ; | 2920 | rdfs:subClassOf ep-dpr-spin-lib:Function ; |
| ... | @@ -5352,22 +5383,6 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION | ... | @@ -5352,22 +5383,6 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION |
| 5352 | rdfs:subClassOf ep-dpr-spin-lib:Function ; | 5383 | rdfs:subClassOf ep-dpr-spin-lib:Function ; |
| 5353 | spin:body | 5384 | spin:body |
| 5354 | [ rdf:type sp:Select ; | 5385 | [ rdf:type sp:Select ; |
| 5355 | - sp:resultVariables (_:b29) ; | ||
| 5356 | - sp:where ([ rdf:type sp:Bind ; | ||
| 5357 | - sp:expression | ||
| 5358 | - [ rdf:type sp:if ; | ||
| 5359 | - sp:arg1 [ rdf:type sp:eq ; | ||
| 5360 | - sp:arg1 spin:_arg1 ; | ||
| 5361 | - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3> | ||
| 5362 | - ] ; | ||
| 5363 | - sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ; | ||
| 5364 | - sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale> | ||
| 5365 | - ] ; | ||
| 5366 | - sp:variable _:b29 | ||
| 5367 | - ]) | ||
| 5368 | - ] ; | ||
| 5369 | - spin:body | ||
| 5370 | - [ rdf:type sp:Select ; | ||
| 5371 | sp:resultVariables ([ sp:varName "myVar"^^xsd:string | 5386 | sp:resultVariables ([ sp:varName "myVar"^^xsd:string |
| 5372 | ]) ; | 5387 | ]) ; |
| 5373 | sp:where ([ rdf:type sp:Bind ; | 5388 | sp:where ([ rdf:type sp:Bind ; |
| ... | @@ -5447,6 +5462,22 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION | ... | @@ -5447,6 +5462,22 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION |
| 5447 | [ sp:varName "myVar"^^xsd:string | 5462 | [ sp:varName "myVar"^^xsd:string |
| 5448 | ] | 5463 | ] |
| 5449 | ]) | 5464 | ]) |
| 5465 | + ] ; | ||
| 5466 | + spin:body | ||
| 5467 | + [ rdf:type sp:Select ; | ||
| 5468 | + sp:resultVariables (_:b29) ; | ||
| 5469 | + sp:where ([ rdf:type sp:Bind ; | ||
| 5470 | + sp:expression | ||
| 5471 | + [ rdf:type sp:if ; | ||
| 5472 | + sp:arg1 [ rdf:type sp:eq ; | ||
| 5473 | + sp:arg1 spin:_arg1 ; | ||
| 5474 | + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3> | ||
| 5475 | + ] ; | ||
| 5476 | + sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ; | ||
| 5477 | + sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale> | ||
| 5478 | + ] ; | ||
| 5479 | + sp:variable _:b29 | ||
| 5480 | + ]) | ||
| 5450 | ] . | 5481 | ] . |
| 5451 | 5482 | ||
| 5452 | ep-dpr-spin-lib:selectTemperatureScale | 5483 | ep-dpr-spin-lib:selectTemperatureScale |
| ... | @@ -6975,89 +7006,89 @@ ep-dpr-spin-lib:selectWorkScale | ... | @@ -6975,89 +7006,89 @@ ep-dpr-spin-lib:selectWorkScale |
| 6975 | ]) | 7006 | ]) |
| 6976 | ] . | 7007 | ] . |
| 6977 | 7008 | ||
| 6978 | -_:b1 sp:varName "uri"^^xsd:string . | 7009 | +_:b32 |
| 7010 | + sp:varName "volumeFlowRateAtStdType"^^xsd:string . | ||
| 6979 | 7011 | ||
| 6980 | -_:b2 sp:varName "uri"^^xsd:string . | 7012 | +_:b31 |
| 7013 | + sp:varName "volumeAtStdType"^^xsd:string . | ||
| 6981 | 7014 | ||
| 6982 | -_:b3 sp:varName "UUID"^^xsd:string . | 7015 | +_:b30 |
| 7016 | + sp:varName "temporalPartOfAFlowDurationType"^^xsd:string . | ||
| 6983 | 7017 | ||
| 6984 | -_:b4 sp:varName "uri"^^xsd:string . | 7018 | +_:b29 |
| 7019 | + sp:varName "specificVolumeScale"^^xsd:string . | ||
| 6985 | 7020 | ||
| 6986 | -_:b5 sp:varName "uri"^^xsd:string . | 7021 | +_:b28 |
| 7022 | + sp:varName "safetyActivityType"^^xsd:string . | ||
| 6987 | 7023 | ||
| 6988 | -_:b6 sp:varName "uri"^^xsd:string . | 7024 | +_:b27 |
| 7025 | + sp:varName "relationshipToMeasure"^^xsd:string . | ||
| 6989 | 7026 | ||
| 6990 | -_:b7 sp:varName "uri"^^xsd:string . | 7027 | +_:b26 |
| 7028 | + sp:varName "productionFlowPurposeType"^^xsd:string . | ||
| 6991 | 7029 | ||
| 6992 | -_:b8 sp:varName "uri"^^xsd:string . | 7030 | +_:b25 |
| 7031 | + sp:varName "productionFlowDirectionRelationshipType"^^xsd:string . | ||
| 6993 | 7032 | ||
| 6994 | -_:b9 sp:varName "uri"^^xsd:string . | 7033 | +_:b24 |
| 7034 | + sp:varName "productionFlowDirectionRelationshipType"^^xsd:string . | ||
| 6995 | 7035 | ||
| 6996 | -_:b10 | 7036 | +_:b23 |
| 6997 | - sp:varName "uri"^^xsd:string . | 7037 | + sp:varName "productionFlowDefinitionType"^^xsd:string . |
| 6998 | 7038 | ||
| 6999 | -_:b11 | 7039 | +_:b22 |
| 7000 | - sp:varName "uri"^^xsd:string . | 7040 | + sp:varName "productionFacilityType"^^xsd:string . |
| 7001 | 7041 | ||
| 7002 | -_:b12 | 7042 | +_:b21 |
| 7003 | - sp:varName "uri"^^xsd:string . | 7043 | + sp:varName "productType"^^xsd:string . |
| 7004 | 7044 | ||
| 7005 | -_:b13 | 7045 | +_:b20 |
| 7046 | + sp:varName "densityScale"^^xsd:string . | ||
| 7047 | + | ||
| 7048 | +_:b19 | ||
| 7006 | sp:varName "uri"^^xsd:string . | 7049 | sp:varName "uri"^^xsd:string . |
| 7007 | 7050 | ||
| 7008 | -_:b14 | 7051 | +_:b18 |
| 7009 | sp:varName "uri"^^xsd:string . | 7052 | sp:varName "uri"^^xsd:string . |
| 7010 | 7053 | ||
| 7011 | -_:b15 | 7054 | +_:b17 |
| 7012 | sp:varName "uri"^^xsd:string . | 7055 | sp:varName "uri"^^xsd:string . |
| 7013 | 7056 | ||
| 7014 | _:b16 | 7057 | _:b16 |
| 7015 | sp:varName "uri"^^xsd:string . | 7058 | sp:varName "uri"^^xsd:string . |
| 7016 | 7059 | ||
| 7017 | -_:b17 | 7060 | +_:b15 |
| 7018 | sp:varName "uri"^^xsd:string . | 7061 | sp:varName "uri"^^xsd:string . |
| 7019 | 7062 | ||
| 7020 | -_:b18 | 7063 | +_:b14 |
| 7021 | sp:varName "uri"^^xsd:string . | 7064 | sp:varName "uri"^^xsd:string . |
| 7022 | 7065 | ||
| 7023 | -_:b19 | 7066 | +_:b13 |
| 7024 | sp:varName "uri"^^xsd:string . | 7067 | sp:varName "uri"^^xsd:string . |
| 7025 | 7068 | ||
| 7026 | -_:b20 | 7069 | +_:b12 |
| 7027 | - sp:varName "densityScale"^^xsd:string . | 7070 | + sp:varName "uri"^^xsd:string . |
| 7028 | - | ||
| 7029 | -_:b21 | ||
| 7030 | - sp:varName "productType"^^xsd:string . | ||
| 7031 | 7071 | ||
| 7032 | -_:b22 | 7072 | +_:b11 |
| 7033 | - sp:varName "productionFacilityType"^^xsd:string . | 7073 | + sp:varName "uri"^^xsd:string . |
| 7034 | 7074 | ||
| 7035 | -_:b23 | 7075 | +_:b10 |
| 7036 | - sp:varName "productionFlowDefinitionType"^^xsd:string . | 7076 | + sp:varName "uri"^^xsd:string . |
| 7037 | 7077 | ||
| 7038 | -_:b24 | 7078 | +_:b9 sp:varName "uri"^^xsd:string . |
| 7039 | - sp:varName "productionFlowDirectionRelationshipType"^^xsd:string . | ||
| 7040 | 7079 | ||
| 7041 | -_:b25 | 7080 | +_:b8 sp:varName "uri"^^xsd:string . |
| 7042 | - sp:varName "productionFlowDirectionRelationshipType"^^xsd:string . | ||
| 7043 | 7081 | ||
| 7044 | -_:b26 | 7082 | +_:b7 sp:varName "uri"^^xsd:string . |
| 7045 | - sp:varName "productionFlowPurposeType"^^xsd:string . | ||
| 7046 | 7083 | ||
| 7047 | -_:b27 | 7084 | +_:b6 sp:varName "uri"^^xsd:string . |
| 7048 | - sp:varName "relationshipToMeasure"^^xsd:string . | ||
| 7049 | 7085 | ||
| 7050 | -_:b28 | 7086 | +_:b5 sp:varName "uri"^^xsd:string . |
| 7051 | - sp:varName "safetyActivityType"^^xsd:string . | ||
| 7052 | 7087 | ||
| 7053 | -_:b29 | 7088 | +_:b4 sp:varName "uri"^^xsd:string . |
| 7054 | - sp:varName "specificVolumeScale"^^xsd:string . | ||
| 7055 | 7089 | ||
| 7056 | -_:b30 | 7090 | +_:b3 sp:varName "UUID"^^xsd:string . |
| 7057 | - sp:varName "temporalPartOfAFlowDurationType"^^xsd:string . | ||
| 7058 | 7091 | ||
| 7059 | -_:b31 | 7092 | +_:b2 sp:varName "uri"^^xsd:string . |
| 7060 | - sp:varName "volumeAtStdType"^^xsd:string . | ||
| 7061 | 7093 | ||
| 7062 | -_:b32 | 7094 | +_:b1 sp:varName "uri"^^xsd:string . |
| 7063 | - sp:varName "volumeFlowRateAtStdType"^^xsd:string . | ... | ... |
| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-core | 6 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-core |
| 7 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-equipment | 7 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-equipment |
| 8 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-report | 8 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-report |
| 9 | +# imports: http://www.reportinghub.no/ep/spin/1.1/lib | ||
| 9 | 10 | ||
| 10 | @prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> . | 11 | @prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> . |
| 11 | @prefix owl: <http://www.w3.org/2002/07/owl#> . | 12 | @prefix owl: <http://www.w3.org/2002/07/owl#> . |
| ... | @@ -16,9 +17,36 @@ | ... | @@ -16,9 +17,36 @@ |
| 16 | @prefix spl: <http://spinrdf.org/spl#> . | 17 | @prefix spl: <http://spinrdf.org/spl#> . |
| 17 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | 18 | @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . |
| 18 | 19 | ||
| 20 | +sp:if | ||
| 21 | + spin:rule | ||
| 22 | + [ rdf:type sp:Construct ; | ||
| 23 | + sp:templates ([ sp:object | ||
| 24 | + [ sp:varName "source"^^xsd:string | ||
| 25 | + ] ; | ||
| 26 | + sp:predicate ep-mpr-spin-lib:selectMap ; | ||
| 27 | + sp:subject | ||
| 28 | + [ sp:varName "target"^^xsd:string | ||
| 29 | + ] | ||
| 30 | + ]) ; | ||
| 31 | + sp:where ([ sp:object spin:_arg1 ; | ||
| 32 | + sp:predicate sp:arg1 ; | ||
| 33 | + sp:subject spin:_this | ||
| 34 | + ] [ sp:object | ||
| 35 | + [ sp:varName "source"^^xsd:string | ||
| 36 | + ] ; | ||
| 37 | + sp:predicate sp:arg2 ; | ||
| 38 | + sp:subject spin:_arg1 | ||
| 39 | + ] [ sp:object | ||
| 40 | + [ sp:varName "target"^^xsd:string | ||
| 41 | + ] ; | ||
| 42 | + sp:predicate sp:arg2 ; | ||
| 43 | + sp:subject spin:_this | ||
| 44 | + ]) | ||
| 45 | + ] . | ||
| 46 | + | ||
| 19 | <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> | 47 | <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> |
| 20 | rdf:type owl:Ontology ; | 48 | rdf:type owl:Ontology ; |
| 21 | - owl:imports <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/schema/1.0/production-report> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://spinrdf.org/spin> ; | 49 | + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-report> , <http://www.reportinghub.no/ep/schema/1.0/production> ; |
| 22 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 50 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . |
| 23 | 51 | ||
| 24 | ep-mpr-spin-lib:Function | 52 | ep-mpr-spin-lib:Function |
| ... | @@ -3659,3 +3687,6 @@ ep-mpr-spin-lib:SelectWorkScale | ... | @@ -3659,3 +3687,6 @@ ep-mpr-spin-lib:SelectWorkScale |
| 3659 | ] | 3687 | ] |
| 3660 | ]) | 3688 | ]) |
| 3661 | ] . | 3689 | ] . |
| 3690 | + | ||
| 3691 | +ep-mpr-spin-lib:selectMap | ||
| 3692 | + rdf:type owl:ObjectProperty . | ... | ... |
-
Please register or login to post a comment