TRANSFORM_ddr-drillReport-v1.1.1.ttl 18.6 KB
# Saved by TopBraid on Tue Aug 23 16:05:01 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/1.1/ddr/drillReport
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/activity-purpose
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://www.reportinghub.no/ep/transform/1.1/ddr
# imports: http://www.reportinghub.no/ep/schema/1.0/ddr
# imports: http://spinrdf.org/spin

@prefix NPD_1104121247071:  <file:///www.reportinghub.no/examples/xml/NPD_110412124707.xml#> .
@prefix arg:     <http://spinrdf.org/arg#> .
@prefix bindEP-NativeOWL:  <http://www.reportinghub.no/iso15926/bindEP-NativeOWL#> .
@prefix ddr-normalization:  <http://www.reportinghub.no/ep/transform/ddr/normalization#> .
@prefix ddr-normalization-1.1:  <http://www.reportinghub.no/ep/transform/1.1/ddr/normalization#> .
@prefix ep-spin-lib:  <http://www.reportinghub.no/ep/spin/lib#> .
@prefix iso15926:  <http://www.reportinghub.no/iso15926/nativeOWL#> .
@prefix normalization:  <http://www.reportinghub.no/ep/transform/normalization#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix p1:      <http://example.org/file1#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rhspin:  <http://www.reportinghub.no/spin/rh#> .
@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/schema/ddr#Obj_drillReport>
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 106 Create Well"^^xsd:string ;
                sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b1
                          ] [ sp:object _:b2 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
                            sp:subject _:b1
                          ] [ sp:object _:b1 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWell> ;
                            sp:subject _:b3
                          ] [ sp:object _:b4 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
                            sp:subject _:b1
                          ]) ;
                sp:where ([ sp:object _:b5 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWellbore> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b2 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWell> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b6 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#dTimStart> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b7 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
                            sp:subject _:b3
                          ] [ sp:object _:b4 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject _:b7
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b4
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 _:b5
                                    ] ;
                            sp:variable _:b8
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
                                      sp:arg1 _:b8 ;
                                      sp:arg2 _:b6
                                    ] ;
                            sp:variable _:b3
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 _:b2
                                    ] ;
                            sp:variable _:b9
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type rhspin:wellByName ;
                                      arg:wellName _:b9
                                    ] ;
                            sp:variable _:b1
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment """STEP 105
Classify a DailyDrillingReport"""^^xsd:string ;
                sp:templates ([ sp:object _:b10 ;
                            sp:predicate rdf:type ;
                            sp:subject _:b11
                          ]) ;
                sp:where ([ sp:object _:b12 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWellbore> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b13 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#createDate> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b14 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#enumVersionKind> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:selectDailyDrillingReportType ;
                                      sp:arg1 _:b14
                                    ] ;
                            sp:variable _:b10
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 _:b12
                                    ] ;
                            sp:variable _:b15
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
                                      sp:arg1 _:b15 ;
                                      sp:arg2 _:b13
                                    ] ;
                            sp:variable _:b11
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment "STEP 104 Transfer dTimEnd"^^xsd:string ;
                sp:templates ([ sp:object _:b16 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
                            sp:subject _:b17
                          ]) ;
                sp:where ([ sp:object _:b18 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWellbore> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b19 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#dTimStart> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b16 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#dTimEnd> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 _:b18
                                    ] ;
                            sp:variable _:b20
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
                                      sp:arg1 _:b20 ;
                                      sp:arg2 _:b19
                                    ] ;
                            sp:variable _:b17
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment """STEP 103a Set name of DailyDrillingReport as label
Minimum data - createDate, dTimStart, nameWellBore"""^^xsd:string ;
                sp:templates ([ sp:object _:b21 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
                            sp:subject _:b22
                          ]) ;
                sp:where ([ sp:object _:b23 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWellbore> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b21 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#name> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b24 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#createDate> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 _:b23
                                    ] ;
                            sp:variable _:b25
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
                                      sp:arg1 _:b25 ;
                                      sp:arg2 _:b24
                                    ] ;
                            sp:variable _:b22
                          ])
              ] ;
      spin:rule
              [ rdf:type sp:Construct ;
                rdfs:comment """STEP 103 Create DailyDrillingReport, DailyDrillingActivity, TemporalPartOfAWellBore and WellBore
Minimum data - createDate, dTimStart, dTimEnd, nameWellBore
Optional data - extendedReport
replaced for testing -  BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore) ."""^^xsd:string ;
                sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b26
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/activity#DailyDrillingActivity> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b27
                          ] [ sp:object _:b27 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#reportOn> ;
                            sp:subject _:b26
                          ] [ sp:object _:b28 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#createdAt> ;
                            sp:subject _:b26
                          ] [ sp:object _:b29 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
                            sp:subject _:b27
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWellBore> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b30
                          ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
                            sp:predicate rdf:type ;
                            sp:subject _:b31
                          ] [ sp:object _:b31 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
                            sp:subject _:b30
                          ] [ sp:object _:b32 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
                            sp:subject _:b31
                          ] [ sp:object _:b30 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
                            sp:subject _:b27
                          ] [ sp:object _:b33 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#extendedReport> ;
                            sp:subject _:b27
                          ]) ;
                sp:where ([ sp:object _:b32 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#nameWellbore> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b29 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#dTimStart> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b34 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#dTimEnd> ;
                            sp:subject spin:_this
                          ] [ sp:object _:b28 ;
                            sp:predicate <http://www.reportinghub.no/ep/schema/ddr#createDate> ;
                            sp:subject spin:_this
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object _:b33 ;
                                        sp:predicate <http://www.reportinghub.no/ep/schema/ddr#extendedReport> ;
                                        sp:subject spin:_this
                                      ])
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:normalizeString ;
                                      sp:arg1 _:b32
                                    ] ;
                            sp:variable _:b35
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
                                      sp:arg1 _:b35 ;
                                      sp:arg2 _:b28
                                    ] ;
                            sp:variable _:b26
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
                                      sp:arg1 _:b35 ;
                                      sp:arg2 _:b29
                                    ] ;
                            sp:variable _:b27
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildTemporalPartOfAWellBoreURI ;
                                      sp:arg1 _:b35 ;
                                      sp:arg2 _:b29 ;
                                      sp:arg3 _:b34
                                    ] ;
                            sp:variable _:b30
                          ] [ rdf:type sp:Bind ;
                            sp:expression
                                    [ rdf:type ep-spin-lib:buildTemporaryWellBoreURI ;
                                      sp:arg1 _:b35
                                    ] ;
                            sp:variable _:b31
                          ])
              ] .

