Holger Knublauch

Fixed renaming issue with MPRG function

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