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