SPIN_EP-WDR-tables-v1.0.spin.ttl
12.9 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# baseURI: http://www.reportinghub.no/ep/spin/wdr-tables
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/activity-purpose
# imports: http://www.reportinghub.no/ep/schema/1.0/ddr
# imports: http://www.reportinghub.no/spin/rh
@prefix arg: <http://spinrdf.org/arg#> .
@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 spif: <http://spinrdf.org/spif#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix wdr-tables: <http://www.reportinghub.no/ep/spin/wdr-tables#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/ep/spin/wdr-tables>
rdf:type owl:Ontology ;
rdfs:comment "A collection of SELECT templates that can be used to assemble tables in DD reports."^^xsd:string ;
owl:imports <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <http://spinrdf.org/spin> ;
owl:versionInfo "0.1.0"^^xsd:string .
wdr-tables:DailyAndForecastComments
rdf:type rhspin:TableTemplate ;
rdfs:label "Daily and Forecast Comments"^^xsd:string ;
rdfs:subClassOf rhspin:WDRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy (_:b1) ;
sp:resultVariables (_:b1 _:b2 _:b3) ;
sp:where ([ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWellBore> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b5
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b6
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#DailyDrillingActivityToStatus> ;
sp:predicate rdf:type ;
sp:subject _:b6
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b6
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date _:b7 ;
arg:pattern "yyyy-MM-dd"
] ;
sp:variable _:b1
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "startDate"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd"
] ;
sp:variable _:b8
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:le ;
sp:arg1 _:b8 ;
sp:arg2 _:b1
]
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#descriptionOfActivitiesWithinTheDailyReportingPeriod> ;
sp:subject _:b6
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#descriptionOfActivitiesForecastForTheNextDailyReportingPeriod> ;
sp:subject _:b6
])
] ;
rhspin:tableHeaders ("Day"^^xsd:string "Daily Summary"^^xsd:string "Next Day Forecast"^^xsd:string) .
wdr-tables:MissedProduction
rdf:type rhspin:TableTemplate ;
rdfs:label "Non Productive Time"^^xsd:string ;
rdfs:subClassOf rhspin:WDRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy ([ sp:varName "day"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "day"^^xsd:string
] [ sp:varName "startTime"^^xsd:string
] [ sp:varName "duration"^^xsd:string
] [ sp:varName "comment"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "dayWellbore"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dayWellbore"^^xsd:string
]
] [ sp:object
[ sp:varName "dayWellbore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "partWellbore"^^xsd:string
]
] [ sp:object
[ sp:varName "partWellbore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject
[ sp:varName "failure"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#EquipmentFailureAndRepair> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "failure"^^xsd:string
]
] [ sp:object
[ sp:varName "timeOfFailure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#timeOfFailure> ;
sp:subject
[ sp:varName "failure"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "timeOfFailure"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd"
] ;
sp:variable
[ sp:varName "day"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "startDate"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd"
] ;
sp:variable
[ sp:varName "startDateDay"^^xsd:string
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:le ;
sp:arg1 [ sp:varName "startDateDay"^^xsd:string
] ;
sp:arg2 [ sp:varName "day"^^xsd:string
]
]
] [ sp:object
[ sp:varName "comment"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject
[ sp:varName "failure"^^xsd:string
]
] [ sp:object
[ sp:varName "mpt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#missedProductionTime> ;
sp:subject
[ sp:varName "failure"^^xsd:string
]
] [ sp:object
[ sp:varName "duration"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#minute> ;
sp:subject
[ sp:varName "mpt"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "timeOfFailure"^^xsd:string
] ;
arg:pattern "HH:mm"
] ;
sp:variable
[ sp:varName "startTime"^^xsd:string
]
])
] ;
rhspin:tableHeaders ("Day"^^xsd:string "Start Time"^^xsd:string "Duration Minutes"^^xsd:string "Comment"^^xsd:string) .
wdr-tables:Test
rdf:type rhspin:TableTemplate ;
rdfs:label "Test Table"^^xsd:string ;
rdfs:subClassOf rhspin:WDRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "a"^^xsd:string
] [ sp:varName "b"^^xsd:string
] [ sp:varName "c"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression 42 ;
sp:variable
[ sp:varName "a"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ sp:varName "startDate"^^xsd:string
] ;
sp:variable
[ sp:varName "b"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ sp:varName "wellBore"^^xsd:string
] ;
sp:variable
[ sp:varName "c"^^xsd:string
]
])
] ;
rhspin:tableHeaders ("Column 1"^^xsd:string "Column 2"^^xsd:string "Column 3"^^xsd:string) .
_:b8 sp:varName "startDateDay"^^xsd:string .
_:b7 sp:varName "startedAt"^^xsd:string .
_:b6 sp:varName "ddats"^^xsd:string .
_:b5 sp:varName "partWellbore"^^xsd:string .
_:b4 sp:varName "dayWellbore"^^xsd:string .
_:b3 sp:varName "nextDayForecast"^^xsd:string .
_:b2 sp:varName "dailySummary"^^xsd:string .
_:b1 sp:varName "day"^^xsd:string .