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