Holger Knublauch

Added magic property to get nameWellbore - this will replace usages of

directly getting ddr:nameWellbore
1 -# Saved by TopBraid on Tue Sep 27 13:59:39 BST 2011
2 # baseURI: http://www.reportinghub.no/ep/spin/1.1/lib 1 # baseURI: http://www.reportinghub.no/ep/spin/1.1/lib
3 -# imports: http://www.reportinghub.no/ep/schema/1.0/report 2 +# imports: http://spinrdf.org/spin
4 -# imports: http://www.witsml.org/schemas/1series 3 +# imports: http://www.reportinghub.no/ep/schema/1.0/activity
5 -# imports: http://www.reportinghub.no/ep/schema/1.0/core
6 -# imports: http://www.reportinghub.no/ep/schema/1.0/well
7 # imports: http://www.reportinghub.no/ep/schema/1.0/activity-purpose 4 # imports: http://www.reportinghub.no/ep/schema/1.0/activity-purpose
5 +# imports: http://www.reportinghub.no/ep/schema/1.0/core
8 # imports: http://www.reportinghub.no/ep/schema/1.0/equipment 6 # imports: http://www.reportinghub.no/ep/schema/1.0/equipment
9 # imports: http://www.reportinghub.no/ep/schema/1.0/facility 7 # imports: http://www.reportinghub.no/ep/schema/1.0/facility
10 -# imports: http://www.reportinghub.no/ep/schema/1.0/activity 8 +# imports: http://www.reportinghub.no/ep/schema/1.0/report
9 +# imports: http://www.reportinghub.no/ep/schema/1.0/well
11 # imports: http://www.reportinghub.no/ep/schema/drilling-equipment-type 10 # imports: http://www.reportinghub.no/ep/schema/drilling-equipment-type
12 -# imports: http://spinrdf.org/spin
13 # imports: http://www.reportinghub.no/spin/rh 11 # imports: http://www.reportinghub.no/spin/rh
12 +# imports: http://www.witsml.org/schemas/1series
14 13
15 @prefix activity-purpose: <http://www.reportinghub.no/ep/schema/1.0/activity-purpose#> . 14 @prefix activity-purpose: <http://www.reportinghub.no/ep/schema/1.0/activity-purpose#> .
16 @prefix ddr: <http://www.witsml.org/schemas/1series#> . 15 @prefix ddr: <http://www.witsml.org/schemas/1series#> .
17 @prefix dtype: <http://www.linkedmodel.org/schema/dtype#> . 16 @prefix dtype: <http://www.linkedmodel.org/schema/dtype#> .
18 @prefix ep-drill-eqt-typ: <http://www.reportinghub.no/ep/schema/drilling-equipment-type#> . 17 @prefix ep-drill-eqt-typ: <http://www.reportinghub.no/ep/schema/drilling-equipment-type#> .
19 @prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> . 18 @prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
20 -@prefix ep-spin-lib-1.1: <http://www.reportinghub.no/ep/spin/1.1/lib#> .
21 @prefix fn: <http://www.w3.org/2005/xpath-functions#> . 19 @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
22 @prefix owl: <http://www.w3.org/2002/07/owl#> . 20 @prefix owl: <http://www.w3.org/2002/07/owl#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 21 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
...@@ -30,7 +28,7 @@ ...@@ -30,7 +28,7 @@
30 28
31 <http://www.reportinghub.no/ep/spin/1.1/lib> 29 <http://www.reportinghub.no/ep/spin/1.1/lib>
32 rdf:type owl:Ontology ; 30 rdf:type owl:Ontology ;
33 - owl:imports <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/drilling-equipment-type> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://spinrdf.org/spin> , <http://www.witsml.org/schemas/1series> , <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/activity-purpose> , <http://www.reportinghub.no/ep/schema/1.0/facility> ; 31 + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <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/report> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/drilling-equipment-type> , <http://www.reportinghub.no/spin/rh> , <http://www.witsml.org/schemas/1series> ;
34 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 32 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
35 33
36 ep-spin-lib:Function 34 ep-spin-lib:Function
...@@ -505,12 +503,12 @@ ep-spin-lib:buildURI ...@@ -505,12 +503,12 @@ ep-spin-lib:buildURI
505 ] ; 503 ] ;
506 spin:constraint 504 spin:constraint
507 [ rdf:type spl:Argument ; 505 [ rdf:type spl:Argument ;
508 - spl:predicate sp:arg1 ; 506 + spl:predicate sp:arg2 ;
509 spl:valueType xsd:string 507 spl:valueType xsd:string
510 ] ; 508 ] ;
511 spin:constraint 509 spin:constraint
512 [ rdf:type spl:Argument ; 510 [ rdf:type spl:Argument ;
513 - spl:predicate sp:arg2 ; 511 + spl:predicate sp:arg1 ;
514 spl:valueType xsd:string 512 spl:valueType xsd:string
515 ] . 513 ] .
516 514
...@@ -728,6 +726,42 @@ ep-spin-lib:buildWirelineFormationTestURI ...@@ -728,6 +726,42 @@ ep-spin-lib:buildWirelineFormationTestURI
728 ]) 726 ])
729 ] . 727 ] .
730 728
729 +ep-spin-lib:nameWellbore
730 + rdf:type spin:MagicProperty ;
731 + rdfs:comment "A magic property that safely gets the name of a well bore (variable on the right) from a DDR SXML structure (resource on the left side). This is intentionally named similar to ddr:nameWellbore because it acts as replacement for it."^^xsd:string ;
732 + rdfs:label "name wellbore"^^xsd:string ;
733 + rdfs:subClassOf spin:MagicProperties ;
734 + spin:body
735 + [ rdf:type sp:Select ;
736 + sp:resultVariables ([ sp:varName "name"^^xsd:string
737 + ]) ;
738 + sp:where ([ sp:object
739 + [ sp:varName "ref"^^xsd:string
740 + ] ;
741 + sp:predicate ddr:wellboreAliasRef ;
742 + sp:subject spin:_arg1
743 + ] [ sp:object ddr:WNS_NPDcode ;
744 + sp:predicate ddr:namingSystemRef ;
745 + sp:subject
746 + [ sp:varName "ref"^^xsd:string
747 + ]
748 + ] [ sp:object
749 + [ sp:varName "name"^^xsd:string
750 + ] ;
751 + sp:predicate ddr:name ;
752 + sp:subject
753 + [ sp:varName "ref"^^xsd:string
754 + ]
755 + ])
756 + ] ;
757 + spin:constraint
758 + [ rdf:type spl:Argument ;
759 + rdfs:comment "The drill report (left hand side)."^^xsd:string ;
760 + spl:predicate sp:arg1 ;
761 + spl:valueType ddr:Obj_drillReport
762 + ] ;
763 + spin:returnType xsd:string .
764 +
731 ep-spin-lib:normalizeString 765 ep-spin-lib:normalizeString
732 rdf:type spin:Function ; 766 rdf:type spin:Function ;
733 rdfs:label "normalize string"^^xsd:string ; 767 rdfs:label "normalize string"^^xsd:string ;
......