TRANSFORM_ddr-wellDatum-v1.1.1.ttl 21.9 KB
# baseURI: http://www.reportinghub.no/ep/transform/1.1/wellDatum
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://www.witsml.org/schemas/1series

@prefix :        <http://www.reportinghub.no/ep/transform/1.1/wellDatum#> .
@prefix ep-spin-lib:  <http://www.reportinghub.no/ep/spin/lib#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp:      <http://spinrdf.org/sp#> .
@prefix spin:    <http://spinrdf.org/spin#> .
@prefix spl:     <http://spinrdf.org/spl#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://www.reportinghub.no/ep/transform/1.1/wellDatum>
      rdf:type owl:Ontology ;
      owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.witsml.org/schemas/1series> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

<http://www.witsml.org/schemas/1series#Obj_drillReport>
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 169c Transfer wellDatum (step number chosen to ensure that it comes after the rig definition)"^^xsd:string ;
                sp:templates ([ sp:object _:b1 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/report#datumObjectForDailyDrillingReport> ;
                            sp:subject
                                    [ sp:varName "dailyDrillingReport"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "comment"^^xsd:string
                                    ] ;
                            sp:predicate rdfs:comment ;
                            sp:subject _:b1
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/equipment#KellyBushing> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b1
                          ] [ sp:object
                                    [ sp:varName "name"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/report#nameAsDatumObject> ;
                            sp:subject _:b1
                          ] [ sp:object _:b1 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
                            sp:subject _:b2
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfARig> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b2
                          ] [ sp:object
                                    [ sp:varName "rig"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject _:b2
                          ] [ sp:object _:b3 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/equipment#elevationOfKellyBushing> ;
                            sp:subject _:b1
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Length> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b3
                          ] [ sp:object
                                    [ sp:varName "realLength"^^xsd:string
                                    ] ;
                            sp:predicate
                                    [ sp:varName "lengthScale"^^xsd:string
                                    ] ;
                            sp:subject _:b3
                          ]) ;
                sp:where ([ sp:object
                                    [ sp:varName "nameWellBore"^^xsd:string
                                    ] ;
                            sp:predicate ep-spin-lib:nameWellbore ;
                            sp:subject spin:_this
                          ] [ sp:object
                                    [ sp:varName "createDate"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.witsml.org/schemas/1series#createDate> ;
                            sp:subject spin:_this
                          ] [ sp:object
                                    [ sp:varName "wellDatum"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.witsml.org/schemas/1series#wellDatumRef> ;
                            sp:subject spin:_this
                          ] [ sp:object <http://www.witsml.org/schemas/1series#ECE_KB> ;
                            sp:predicate <http://www.witsml.org/schemas/1series#codeRef> ;
                            sp:subject
                                    [ sp:varName "wellDatum"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "name"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#name> ;
                                        sp:subject
                                                [ sp:varName "wellDatum"^^xsd:string
                                                ]
                                      ])
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "elevation"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#elevationRef> ;
                                        sp:subject
                                                [ sp:varName "wellDatum"^^xsd:string
                                                ]
                                      ] [ sp:object
                                                [ sp:varName "uomLength"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#uomRef> ;
                                        sp:subject
                                                [ sp:varName "elevation"^^xsd:string
                                                ]
                                      ] [ sp:object
                                                [ sp:varName "realLength"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
                                        sp:subject
                                                [ sp:varName "elevation"^^xsd:string
                                                ]
                                      ])
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "comment"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#comment> ;
                                        sp:subject
                                                [ sp:varName "wellDatum"^^xsd:string
                                                ]
                                      ])
                          ] [ sp:object
                                    [ sp:varName "temporalPartOfARig"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#onRig> ;
                            sp:subject
                                    [ sp:varName "dailyDrillingActivity"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "rig"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject
                                    [ sp:varName "temporalPartOfARig"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#Rig> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "rig"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "normalizedWellBoreName"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
                                      sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
                                              ] ;
                                      sp:arg2 [ sp:varName "createDate"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "dailyDrillingReport"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
                                      sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
                                              ] ;
                                      sp:arg2 [ sp:varName "dTimStart"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "dailyDrillingActivity"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:selectClassOfWellDatumObject ;
                                      sp:arg1 [ sp:varName "code"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "classOfWellDatumObject"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:selectLengthScale ;
                                      sp:arg1 [ sp:varName "uomLength"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "lengthScale"^^xsd:string
                                    ]
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 169d Transfer wellDatum (step number chosen to ensure that it comes after the rig definition)"^^xsd:string ;
                sp:templates ([ sp:object _:b4 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/report#datumObjectForDailyDrillingReport> ;
                            sp:subject
                                    [ sp:varName "dailyDrillingReport"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "comment"^^xsd:string
                                    ] ;
                            sp:predicate rdfs:comment ;
                            sp:subject _:b4
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#SurroundingWater-meanSeaLevel> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b4
                          ] [ sp:object
                                    [ sp:varName "name"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/report#nameAsDatumObject> ;
                            sp:subject _:b4
                          ] [ sp:object _:b4 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
                            sp:subject _:b5
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfARig> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b5
                          ] [ sp:object
                                    [ sp:varName "rig"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject _:b5
                          ] [ sp:object _:b6 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/facility#depthOfSurroundingWater> ;
                            sp:subject _:b4
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Length> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b6
                          ] [ sp:object
                                    [ sp:varName "realLength"^^xsd:string
                                    ] ;
                            sp:predicate
                                    [ sp:varName "lengthScale"^^xsd:string
                                    ] ;
                            sp:subject _:b6
                          ]) ;
                sp:where ([ sp:object
                                    [ sp:varName "nameWellBore"^^xsd:string
                                    ] ;
                            sp:predicate ep-spin-lib:nameWellbore ;
                            sp:subject spin:_this
                          ] [ sp:object
                                    [ sp:varName "createDate"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.witsml.org/schemas/1series#createDate> ;
                            sp:subject spin:_this
                          ] [ sp:object
                                    [ sp:varName "wellDatum"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.witsml.org/schemas/1series#wellDatumRef> ;
                            sp:subject spin:_this
                          ] [ sp:object <http://www.witsml.org/schemas/1series#ECE_SL> ;
                            sp:predicate <http://www.witsml.org/schemas/1series#codeRef> ;
                            sp:subject
                                    [ sp:varName "wellDatum"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "name"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#name> ;
                                        sp:subject
                                                [ sp:varName "wellDatum"^^xsd:string
                                                ]
                                      ])
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "elevation"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#elevationRef> ;
                                        sp:subject
                                                [ sp:varName "wellDatum"^^xsd:string
                                                ]
                                      ] [ sp:object
                                                [ sp:varName "uomLength"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#uomRef> ;
                                        sp:subject
                                                [ sp:varName "elevation"^^xsd:string
                                                ]
                                      ] [ sp:object
                                                [ sp:varName "realLength"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
                                        sp:subject
                                                [ sp:varName "elevation"^^xsd:string
                                                ]
                                      ])
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object
                                                [ sp:varName "comment"^^xsd:string
                                                ] ;
                                        sp:predicate <http://www.witsml.org/schemas/1series#comment> ;
                                        sp:subject
                                                [ sp:varName "wellDatum"^^xsd:string
                                                ]
                                      ])
                          ] [ sp:object
                                    [ sp:varName "temporalPartOfARig"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#onRig> ;
                            sp:subject
                                    [ sp:varName "dailyDrillingActivity"^^xsd:string
                                    ]
                          ] [ sp:object
                                    [ sp:varName "rig"^^xsd:string
                                    ] ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject
                                    [ sp:varName "temporalPartOfARig"^^xsd:string
                                    ]
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#Rig> ;
                            sp:predicate rdf:type ;
                            sp:subject
                                    [ sp:varName "rig"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "normalizedWellBoreName"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
                                      sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
                                              ] ;
                                      sp:arg2 [ sp:varName "createDate"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "dailyDrillingReport"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
                                      sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
                                              ] ;
                                      sp:arg2 [ sp:varName "dTimStart"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "dailyDrillingActivity"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:selectClassOfWellDatumObject ;
                                      sp:arg1 [ sp:varName "code"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "classOfWellDatumObject"^^xsd:string
                                    ]
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:selectLengthScale ;
                                      sp:arg1 [ sp:varName "uomLength"^^xsd:string
                                              ]
                                    ] ;
                            sp:variable
                                    [ sp:varName "lengthScale"^^xsd:string
                                    ]
                          ])
              ] .