MonkeyChap

Added SPIN functions to assert mappings formally based on select functions

......@@ -2,6 +2,7 @@
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/production
# imports: http://www.reportinghub.no/ep/schema/1.0/production-core
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://www.witsml.org/schemas/131/addendum/combo
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
......@@ -18,9 +19,36 @@
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
sp:if
spin:rule
[ rdf:type sp:Construct ;
sp:templates ([ sp:object
[ sp:varName "source"^^xsd:string
] ;
sp:predicate ep-dpr-spin-lib:selectMap ;
sp:subject
[ sp:varName "target"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_arg1 ;
sp:predicate sp:arg1 ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "source"^^xsd:string
] ;
sp:predicate sp:arg2 ;
sp:subject spin:_arg1
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate sp:arg2 ;
sp:subject spin:_this
])
] .
<http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
rdf:type owl:Ontology ;
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> ;
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> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-dpr-spin-lib:BuildDailyProductionReportURI
......@@ -2884,6 +2912,9 @@ ep-dpr-spin-lib:selectMagneticFieldStrengthScale
])
] .
ep-dpr-spin-lib:selectMap
rdf:type owl:ObjectProperty .
ep-dpr-spin-lib:selectMassConcentrationScale
rdf:type spin:Function ;
rdfs:subClassOf ep-dpr-spin-lib:Function ;
......@@ -5352,22 +5383,6 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION
rdfs:subClassOf ep-dpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b29) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale>
] ;
sp:variable _:b29
])
] ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "myVar"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
......@@ -5447,6 +5462,22 @@ ep-dpr-spin-lib:selectSpecificVolumeScale_MASS_CONCENTRATION
[ sp:varName "myVar"^^xsd:string
]
])
] ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b29) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#VPVU_m3m3>
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale>
] ;
sp:variable _:b29
])
] .
ep-dpr-spin-lib:selectTemperatureScale
......@@ -6975,89 +7006,89 @@ ep-dpr-spin-lib:selectWorkScale
])
] .
_:b1 sp:varName "uri"^^xsd:string .
_:b32
sp:varName "volumeFlowRateAtStdType"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b31
sp:varName "volumeAtStdType"^^xsd:string .
_:b3 sp:varName "UUID"^^xsd:string .
_:b30
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b29
sp:varName "specificVolumeScale"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b28
sp:varName "safetyActivityType"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b27
sp:varName "relationshipToMeasure"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b26
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b25
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b24
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b23
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b22
sp:varName "productionFacilityType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b21
sp:varName "productType"^^xsd:string .
_:b13
_:b20
sp:varName "densityScale"^^xsd:string .
_:b19
sp:varName "uri"^^xsd:string .
_:b14
_:b18
sp:varName "uri"^^xsd:string .
_:b15
_:b17
sp:varName "uri"^^xsd:string .
_:b16
sp:varName "uri"^^xsd:string .
_:b17
_:b15
sp:varName "uri"^^xsd:string .
_:b18
_:b14
sp:varName "uri"^^xsd:string .
_:b19
_:b13
sp:varName "uri"^^xsd:string .
_:b20
sp:varName "densityScale"^^xsd:string .
_:b21
sp:varName "productType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b22
sp:varName "productionFacilityType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b23
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b24
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b25
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b26
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b27
sp:varName "relationshipToMeasure"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b28
sp:varName "safetyActivityType"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b29
sp:varName "specificVolumeScale"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b30
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b3 sp:varName "UUID"^^xsd:string .
_:b31
sp:varName "volumeAtStdType"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b32
sp:varName "volumeFlowRateAtStdType"^^xsd:string .
_:b1 sp:varName "uri"^^xsd:string .
......
......@@ -6,6 +6,7 @@
# imports: http://www.reportinghub.no/ep/schema/1.0/production-core
# imports: http://www.reportinghub.no/ep/schema/1.0/production-equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/production-report
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
......@@ -16,9 +17,36 @@
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
sp:if
spin:rule
[ rdf:type sp:Construct ;
sp:templates ([ sp:object
[ sp:varName "source"^^xsd:string
] ;
sp:predicate ep-mpr-spin-lib:selectMap ;
sp:subject
[ sp:varName "target"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_arg1 ;
sp:predicate sp:arg1 ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "source"^^xsd:string
] ;
sp:predicate sp:arg2 ;
sp:subject spin:_arg1
] [ sp:object
[ sp:varName "target"^^xsd:string
] ;
sp:predicate sp:arg2 ;
sp:subject spin:_this
])
] .
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
rdf:type owl:Ontology ;
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> ;
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> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-mpr-spin-lib:Function
......@@ -3659,3 +3687,6 @@ ep-mpr-spin-lib:SelectWorkScale
]
])
] .
ep-mpr-spin-lib:selectMap
rdf:type owl:ObjectProperty .
......