chinmaytq

Added a spin function for getting mprp graphs by month and field name.

...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
2 # imports: http://spinrdf.org/spin 2 # imports: http://spinrdf.org/spin
3 # imports: http://www.reportinghub.no/system/schema/reporting 3 # imports: http://www.reportinghub.no/system/schema/reporting
4 4
5 -# c14n-version: 3
6 @prefix arg: <http://spinrdf.org/arg#> . 5 @prefix arg: <http://spinrdf.org/arg#> .
7 @prefix fn: <http://www.w3.org/2005/xpath-functions#> . 6 @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
8 @prefix owl: <http://www.w3.org/2002/07/owl#> . 7 @prefix owl: <http://www.w3.org/2002/07/owl#> .
...@@ -14,773 +13,659 @@ ...@@ -14,773 +13,659 @@
14 @prefix spin: <http://spinrdf.org/spin#> . 13 @prefix spin: <http://spinrdf.org/spin#> .
15 @prefix spl: <http://spinrdf.org/spl#> . 14 @prefix spl: <http://spinrdf.org/spl#> .
16 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . 15 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
16 +
17 arg:date 17 arg:date
18 rdf:type rdf:Property ; 18 rdf:type rdf:Property ;
19 rdfs:label "date"^^xsd:string ; 19 rdfs:label "date"^^xsd:string ;
20 - rdfs:subPropertyOf sp:arg ; 20 + rdfs:subPropertyOf sp:arg .
21 -. 21 +
22 arg:fieldName 22 arg:fieldName
23 rdf:type rdf:Property ; 23 rdf:type rdf:Property ;
24 rdfs:label "field name"^^xsd:string ; 24 rdfs:label "field name"^^xsd:string ;
25 - rdfs:subPropertyOf sp:arg ; 25 + rdfs:subPropertyOf sp:arg .
26 -. 26 +
27 arg:id 27 arg:id
28 rdf:type rdf:Property ; 28 rdf:type rdf:Property ;
29 rdfs:label "id"^^xsd:string ; 29 rdfs:label "id"^^xsd:string ;
30 - rdfs:subPropertyOf sp:arg ; 30 + rdfs:subPropertyOf sp:arg .
31 -. 31 +
32 arg:month 32 arg:month
33 rdf:type rdf:Property ; 33 rdf:type rdf:Property ;
34 rdfs:label "month"^^xsd:string ; 34 rdfs:label "month"^^xsd:string ;
35 - rdfs:subPropertyOf sp:arg ; 35 + rdfs:subPropertyOf sp:arg .
36 -. 36 +
37 arg:owner 37 arg:owner
38 rdf:type rdf:Property ; 38 rdf:type rdf:Property ;
39 rdfs:label "owner"^^xsd:string ; 39 rdfs:label "owner"^^xsd:string ;
40 - rdfs:subPropertyOf sp:arg ; 40 + rdfs:subPropertyOf sp:arg .
41 -. 41 +
42 arg:parts 42 arg:parts
43 rdf:type rdf:Property ; 43 rdf:type rdf:Property ;
44 rdfs:label "parts"^^xsd:string ; 44 rdfs:label "parts"^^xsd:string ;
45 - rdfs:subPropertyOf sp:arg ; 45 + rdfs:subPropertyOf sp:arg .
46 -. 46 +
47 arg:wellBoreId 47 arg:wellBoreId
48 rdf:type rdf:Property ; 48 rdf:type rdf:Property ;
49 rdfs:label "well bore id"^^xsd:string ; 49 rdfs:label "well bore id"^^xsd:string ;
50 - rdfs:subPropertyOf sp:arg ; 50 + rdfs:subPropertyOf sp:arg .
51 -. 51 +
52 <http://www.reportinghub.no/system/spin/reporting> 52 <http://www.reportinghub.no/system/spin/reporting>
53 rdf:type owl:Ontology ; 53 rdf:type owl:Ontology ;
54 rdfs:comment "SPIN functions and templates to support querying report metadata."^^xsd:string ; 54 rdfs:comment "SPIN functions and templates to support querying report metadata."^^xsd:string ;
55 - owl:imports <http://spinrdf.org/spin> ; 55 + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/system/schema/reporting> ;
56 - owl:imports <http://www.reportinghub.no/system/schema/reporting> ; 56 + owl:versionInfo "0.1.0"^^xsd:string .
57 - owl:versionInfo "0.1.0"^^xsd:string ; 57 +
58 -.
59 reportspin:DDRsOverview 58 reportspin:DDRsOverview
60 rdf:type spin:SelectTemplate ; 59 rdf:type spin:SelectTemplate ;
61 - spin:body [ 60 + rdfs:label "DDRs overview"^^xsd:string ;
62 - rdf:type sp:Select ; 61 + rdfs:subClassOf spin:SelectTemplates ;
63 - sp:orderBy ( 62 + spin:body
64 - [ 63 + [ rdf:type sp:Select ;
65 - sp:varName "wellBoreName"^^xsd:string ; 64 + sp:orderBy ([ sp:varName "wellBoreName"^^xsd:string
66 - ] 65 + ] [ sp:varName "date"^^xsd:string
67 - [ 66 + ] [ sp:varName "created"^^xsd:string
68 - sp:varName "date"^^xsd:string ; 67 + ]) ;
69 - ] 68 + sp:resultVariables ([ sp:varName "wellBoreName"^^xsd:string
70 - [ 69 + ] [ sp:varName "date"^^xsd:string
71 - sp:varName "created"^^xsd:string ; 70 + ] [ sp:varName "created"^^xsd:string
72 - ] 71 + ] [ sp:varName "id"^^xsd:string
73 - ) ; 72 + ]) ;
74 - sp:resultVariables ( 73 + sp:where ([ sp:object
75 - [ 74 + [ sp:varName "wellBoreId"^^xsd:string
76 - sp:varName "wellBoreName"^^xsd:string ;
77 - ]
78 - [
79 - sp:varName "date"^^xsd:string ;
80 - ]
81 - [
82 - sp:varName "created"^^xsd:string ;
83 - ]
84 - [
85 - sp:varName "id"^^xsd:string ;
86 - ]
87 - ) ;
88 - sp:where (
89 - [
90 - sp:object [
91 - sp:varName "wellBoreId"^^xsd:string ;
92 ] ; 75 ] ;
93 sp:predicate <http://www.reportinghub.no/system/schema/reporting#wellBoreId> ; 76 sp:predicate <http://www.reportinghub.no/system/schema/reporting#wellBoreId> ;
94 - sp:subject [ 77 + sp:subject
95 - sp:varName "ddr"^^xsd:string ; 78 + [ sp:varName "ddr"^^xsd:string
96 - ] ;
97 ] 79 ]
98 - [ 80 + ] [ sp:object
99 - sp:object [ 81 + [ sp:varName "created"^^xsd:string
100 - sp:varName "created"^^xsd:string ;
101 ] ; 82 ] ;
102 sp:predicate <http://purl.org/dc/terms/created> ; 83 sp:predicate <http://purl.org/dc/terms/created> ;
103 - sp:subject [ 84 + sp:subject
104 - sp:varName "ddr"^^xsd:string ; 85 + [ sp:varName "ddr"^^xsd:string
105 - ] ;
106 ] 86 ]
107 - [ 87 + ] [ sp:object
108 - sp:object [ 88 + [ sp:varName "date"^^xsd:string
109 - sp:varName "date"^^xsd:string ;
110 ] ; 89 ] ;
111 sp:predicate <http://purl.org/dc/terms/date> ; 90 sp:predicate <http://purl.org/dc/terms/date> ;
112 - sp:subject [ 91 + sp:subject
113 - sp:varName "ddr"^^xsd:string ; 92 + [ sp:varName "ddr"^^xsd:string
114 - ] ;
115 ] 93 ]
116 - [ 94 + ] [ sp:object
117 - sp:object [ 95 + [ sp:varName "id"^^xsd:string
118 - sp:varName "id"^^xsd:string ;
119 ] ; 96 ] ;
120 sp:predicate <http://rdfs.org/sioc/ns#id> ; 97 sp:predicate <http://rdfs.org/sioc/ns#id> ;
121 - sp:subject [ 98 + sp:subject
122 - sp:varName "ddr"^^xsd:string ; 99 + [ sp:varName "ddr"^^xsd:string
123 - ] ;
124 ] 100 ]
125 - [ 101 + ] [ rdf:type sp:Bind ;
126 - rdf:type sp:Bind ; 102 + sp:expression
127 - sp:expression [ 103 + [ rdf:type rhspin:wellBoreById ;
128 - rdf:type rhspin:wellBoreById ; 104 + sp:arg1 [ sp:varName "wellBoreId"^^xsd:string
129 - sp:arg1 [
130 - sp:varName "wellBoreId"^^xsd:string ;
131 - ] ;
132 - ] ;
133 - sp:variable [
134 - sp:varName "wellBore"^^xsd:string ;
135 - ] ;
136 ] 105 ]
137 - [
138 - rdf:type sp:Bind ;
139 - sp:expression [
140 - rdf:type rhspin:npdName ;
141 - sp:arg1 [
142 - sp:varName "wellBore"^^xsd:string ;
143 - ] ;
144 - ] ;
145 - sp:variable [
146 - sp:varName "wellBoreName"^^xsd:string ;
147 ] ; 106 ] ;
107 + sp:variable
108 + [ sp:varName "wellBore"^^xsd:string
109 + ]
110 + ] [ rdf:type sp:Bind ;
111 + sp:expression
112 + [ rdf:type rhspin:npdName ;
113 + sp:arg1 [ sp:varName "wellBore"^^xsd:string
148 ] 114 ]
149 - ) ;
150 ] ; 115 ] ;
151 - rdfs:label "DDRs overview"^^xsd:string ; 116 + sp:variable
152 - rdfs:subClassOf spin:SelectTemplates ; 117 + [ sp:varName "wellBoreName"^^xsd:string
153 -. 118 + ]
119 + ])
120 + ] .
121 +
154 reportspin:DPRsOverview 122 reportspin:DPRsOverview
155 rdf:type spin:SelectTemplate ; 123 rdf:type spin:SelectTemplate ;
156 - spin:body [ 124 + rdfs:label "DPRs overview"^^xsd:string ;
157 - rdf:type sp:Select ; 125 + rdfs:subClassOf spin:SelectTemplates ;
158 - sp:orderBy ( 126 + spin:body
159 - [ 127 + [ rdf:type sp:Select ;
160 - sp:varName "ownerName"^^xsd:string ; 128 + sp:orderBy ([ sp:varName "ownerName"^^xsd:string
161 - ] 129 + ] [ sp:varName "date"^^xsd:string
162 - [ 130 + ] [ sp:varName "created"^^xsd:string
163 - sp:varName "date"^^xsd:string ; 131 + ]) ;
164 - ] 132 + sp:resultVariables ([ sp:varName "ownerName"^^xsd:string
165 - [ 133 + ] [ sp:varName "date"^^xsd:string
166 - sp:varName "created"^^xsd:string ; 134 + ] [ sp:varName "created"^^xsd:string
167 - ] 135 + ] [ sp:varName "id"^^xsd:string
168 - ) ; 136 + ]) ;
169 - sp:resultVariables ( 137 + sp:where ([ sp:object
170 - [ 138 + [ sp:varName "id"^^xsd:string
171 - sp:varName "ownerName"^^xsd:string ;
172 - ]
173 - [
174 - sp:varName "date"^^xsd:string ;
175 - ]
176 - [
177 - sp:varName "created"^^xsd:string ;
178 - ]
179 - [
180 - sp:varName "id"^^xsd:string ;
181 - ]
182 - ) ;
183 - sp:where (
184 - [
185 - sp:object [
186 - sp:varName "id"^^xsd:string ;
187 ] ; 139 ] ;
188 sp:predicate <http://rdfs.org/sioc/ns#id> ; 140 sp:predicate <http://rdfs.org/sioc/ns#id> ;
189 - sp:subject [ 141 + sp:subject
190 - sp:varName "dpr"^^xsd:string ; 142 + [ sp:varName "dpr"^^xsd:string
191 - ] ;
192 ] 143 ]
193 - [ 144 + ] [ sp:object
194 - sp:object [ 145 + [ sp:varName "created"^^xsd:string
195 - sp:varName "created"^^xsd:string ;
196 ] ; 146 ] ;
197 sp:predicate <http://purl.org/dc/terms/created> ; 147 sp:predicate <http://purl.org/dc/terms/created> ;
198 - sp:subject [ 148 + sp:subject
199 - sp:varName "dpr"^^xsd:string ; 149 + [ sp:varName "dpr"^^xsd:string
200 - ] ;
201 ] 150 ]
202 - [ 151 + ] [ sp:object
203 - sp:object [ 152 + [ sp:varName "date"^^xsd:string
204 - sp:varName "date"^^xsd:string ;
205 ] ; 153 ] ;
206 sp:predicate <http://purl.org/dc/terms/date> ; 154 sp:predicate <http://purl.org/dc/terms/date> ;
207 - sp:subject [ 155 + sp:subject
208 - sp:varName "dpr"^^xsd:string ; 156 + [ sp:varName "dpr"^^xsd:string
209 - ] ;
210 ] 157 ]
211 - [ 158 + ] [ sp:object
212 - sp:object [ 159 + [ sp:varName "owner"^^xsd:string
213 - sp:varName "owner"^^xsd:string ;
214 ] ; 160 ] ;
215 sp:predicate <http://www.reportinghub.no/system/schema/reporting#owner> ; 161 sp:predicate <http://www.reportinghub.no/system/schema/reporting#owner> ;
216 - sp:subject [ 162 + sp:subject
217 - sp:varName "dpr"^^xsd:string ; 163 + [ sp:varName "dpr"^^xsd:string
218 - ] ;
219 ] 164 ]
220 - [ 165 + ] [ rdf:type sp:Bind ;
221 - rdf:type sp:Bind ; 166 + sp:expression
222 - sp:expression [ 167 + [ rdf:type rhspin:npdName ;
223 - rdf:type rhspin:npdName ; 168 + sp:arg1 [ sp:varName "owner"^^xsd:string
224 - sp:arg1 [
225 - sp:varName "owner"^^xsd:string ;
226 - ] ;
227 - ] ;
228 - sp:variable [
229 - sp:varName "ownerName"^^xsd:string ;
230 - ] ;
231 ] 169 ]
232 - ) ;
233 ] ; 170 ] ;
234 - rdfs:label "DPRs overview"^^xsd:string ; 171 + sp:variable
235 - rdfs:subClassOf spin:SelectTemplates ; 172 + [ sp:varName "ownerName"^^xsd:string
236 -. 173 + ]
174 + ])
175 + ] .
176 +
237 reportspin:graphByDDRId 177 reportspin:graphByDDRId
238 rdf:type spin:Function ; 178 rdf:type spin:Function ;
239 - spin:body [ 179 + rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report:DDR (metadata) with a given id."^^xsd:string ;
240 - rdf:type sp:Select ; 180 + rdfs:label "graph by DDR id"^^xsd:string ;
241 - sp:resultVariables ( 181 + rdfs:subClassOf spin:Functions ;
242 - [ 182 + spin:body
243 - rdf:type sp:iri ; 183 + [ rdf:type sp:Select ;
244 - sp:arg1 [ 184 + sp:resultVariables ([ rdf:type sp:iri ;
245 - sp:varName "uri"^^xsd:string ; 185 + sp:arg1 [ sp:varName "uri"^^xsd:string
246 - ] ; 186 + ]
247 - ] 187 + ]) ;
248 - ) ; 188 + sp:where ([ rdf:type sp:Bind ;
249 - sp:where ( 189 + sp:expression
250 - [ 190 + [ rdf:type fn:concat ;
251 - rdf:type sp:Bind ;
252 - sp:expression [
253 - rdf:type fn:concat ;
254 sp:arg1 "http://www.reportinghub.no/system/ddr/" ; 191 sp:arg1 "http://www.reportinghub.no/system/ddr/" ;
255 - sp:arg2 [ 192 + sp:arg2 [ sp:varName "id"^^xsd:string
256 - sp:varName "id"^^xsd:string ; 193 + ]
257 - ] ;
258 - ] ;
259 - sp:variable [
260 - sp:varName "uri"^^xsd:string ;
261 ] ; 194 ] ;
195 + sp:variable
196 + [ sp:varName "uri"^^xsd:string
262 ] 197 ]
263 - ) ; 198 + ])
264 ] ; 199 ] ;
265 - spin:constraint [ 200 + spin:constraint
266 - rdf:type spl:Argument ; 201 + [ rdf:type spl:Argument ;
267 - spl:predicate arg:id ;
268 - spl:valueType xsd:string ;
269 rdfs:comment "The id of the DDR metadata."^^xsd:string ; 202 rdfs:comment "The id of the DDR metadata."^^xsd:string ;
203 + spl:predicate arg:id ;
204 + spl:valueType xsd:string
270 ] ; 205 ] ;
271 - spin:returnType rdfs:Resource ; 206 + spin:returnType rdfs:Resource .
272 - rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report:DDR (metadata) with a given id."^^xsd:string ; 207 +
273 - rdfs:label "graph by DDR id"^^xsd:string ;
274 - rdfs:subClassOf spin:Functions ;
275 -.
276 reportspin:graphByDPRId 208 reportspin:graphByDPRId
277 rdf:type spin:Function ; 209 rdf:type spin:Function ;
278 - spin:body [ 210 + rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report:DPR (metadata) with a given id."^^xsd:string ;
279 - rdf:type sp:Select ; 211 + rdfs:label "graph by DPR id"^^xsd:string ;
280 - sp:resultVariables ( 212 + rdfs:subClassOf spin:Functions ;
281 - [ 213 + spin:body
282 - rdf:type sp:iri ; 214 + [ rdf:type sp:Select ;
283 - sp:arg1 [ 215 + sp:resultVariables ([ rdf:type sp:iri ;
284 - sp:varName "uri"^^xsd:string ; 216 + sp:arg1 [ sp:varName "uri"^^xsd:string
285 - ] ; 217 + ]
286 - ] 218 + ]) ;
287 - ) ; 219 + sp:where ([ rdf:type sp:Bind ;
288 - sp:where ( 220 + sp:expression
289 - [ 221 + [ rdf:type fn:concat ;
290 - rdf:type sp:Bind ;
291 - sp:expression [
292 - rdf:type fn:concat ;
293 sp:arg1 "http://www.reportinghub.no/system/dpr/" ; 222 sp:arg1 "http://www.reportinghub.no/system/dpr/" ;
294 - sp:arg2 [ 223 + sp:arg2 [ sp:varName "id"^^xsd:string
295 - sp:varName "id"^^xsd:string ; 224 + ]
296 - ] ;
297 - ] ;
298 - sp:variable [
299 - sp:varName "uri"^^xsd:string ;
300 ] ; 225 ] ;
226 + sp:variable
227 + [ sp:varName "uri"^^xsd:string
301 ] 228 ]
302 - ) ; 229 + ])
303 ] ; 230 ] ;
304 - spin:constraint [ 231 + spin:constraint
305 - rdf:type spl:Argument ; 232 + [ rdf:type spl:Argument ;
306 - spl:predicate arg:id ;
307 - spl:valueType xsd:string ;
308 rdfs:comment "The id of the DPR metadata."^^xsd:string ; 233 rdfs:comment "The id of the DPR metadata."^^xsd:string ;
234 + spl:predicate arg:id ;
235 + spl:valueType xsd:string
309 ] ; 236 ] ;
310 - spin:returnType rdfs:Resource ; 237 + spin:returnType rdfs:Resource .
311 - rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report:DPR (metadata) with a given id."^^xsd:string ; 238 +
312 - rdfs:label "graph by DPR id"^^xsd:string ;
313 - rdfs:subClassOf spin:Functions ;
314 -.
315 reportspin:graphByReportId 239 reportspin:graphByReportId
316 rdf:type spin:Function ; 240 rdf:type spin:Function ;
317 - spin:body [ 241 + rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report with a given id."^^xsd:string ;
318 - rdf:type sp:Select ; 242 + rdfs:label "graph by report id"^^xsd:string ;
319 - sp:resultVariables ( 243 + rdfs:subClassOf spin:Functions ;
320 - [ 244 + spin:body
321 - rdf:type sp:iri ; 245 + [ rdf:type sp:Select ;
322 - sp:arg1 [ 246 + sp:resultVariables ([ rdf:type sp:iri ;
323 - sp:varName "uri"^^xsd:string ; 247 + sp:arg1 [ sp:varName "uri"^^xsd:string
324 - ] ; 248 + ]
325 - ] 249 + ]) ;
326 - ) ; 250 + sp:where ([ rdf:type sp:Bind ;
327 - sp:where ( 251 + sp:expression
328 - [ 252 + [ rdf:type fn:concat ;
329 - rdf:type sp:Bind ;
330 - sp:expression [
331 - rdf:type fn:concat ;
332 sp:arg1 "http://www.reportinghub.no/system/report/" ; 253 sp:arg1 "http://www.reportinghub.no/system/report/" ;
333 - sp:arg2 [ 254 + sp:arg2 [ sp:varName "id"^^xsd:string
334 - sp:varName "id"^^xsd:string ; 255 + ]
335 - ] ;
336 - ] ;
337 - sp:variable [
338 - sp:varName "uri"^^xsd:string ;
339 ] ; 256 ] ;
257 + sp:variable
258 + [ sp:varName "uri"^^xsd:string
340 ] 259 ]
341 - ) ; 260 + ])
342 ] ; 261 ] ;
343 - spin:constraint [ 262 + spin:constraint
344 - rdf:type spl:Argument ; 263 + [ rdf:type spl:Argument ;
345 - spl:predicate arg:id ;
346 - spl:valueType xsd:string ;
347 rdfs:comment "The id of the DDR metadata."^^xsd:string ; 264 rdfs:comment "The id of the DDR metadata."^^xsd:string ;
265 + spl:predicate arg:id ;
266 + spl:valueType xsd:string
348 ] ; 267 ] ;
349 - spin:returnType rdfs:Resource ; 268 + spin:returnType rdfs:Resource .
350 - rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report with a given id."^^xsd:string ; 269 +
351 - rdfs:label "graph by report id"^^xsd:string ;
352 - rdfs:subClassOf spin:Functions ;
353 -.
354 reportspin:idOfDDRByDateAndWellBoreId 270 reportspin:idOfDDRByDateAndWellBoreId
355 rdf:type spin:Function ; 271 rdf:type spin:Function ;
356 - spin:body [ 272 + rdfs:comment "Gets the id of a DDR defined by date and well bore id. If preliminary reports have been created, this will return the most recent one only."^^xsd:string ;
357 - rdf:type sp:Select ; 273 + rdfs:label "id of DDR by date and well bore id"^^xsd:string ;
358 - sp:orderBy ( 274 + rdfs:subClassOf spin:Functions ;
359 - [ 275 + spin:body
360 - rdf:type sp:Desc ; 276 + [ rdf:type sp:Select ;
361 - sp:expression [ 277 + sp:orderBy ([ rdf:type sp:Desc ;
362 - sp:varName "created"^^xsd:string ; 278 + sp:expression
363 - ] ; 279 + [ sp:varName "created"^^xsd:string
364 - ] 280 + ]
365 - ) ; 281 + ]) ;
366 - sp:resultVariables ( 282 + sp:resultVariables ([ sp:varName "id"^^xsd:string
367 - [ 283 + ]) ;
368 - sp:varName "id"^^xsd:string ; 284 + sp:where ([ sp:object
369 - ] 285 + [ sp:varName "wellBoreId"^^xsd:string
370 - ) ;
371 - sp:where (
372 - [
373 - sp:object [
374 - sp:varName "wellBoreId"^^xsd:string ;
375 ] ; 286 ] ;
376 sp:predicate <http://www.reportinghub.no/system/schema/reporting#wellBoreId> ; 287 sp:predicate <http://www.reportinghub.no/system/schema/reporting#wellBoreId> ;
377 - sp:subject [ 288 + sp:subject
378 - sp:varName "report"^^xsd:string ; 289 + [ sp:varName "report"^^xsd:string
379 - ] ;
380 ] 290 ]
381 - [ 291 + ] [ sp:object
382 - sp:object [ 292 + [ sp:varName "date"^^xsd:string
383 - sp:varName "date"^^xsd:string ;
384 ] ; 293 ] ;
385 sp:predicate <http://purl.org/dc/terms/date> ; 294 sp:predicate <http://purl.org/dc/terms/date> ;
386 - sp:subject [ 295 + sp:subject
387 - sp:varName "report"^^xsd:string ; 296 + [ sp:varName "report"^^xsd:string
388 - ] ;
389 ] 297 ]
390 - [ 298 + ] [ sp:object
391 - sp:object [ 299 + [ sp:varName "created"^^xsd:string
392 - sp:varName "created"^^xsd:string ;
393 ] ; 300 ] ;
394 sp:predicate <http://purl.org/dc/terms/created> ; 301 sp:predicate <http://purl.org/dc/terms/created> ;
395 - sp:subject [ 302 + sp:subject
396 - sp:varName "report"^^xsd:string ; 303 + [ sp:varName "report"^^xsd:string
397 - ] ;
398 ] 304 ]
399 - [ 305 + ] [ sp:object
400 - sp:object [ 306 + [ sp:varName "id"^^xsd:string
401 - sp:varName "id"^^xsd:string ;
402 ] ; 307 ] ;
403 sp:predicate <http://rdfs.org/sioc/ns#id> ; 308 sp:predicate <http://rdfs.org/sioc/ns#id> ;
404 - sp:subject [ 309 + sp:subject
405 - sp:varName "report"^^xsd:string ; 310 + [ sp:varName "report"^^xsd:string
406 - ] ;
407 ] 311 ]
408 - ) ; 312 + ])
409 ] ; 313 ] ;
410 - spin:constraint [ 314 + spin:constraint
411 - rdf:type spl:Argument ; 315 + [ rdf:type spl:Argument ;
412 - spl:predicate arg:date ;
413 - spl:valueType xsd:date ;
414 rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ; 316 rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ;
317 + spl:predicate arg:date ;
318 + spl:valueType xsd:date
415 ] ; 319 ] ;
416 - spin:constraint [ 320 + spin:constraint
417 - rdf:type spl:Argument ; 321 + [ rdf:type spl:Argument ;
418 - spl:predicate arg:wellBoreId ;
419 - spl:valueType xsd:string ;
420 rdfs:comment "The id of the well bore."^^xsd:string ; 322 rdfs:comment "The id of the well bore."^^xsd:string ;
323 + spl:predicate arg:wellBoreId ;
324 + spl:valueType xsd:string
421 ] ; 325 ] ;
422 - spin:returnType xsd:string ; 326 + spin:returnType xsd:string .
423 - rdfs:comment "Gets the id of a DDR defined by date and well bore id. If preliminary reports have been created, this will return the most recent one only."^^xsd:string ; 327 +
424 - rdfs:label "id of DDR by date and well bore id"^^xsd:string ;
425 - rdfs:subClassOf spin:Functions ;
426 -.
427 reportspin:idOfDPR2ByDateAndFieldName 328 reportspin:idOfDPR2ByDateAndFieldName
428 rdf:type spin:Function ; 329 rdf:type spin:Function ;
429 - spin:body [ 330 + rdfs:label "id of DPR2By date and field name"^^xsd:string ;
430 - rdf:type sp:Select ; 331 + rdfs:subClassOf spin:Functions ;
332 + spin:body
333 + [ rdf:type sp:Select ;
431 sp:limit "1"^^xsd:long ; 334 sp:limit "1"^^xsd:long ;
432 - sp:orderBy ( 335 + sp:orderBy ([ rdf:type sp:Desc ;
433 - [ 336 + sp:expression
434 - rdf:type sp:Desc ; 337 + [ sp:varName "created"^^xsd:string
435 - sp:expression [
436 - sp:varName "created"^^xsd:string ;
437 - ] ;
438 - ]
439 - ) ;
440 - sp:resultVariables (
441 - [
442 - sp:varName "id"^^xsd:string ;
443 ] 338 ]
444 - ) ; 339 + ]) ;
445 - sp:where ( 340 + sp:resultVariables ([ sp:varName "id"^^xsd:string
446 - [ 341 + ]) ;
447 - sp:object [ 342 + sp:where ([ sp:object
448 - sp:varName "fieldName"^^xsd:string ; 343 + [ sp:varName "fieldName"^^xsd:string
449 ] ; 344 ] ;
450 sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ; 345 sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ;
451 - sp:subject [ 346 + sp:subject
452 - sp:varName "report"^^xsd:string ; 347 + [ sp:varName "report"^^xsd:string
453 - ] ;
454 ] 348 ]
455 - [ 349 + ] [ sp:object
456 - sp:object [ 350 + [ sp:varName "date"^^xsd:string
457 - sp:varName "date"^^xsd:string ;
458 ] ; 351 ] ;
459 sp:predicate <http://purl.org/dc/terms/date> ; 352 sp:predicate <http://purl.org/dc/terms/date> ;
460 - sp:subject [ 353 + sp:subject
461 - sp:varName "report"^^xsd:string ; 354 + [ sp:varName "report"^^xsd:string
462 - ] ;
463 ] 355 ]
464 - [ 356 + ] [ sp:object
465 - sp:object [ 357 + [ sp:varName "created"^^xsd:string
466 - sp:varName "created"^^xsd:string ;
467 ] ; 358 ] ;
468 sp:predicate <http://purl.org/dc/terms/created> ; 359 sp:predicate <http://purl.org/dc/terms/created> ;
469 - sp:subject [ 360 + sp:subject
470 - sp:varName "report"^^xsd:string ; 361 + [ sp:varName "report"^^xsd:string
471 - ] ;
472 ] 362 ]
473 - [ 363 + ] [ sp:object
474 - sp:object [ 364 + [ sp:varName "id"^^xsd:string
475 - sp:varName "id"^^xsd:string ;
476 ] ; 365 ] ;
477 sp:predicate <http://rdfs.org/sioc/ns#id> ; 366 sp:predicate <http://rdfs.org/sioc/ns#id> ;
478 - sp:subject [ 367 + sp:subject
479 - sp:varName "report"^^xsd:string ; 368 + [ sp:varName "report"^^xsd:string
480 - ] ;
481 ] 369 ]
482 - ) ; 370 + ])
483 ] ; 371 ] ;
484 - spin:constraint [ 372 + spin:constraint
485 - rdf:type spl:Argument ; 373 + [ rdf:type spl:Argument ;
486 - spl:predicate arg:date ;
487 - spl:valueType xsd:date ;
488 rdfs:comment "The xsd:date of the DPR2 to get."^^xsd:string ; 374 rdfs:comment "The xsd:date of the DPR2 to get."^^xsd:string ;
375 + spl:predicate arg:date ;
376 + spl:valueType xsd:date
489 ] ; 377 ] ;
490 - spin:constraint [ 378 + spin:constraint
491 - rdf:type spl:Argument ; 379 + [ rdf:type spl:Argument ;
492 - spl:predicate arg:fieldName ;
493 - spl:valueType xsd:string ;
494 rdfs:comment "The registered name of the Field."^^xsd:string ; 380 rdfs:comment "The registered name of the Field."^^xsd:string ;
381 + spl:predicate arg:fieldName ;
382 + spl:valueType xsd:string
495 ] ; 383 ] ;
496 - spin:returnType xsd:string ; 384 + spin:returnType xsd:string .
497 - rdfs:label "id of DPR2By date and field name"^^xsd:string ; 385 +
498 - rdfs:subClassOf spin:Functions ;
499 -.
500 reportspin:idOfDPRByDateAndOwner 386 reportspin:idOfDPRByDateAndOwner
501 rdf:type spin:Function ; 387 rdf:type spin:Function ;
502 - spin:body [ 388 + rdfs:comment "Gets the id of a DPR defined by date and licence or BAA. If preliminary reports have been created, this will return the most recent one only."^^xsd:string ;
503 - rdf:type sp:Select ; 389 + rdfs:label "id of DPR by date and owner"^^xsd:string ;
504 - sp:orderBy ( 390 + rdfs:subClassOf spin:Functions ;
505 - [ 391 + spin:body
506 - rdf:type sp:Desc ; 392 + [ rdf:type sp:Select ;
507 - sp:expression [ 393 + sp:orderBy ([ rdf:type sp:Desc ;
508 - sp:varName "created"^^xsd:string ; 394 + sp:expression
509 - ] ; 395 + [ sp:varName "created"^^xsd:string
510 - ] 396 + ]
511 - ) ; 397 + ]) ;
512 - sp:resultVariables ( 398 + sp:resultVariables ([ sp:varName "id"^^xsd:string
513 - [ 399 + ]) ;
514 - sp:varName "id"^^xsd:string ; 400 + sp:where ([ sp:object
515 - ] 401 + [ sp:varName "owner"^^xsd:string
516 - ) ;
517 - sp:where (
518 - [
519 - sp:object [
520 - sp:varName "owner"^^xsd:string ;
521 ] ; 402 ] ;
522 sp:predicate <http://www.reportinghub.no/system/schema/reporting#owner> ; 403 sp:predicate <http://www.reportinghub.no/system/schema/reporting#owner> ;
523 - sp:subject [ 404 + sp:subject
524 - sp:varName "report"^^xsd:string ; 405 + [ sp:varName "report"^^xsd:string
525 - ] ;
526 ] 406 ]
527 - [ 407 + ] [ sp:object
528 - sp:object [ 408 + [ sp:varName "date"^^xsd:string
529 - sp:varName "date"^^xsd:string ;
530 ] ; 409 ] ;
531 sp:predicate <http://purl.org/dc/terms/date> ; 410 sp:predicate <http://purl.org/dc/terms/date> ;
532 - sp:subject [ 411 + sp:subject
533 - sp:varName "report"^^xsd:string ; 412 + [ sp:varName "report"^^xsd:string
534 - ] ;
535 ] 413 ]
536 - [ 414 + ] [ sp:object
537 - sp:object [ 415 + [ sp:varName "created"^^xsd:string
538 - sp:varName "created"^^xsd:string ;
539 ] ; 416 ] ;
540 sp:predicate <http://purl.org/dc/terms/created> ; 417 sp:predicate <http://purl.org/dc/terms/created> ;
541 - sp:subject [ 418 + sp:subject
542 - sp:varName "report"^^xsd:string ; 419 + [ sp:varName "report"^^xsd:string
543 - ] ;
544 ] 420 ]
545 - [ 421 + ] [ sp:object
546 - sp:object [ 422 + [ sp:varName "id"^^xsd:string
547 - sp:varName "id"^^xsd:string ;
548 ] ; 423 ] ;
549 sp:predicate <http://rdfs.org/sioc/ns#id> ; 424 sp:predicate <http://rdfs.org/sioc/ns#id> ;
550 - sp:subject [ 425 + sp:subject
551 - sp:varName "report"^^xsd:string ; 426 + [ sp:varName "report"^^xsd:string
552 - ] ;
553 ] 427 ]
554 - ) ; 428 + ])
555 ] ; 429 ] ;
556 - spin:constraint [ 430 + spin:constraint
557 - rdf:type spl:Argument ; 431 + [ rdf:type spl:Argument ;
558 - spl:predicate arg:date ;
559 - spl:valueType xsd:date ;
560 rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ; 432 rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ;
433 + spl:predicate arg:date ;
434 + spl:valueType xsd:date
561 ] ; 435 ] ;
562 - spin:constraint [ 436 + spin:constraint
563 - rdf:type spl:Argument ; 437 + [ rdf:type spl:Argument ;
564 - spl:predicate arg:owner ;
565 - spl:valueType <http://www.reportinghub.no/np/schema/npd#Owner> ;
566 rdfs:comment "The Licence or BAA."^^xsd:string ; 438 rdfs:comment "The Licence or BAA."^^xsd:string ;
439 + spl:predicate arg:owner ;
440 + spl:valueType <http://www.reportinghub.no/np/schema/npd#Owner>
567 ] ; 441 ] ;
568 - spin:returnType xsd:string ; 442 + spin:returnType xsd:string .
569 - rdfs:comment "Gets the id of a DPR defined by date and licence or BAA. If preliminary reports have been created, this will return the most recent one only."^^xsd:string ; 443 +
570 - rdfs:label "id of DPR by date and owner"^^xsd:string ;
571 - rdfs:subClassOf spin:Functions ;
572 -.
573 reportspin:idOfMPRGByFieldMonthAndParts 444 reportspin:idOfMPRGByFieldMonthAndParts
574 rdf:type spin:Function ; 445 rdf:type spin:Function ;
575 - spin:body [ 446 + rdfs:label "id of MPRG by field, month and parts"^^xsd:string ;
576 - rdf:type sp:Select ; 447 + rdfs:subClassOf spin:Functions ;
577 - sp:orderBy ( 448 + spin:body
578 - [ 449 + [ rdf:type sp:Select ;
579 - rdf:type sp:Desc ; 450 + sp:orderBy ([ rdf:type sp:Desc ;
580 - sp:expression [ 451 + sp:expression
581 - sp:varName "created"^^xsd:string ; 452 + [ sp:varName "created"^^xsd:string
582 - ] ; 453 + ]
583 - ] 454 + ]) ;
584 - ) ; 455 + sp:resultVariables ([ sp:varName "id"^^xsd:string
585 - sp:resultVariables ( 456 + ]) ;
586 - [ 457 + sp:where ([ sp:object
587 - sp:varName "id"^^xsd:string ; 458 + [ sp:varName "fieldName"^^xsd:string
588 - ]
589 - ) ;
590 - sp:where (
591 - [
592 - sp:object [
593 - sp:varName "fieldName"^^xsd:string ;
594 ] ; 459 ] ;
595 sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ; 460 sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ;
596 - sp:subject [ 461 + sp:subject
597 - sp:varName "report"^^xsd:string ; 462 + [ sp:varName "report"^^xsd:string
598 - ] ;
599 ] 463 ]
600 - [ 464 + ] [ sp:object
601 - sp:object [ 465 + [ sp:varName "month"^^xsd:string
602 - sp:varName "month"^^xsd:string ;
603 ] ; 466 ] ;
604 sp:predicate <http://www.reportinghub.no/system/schema/reporting#month> ; 467 sp:predicate <http://www.reportinghub.no/system/schema/reporting#month> ;
605 - sp:subject [ 468 + sp:subject
606 - sp:varName "report"^^xsd:string ; 469 + [ sp:varName "report"^^xsd:string
607 - ] ;
608 ] 470 ]
609 - [ 471 + ] [ sp:object
610 - sp:object [ 472 + [ sp:varName "parts"^^xsd:string
611 - sp:varName "parts"^^xsd:string ;
612 ] ; 473 ] ;
613 sp:predicate <http://www.reportinghub.no/system/schema/reporting#containsParts> ; 474 sp:predicate <http://www.reportinghub.no/system/schema/reporting#containsParts> ;
614 - sp:subject [ 475 + sp:subject
615 - sp:varName "report"^^xsd:string ; 476 + [ sp:varName "report"^^xsd:string
616 - ] ;
617 ] 477 ]
618 - [ 478 + ] [ sp:object
619 - sp:object [ 479 + [ sp:varName "created"^^xsd:string
620 - sp:varName "created"^^xsd:string ;
621 ] ; 480 ] ;
622 sp:predicate <http://purl.org/dc/terms/created> ; 481 sp:predicate <http://purl.org/dc/terms/created> ;
623 - sp:subject [ 482 + sp:subject
624 - sp:varName "report"^^xsd:string ; 483 + [ sp:varName "report"^^xsd:string
625 - ] ;
626 ] 484 ]
627 - [ 485 + ] [ sp:object
628 - sp:object [ 486 + [ sp:varName "id"^^xsd:string
629 - sp:varName "id"^^xsd:string ;
630 ] ; 487 ] ;
631 sp:predicate <http://rdfs.org/sioc/ns#id> ; 488 sp:predicate <http://rdfs.org/sioc/ns#id> ;
632 - sp:subject [ 489 + sp:subject
633 - sp:varName "report"^^xsd:string ; 490 + [ sp:varName "report"^^xsd:string
634 - ] ;
635 ] 491 ]
636 - ) ; 492 + ])
637 ] ; 493 ] ;
638 - spin:constraint [ 494 + spin:constraint
639 - rdf:type spl:Argument ; 495 + [ rdf:type spl:Argument ;
640 - spl:predicate arg:fieldName ;
641 - spl:valueType xsd:string ;
642 rdfs:comment "The field name."^^xsd:string ; 496 rdfs:comment "The field name."^^xsd:string ;
497 + spl:predicate arg:fieldName ;
498 + spl:valueType xsd:string
643 ] ; 499 ] ;
644 - spin:constraint [ 500 + spin:constraint
645 - rdf:type spl:Argument ; 501 + [ rdf:type spl:Argument ;
646 - spl:predicate arg:month ;
647 - spl:valueType xsd:string ;
648 rdfs:comment "The month, e.g. \"2011-04\""^^xsd:string ; 502 rdfs:comment "The month, e.g. \"2011-04\""^^xsd:string ;
503 + spl:predicate arg:month ;
504 + spl:valueType xsd:string
649 ] ; 505 ] ;
650 - spin:constraint [ 506 + spin:constraint
651 - rdf:type spl:Argument ; 507 + [ rdf:type spl:Argument ;
652 - spl:predicate arg:parts ;
653 - spl:valueType xsd:string ;
654 rdfs:comment "The parts value that the report must have (at report:containsParts)."^^xsd:string ; 508 rdfs:comment "The parts value that the report must have (at report:containsParts)."^^xsd:string ;
509 + spl:predicate arg:parts ;
510 + spl:valueType xsd:string
655 ] ; 511 ] ;
656 - spin:returnType xsd:string ; 512 + spin:returnType xsd:string .
513 +
514 +reportspin:idOfMPRPByFieldMonth
515 + rdf:type spin:Function ;
657 rdfs:label "id of MPRG by field, month and parts"^^xsd:string ; 516 rdfs:label "id of MPRG by field, month and parts"^^xsd:string ;
658 rdfs:subClassOf spin:Functions ; 517 rdfs:subClassOf spin:Functions ;
659 -. 518 + spin:body
660 -reportspin:idsOfMPRGsByFieldAndMonth 519 + [ rdf:type sp:Select ;
661 - rdf:type spin:MagicProperty ; 520 + sp:limit "1"^^xsd:long ;
662 - spin:body [ 521 + sp:orderBy ([ rdf:type sp:Desc ;
663 - rdf:type sp:Select ; 522 + sp:expression
664 - sp:resultVariables ( 523 + [ sp:varName "created"^^xsd:string
665 - [
666 - sp:varName "id"^^xsd:string ;
667 - ]
668 - ) ;
669 - sp:where (
670 - [
671 - rdf:type sp:SubQuery ;
672 - sp:query [
673 - rdf:type sp:Select ;
674 - sp:distinct "true"^^xsd:boolean ;
675 - sp:resultVariables (
676 - [
677 - sp:varName "parts"^^xsd:string ;
678 ] 524 ]
679 - ) ; 525 + ]) ;
680 - sp:where ( 526 + sp:resultVariables ([ sp:varName "id"^^xsd:string
681 - [ 527 + ]) ;
682 - sp:object [ 528 + sp:where ([ sp:object
683 - sp:varName "fieldName"^^xsd:string ; 529 + [ sp:varName "fieldName"^^xsd:string
684 ] ; 530 ] ;
685 sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ; 531 sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ;
686 - sp:subject [ 532 + sp:subject
687 - sp:varName "report"^^xsd:string ; 533 + [ sp:varName "report"^^xsd:string
688 - ] ;
689 ] 534 ]
690 - [ 535 + ] [ sp:object
691 - sp:object [ 536 + [ sp:varName "month"^^xsd:string
692 - sp:varName "month"^^xsd:string ;
693 ] ; 537 ] ;
694 sp:predicate <http://www.reportinghub.no/system/schema/reporting#month> ; 538 sp:predicate <http://www.reportinghub.no/system/schema/reporting#month> ;
695 - sp:subject [ 539 + sp:subject
696 - sp:varName "report"^^xsd:string ; 540 + [ sp:varName "report"^^xsd:string
697 - ] ;
698 ] 541 ]
699 - [ 542 + ] [ sp:object
700 - sp:object [ 543 + [ sp:varName "created"^^xsd:string
701 - sp:varName "parts"^^xsd:string ;
702 ] ; 544 ] ;
703 - sp:predicate <http://www.reportinghub.no/system/schema/reporting#containsParts> ; 545 + sp:predicate <http://purl.org/dc/terms/created> ;
704 - sp:subject [ 546 + sp:subject
705 - sp:varName "report"^^xsd:string ; 547 + [ sp:varName "report"^^xsd:string
548 + ]
549 + ] [ sp:object
550 + [ sp:varName "id"^^xsd:string
706 ] ; 551 ] ;
552 + sp:predicate <http://rdfs.org/sioc/ns#id> ;
553 + sp:subject
554 + [ sp:varName "report"^^xsd:string
707 ] 555 ]
708 - ) ; 556 + ])
557 + ] ;
558 + spin:constraint
559 + [ rdf:type spl:Argument ;
560 + rdfs:comment "The field name."^^xsd:string ;
561 + spl:predicate arg:fieldName ;
562 + spl:valueType xsd:string
563 + ] ;
564 + spin:constraint
565 + [ rdf:type spl:Argument ;
566 + rdfs:comment "The month, e.g. \"2011-04\""^^xsd:string ;
567 + spl:predicate arg:month ;
568 + spl:valueType xsd:string
569 + ] ;
570 + spin:returnType xsd:string .
571 +
572 +reportspin:idsOfMPRGsByFieldAndMonth
573 + rdf:type spin:MagicProperty ;
574 + rdfs:comment "Gets the ids of all MPRGs for a given field/month combination, iterating through all used parts combinations."^^xsd:string ;
575 + rdfs:label "ids of MPRGs by field and month"^^xsd:string ;
576 + rdfs:subClassOf spin:MagicProperties ;
577 + spin:body
578 + [ rdf:type sp:Select ;
579 + sp:resultVariables ([ sp:varName "id"^^xsd:string
580 + ]) ;
581 + sp:where ([ rdf:type sp:SubQuery ;
582 + sp:query
583 + [ rdf:type sp:Select ;
584 + sp:distinct "true"^^xsd:boolean ;
585 + sp:resultVariables ([ sp:varName "parts"^^xsd:string
586 + ]) ;
587 + sp:where ([ sp:object
588 + [ sp:varName "fieldName"^^xsd:string
709 ] ; 589 ] ;
590 + sp:predicate <http://www.reportinghub.no/system/schema/reporting#fieldName> ;
591 + sp:subject
592 + [ sp:varName "report"^^xsd:string
710 ] 593 ]
711 - [ 594 + ] [ sp:object
712 - rdf:type sp:Bind ; 595 + [ sp:varName "month"^^xsd:string
713 - sp:expression [
714 - rdf:type reportspin:idOfMPRGByFieldMonthAndParts ;
715 - arg:fieldName [
716 - sp:varName "fieldName"^^xsd:string ;
717 ] ; 596 ] ;
718 - arg:month [ 597 + sp:predicate <http://www.reportinghub.no/system/schema/reporting#month> ;
719 - sp:varName "month"^^xsd:string ; 598 + sp:subject
599 + [ sp:varName "report"^^xsd:string
600 + ]
601 + ] [ sp:object
602 + [ sp:varName "parts"^^xsd:string
720 ] ; 603 ] ;
721 - arg:parts [ 604 + sp:predicate <http://www.reportinghub.no/system/schema/reporting#containsParts> ;
722 - sp:varName "parts"^^xsd:string ; 605 + sp:subject
606 + [ sp:varName "report"^^xsd:string
607 + ]
608 + ])
609 + ]
610 + ] [ rdf:type sp:Bind ;
611 + sp:expression
612 + [ rdf:type reportspin:idOfMPRPByFieldMonth ;
613 + arg:fieldName
614 + [ sp:varName "fieldName"^^xsd:string
723 ] ; 615 ] ;
616 + arg:month
617 + [ sp:varName "month"^^xsd:string
724 ] ; 618 ] ;
725 - sp:variable [ 619 + arg:parts
726 - sp:varName "id"^^xsd:string ; 620 + [ sp:varName "parts"^^xsd:string
621 + ]
727 ] ; 622 ] ;
623 + sp:variable
624 + [ sp:varName "id"^^xsd:string
728 ] 625 ]
729 - ) ; 626 + ])
730 ] ; 627 ] ;
731 - spin:constraint [ 628 + spin:constraint
732 - rdf:type spl:Argument ; 629 + [ rdf:type spl:Argument ;
733 - spl:predicate arg:fieldName ;
734 - spl:valueType xsd:string ;
735 rdfs:comment "The field name."^^xsd:string ; 630 rdfs:comment "The field name."^^xsd:string ;
631 + spl:predicate arg:fieldName ;
632 + spl:valueType xsd:string
736 ] ; 633 ] ;
737 - spin:constraint [ 634 + spin:constraint
738 - rdf:type spl:Argument ; 635 + [ rdf:type spl:Argument ;
739 - spl:predicate arg:month ;
740 - spl:valueType xsd:string ;
741 rdfs:comment "The month, e.g. \"2011-04\""^^xsd:string ; 636 rdfs:comment "The month, e.g. \"2011-04\""^^xsd:string ;
742 - ] ; 637 + spl:predicate arg:month ;
743 - rdfs:comment "Gets the ids of all MPRGs for a given field/month combination, iterating through all used parts combinations."^^xsd:string ; 638 + spl:valueType xsd:string
744 - rdfs:label "ids of MPRGs by field and month"^^xsd:string ; 639 + ] .
745 - rdfs:subClassOf spin:MagicProperties ; 640 +
746 -.
747 reportspin:isPreliminaryById 641 reportspin:isPreliminaryById
748 rdf:type spin:Function ; 642 rdf:type spin:Function ;
749 - spin:body [ 643 + rdfs:label "is preliminary by id"^^xsd:string ;
750 - rdf:type sp:Select ; 644 + rdfs:subClassOf spin:Functions ;
751 - sp:resultVariables ( 645 + spin:body
752 - [ 646 + [ rdf:type sp:Select ;
753 - sp:varName "result"^^xsd:string ; 647 + sp:resultVariables ([ sp:varName "result"^^xsd:string
754 - ] 648 + ]) ;
755 - ) ; 649 + sp:where ([ sp:object
756 - sp:where ( 650 + [ sp:varName "id"^^xsd:string
757 - [
758 - sp:object [
759 - sp:varName "id"^^xsd:string ;
760 ] ; 651 ] ;
761 sp:predicate <http://rdfs.org/sioc/ns#id> ; 652 sp:predicate <http://rdfs.org/sioc/ns#id> ;
762 - sp:subject [ 653 + sp:subject
763 - sp:varName "report"^^xsd:string ; 654 + [ sp:varName "report"^^xsd:string
764 - ] ;
765 ] 655 ]
766 - [ 656 + ] [ sp:object
767 - sp:object [ 657 + [ sp:varName "result"^^xsd:string
768 - sp:varName "result"^^xsd:string ;
769 ] ; 658 ] ;
770 sp:predicate <http://www.reportinghub.no/system/schema/reporting#preliminary> ; 659 sp:predicate <http://www.reportinghub.no/system/schema/reporting#preliminary> ;
771 - sp:subject [ 660 + sp:subject
772 - sp:varName "report"^^xsd:string ; 661 + [ sp:varName "report"^^xsd:string
773 - ] ;
774 ] 662 ]
775 - ) ; 663 + ])
776 ] ; 664 ] ;
777 - spin:constraint [ 665 + spin:constraint
778 - rdf:type spl:Argument ; 666 + [ rdf:type spl:Argument ;
779 - spl:predicate arg:id ;
780 - spl:valueType xsd:string ;
781 rdfs:comment "The of the report to check."^^xsd:string ; 667 rdfs:comment "The of the report to check."^^xsd:string ;
668 + spl:predicate arg:id ;
669 + spl:valueType xsd:string
782 ] ; 670 ] ;
783 - spin:returnType xsd:boolean ; 671 + spin:returnType xsd:boolean .
784 - rdfs:label "is preliminary by id"^^xsd:string ;
785 - rdfs:subClassOf spin:Functions ;
786 -.
......