TRANSFORM_SPREADSHEETS-to-NPD.ttl
6.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# baseURI: http://www.reportinghub.no/transform/spreadsheets2npd
# imports: http://topbraid.org/spin/spinmapl
# imports: file:///www.reportinghub.no/transform/wellbore-npdid-overview-2011-07-30
# imports: file:///www.reportinghub.no/transform/wellbore-npdid-overview
# imports: http://www.reportinghub.no/1.1/schema/npd
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/spin/rh
@prefix : <http://www.reportinghub.no/transform/spreadsheets2npd#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix npdi: <https://www.reportinghub.no/data/npd/> .
@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 rhspin: <http://www.reportinghub.no/spin/rh#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spinmap: <http://spinrdf.org/spinmap#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#WBID>
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression
[ rdf:type rhspin:wellByName ;
arg:wellName spin:_arg1
] ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWell> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#partOfWell>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-Well ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWell> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#name>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-0-1 ;
spinmap:context :WBID-Well ;
spinmap:expression <http://www.reportinghub.no/schema/npd#Well> ;
spinmap:targetPredicate1
rdf:type
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWellboreName> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#name>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWellType> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#wellBoreType>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-1-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression spin:_arg1 ;
spinmap:sourcePredicate1
<file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbNpdidWellbore> ;
spinmap:targetPredicate1
<http://www.reportinghub.no/schema/npd#id>
] ;
spinmap:rule
[ rdf:type spinmap:Mapping-0-1 ;
spinmap:context :WBID-WellBore ;
spinmap:expression <http://www.reportinghub.no/schema/npd#WellBore> ;
spinmap:targetPredicate1
rdf:type
] .
arg:well
rdfs:subPropertyOf sp:arg .
arg:wellBoreName
rdfs:subPropertyOf sp:arg .
arg:wellName
rdfs:subPropertyOf sp:arg .
<http://www.reportinghub.no/transform/spreadsheets2npd>
rdf:type owl:Ontology ;
rdfs:comment "Takes spreadsheets imported from the NPD fact pages and maps them into the NPD ontology."^^xsd:string ;
owl:imports <http://www.reportinghub.no/spin/rh> , <file:///www.reportinghub.no/transform/wellbore-npdid-overview> , <file:///www.reportinghub.no/transform/wellbore-npdid-overview-2011-07-30> , <http://spinrdf.org/spin> , <http://topbraid.org/spin/spinmapl> , <http://www.reportinghub.no/1.1/schema/npd> ;
owl:versionInfo "0.1.0"^^xsd:string .
:WBID-Well
rdf:type spinmap:Context ;
spinmap:sourceClass <file:///www.reportinghub.no/transform/wellbore-npdid-overview#WBID> ;
spinmap:target
[ rdf:type :buildWellURI ;
spinmap:source spinmap:_source
] ;
spinmap:targetClass <http://www.reportinghub.no/schema/npd#Well> .
:WBID-WellBore
rdf:type spinmap:Context ;
spinmap:sourceClass <file:///www.reportinghub.no/transform/wellbore-npdid-overview#WBID> ;
spinmap:target
[ rdf:type :buildWellBoreURI ;
spinmap:source spinmap:_source
] ;
spinmap:targetClass <http://www.reportinghub.no/schema/npd#WellBore> .
:buildWellBoreURI
rdf:type spinmap:TargetFunction ;
rdfs:label "build well bore URI"^^xsd:string ;
rdfs:subClassOf spinmap:TargetFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type rhspin:wellBoreByName ;
arg:wellBoreName _:b1
]) ;
sp:where ([ sp:object _:b1 ;
sp:predicate <file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWellboreName> ;
sp:subject
[ sp:varName "source"^^xsd:string
]
])
] ;
spin:returnType rdfs:Resource .
:buildWellURI
rdf:type spinmap:TargetFunction ;
rdfs:label "build well URI"^^xsd:string ;
rdfs:subClassOf spinmap:TargetFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ rdf:type rhspin:wellByName ;
arg:wellName _:b2
]) ;
sp:where ([ sp:object _:b2 ;
sp:predicate <file:///www.reportinghub.no/transform/wellbore-npdid-overview#wlbWell> ;
sp:subject
[ sp:varName "source"^^xsd:string
]
])
] .
_:b1 sp:varName "wellBoreId"^^xsd:string .
_:b2 sp:varName "wellName"^^xsd:string .