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