<http://www.reportinghub.no/ep/transform/1.1/ddr/drillReport>
      rdf:type owl:Ontology ;
      owl:imports <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/ep/transform/1.1/ddr> , <http://www.reportinghub.no/ep/schema/1.0/report> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

_:b25
      sp:varName "normalizedWellBoreName"^^xsd:string .

_:b24
      sp:varName "createDate"^^xsd:string .

_:b23
      sp:varName "nameWellBore"^^xsd:string .

_:b22
      sp:varName "dailyDrillingReport"^^xsd:string .

_:b21
      sp:varName "nameDailyDrillingReport"^^xsd:string .

_:b15
      sp:varName "normalizedWellBoreName"^^xsd:string .

_:b14
      sp:varName "versionKind"^^xsd:string .

_:b13
      sp:varName "createDate"^^xsd:string .

_:b12
      sp:varName "nameWellBore"^^xsd:string .

_:b11
      sp:varName "dailyDrillingReport"^^xsd:string .

_:b10
      sp:varName "dailyDrillingReportType"^^xsd:string .

_:b20
      sp:varName "normalizedWellBoreName"^^xsd:string .

_:b19
      sp:varName "dTimStart"^^xsd:string .

_:b18
      sp:varName "nameWellBore"^^xsd:string .

_:b17
      sp:varName "dailyDrillingActivity"^^xsd:string .

_:b16
      sp:varName "dTimEnd"^^xsd:string .

_:b35
      sp:varName "normalizedWellBoreName"^^xsd:string .

_:b34
      sp:varName "dTimEnd"^^xsd:string .

_:b33
      sp:varName "extendedReport"^^xsd:string .

_:b32
      sp:varName "nameWellBore"^^xsd:string .

_:b31
      sp:varName "wellBore"^^xsd:string .

_:b30
      sp:varName "temporalPartOfAWellBore"^^xsd:string .

_:b29
      sp:varName "dTimStart"^^xsd:string .

_:b28
      sp:varName "createDate"^^xsd:string .

_:b27
      sp:varName "dailyDrillingActivity"^^xsd:string .

_:b26
      sp:varName "dailyDrillingReport"^^xsd:string .

_:b1  sp:varName "well"^^xsd:string .

_:b9  sp:varName "normalizedWellName"^^xsd:string .

_:b8  sp:varName "normalizedWellBoreName"^^xsd:string .

_:b4  sp:varName "wellBore"^^xsd:string .

_:b7  sp:varName "temporalPartOfAWellBore"^^xsd:string .

_:b3  sp:varName "dailyDrillingActivity"^^xsd:string .

_:b6  sp:varName "dTimStart"^^xsd:string .

_:b2  sp:varName "nameWell"^^xsd:string .

_:b5  sp:varName "nameWellBore"^^xsd:string .