Holger Knublauch

Support for DDR Overview page

...@@ -21,32 +21,32 @@ sioc:id ...@@ -21,32 +21,32 @@ sioc:id
21 owl:versionInfo "0.2.0"^^xsd:string . 21 owl:versionInfo "0.2.0"^^xsd:string .
22 22
23 report:AbstractDR 23 report:AbstractDR
24 - rdf:type rdfs:Class ; 24 + rdf:type owl:Class ;
25 rdfs:comment "Abstract base class for various types of daily reports."^^xsd:string ; 25 rdfs:comment "Abstract base class for various types of daily reports."^^xsd:string ;
26 rdfs:subClassOf foaf:Document ; 26 rdfs:subClassOf foaf:Document ;
27 rdfs:subClassOf 27 rdfs:subClassOf
28 [ rdf:type owl:Restriction ; 28 [ rdf:type owl:Restriction ;
29 - owl:cardinality "1"^^xsd:nonNegativeInteger ; 29 + owl:allValuesFrom xsd:string ;
30 owl:onProperty sioc:id 30 owl:onProperty sioc:id
31 ] ; 31 ] ;
32 rdfs:subClassOf 32 rdfs:subClassOf
33 [ rdf:type owl:Restriction ; 33 [ rdf:type owl:Restriction ;
34 owl:cardinality "1"^^xsd:nonNegativeInteger ; 34 owl:cardinality "1"^^xsd:nonNegativeInteger ;
35 - owl:onProperty <http://purl.org/dc/terms/created> 35 + owl:onProperty <http://purl.org/dc/terms/date>
36 ] ; 36 ] ;
37 rdfs:subClassOf 37 rdfs:subClassOf
38 [ rdf:type owl:Restriction ; 38 [ rdf:type owl:Restriction ;
39 owl:cardinality "1"^^xsd:nonNegativeInteger ; 39 owl:cardinality "1"^^xsd:nonNegativeInteger ;
40 - owl:onProperty <http://purl.org/dc/terms/date> 40 + owl:onProperty <http://purl.org/dc/terms/created>
41 ] ; 41 ] ;
42 rdfs:subClassOf 42 rdfs:subClassOf
43 [ rdf:type owl:Restriction ; 43 [ rdf:type owl:Restriction ;
44 - owl:allValuesFrom xsd:string ; 44 + owl:cardinality "1"^^xsd:nonNegativeInteger ;
45 owl:onProperty sioc:id 45 owl:onProperty sioc:id
46 ] . 46 ] .
47 47
48 report:DDR 48 report:DDR
49 - rdf:type rdfs:Class ; 49 + rdf:type owl:Class ;
50 rdfs:comment "The metadata about a Daily Drilling Report."^^xsd:string ; 50 rdfs:comment "The metadata about a Daily Drilling Report."^^xsd:string ;
51 rdfs:label "DDR"^^xsd:string ; 51 rdfs:label "DDR"^^xsd:string ;
52 rdfs:subClassOf report:AbstractDR ; 52 rdfs:subClassOf report:AbstractDR ;
...@@ -54,10 +54,15 @@ report:DDR ...@@ -54,10 +54,15 @@ report:DDR
54 [ rdf:type owl:Restriction ; 54 [ rdf:type owl:Restriction ;
55 owl:cardinality "1"^^xsd:nonNegativeInteger ; 55 owl:cardinality "1"^^xsd:nonNegativeInteger ;
56 owl:onProperty report:wellBoreId 56 owl:onProperty report:wellBoreId
57 + ] ;
58 + rdfs:subClassOf
59 + [ rdf:type owl:Restriction ;
60 + owl:cardinality "1"^^xsd:nonNegativeInteger ;
61 + owl:onProperty report:xml
57 ] . 62 ] .
58 63
59 report:DPR 64 report:DPR
60 - rdf:type rdfs:Class ; 65 + rdf:type owl:Class ;
61 rdfs:comment "The metadata about a Daily Production Report."^^xsd:string ; 66 rdfs:comment "The metadata about a Daily Production Report."^^xsd:string ;
62 rdfs:label "DPR"^^xsd:string ; 67 rdfs:label "DPR"^^xsd:string ;
63 rdfs:subClassOf report:AbstractDR ; 68 rdfs:subClassOf report:AbstractDR ;
...@@ -76,12 +81,18 @@ report:HTMLFormat ...@@ -76,12 +81,18 @@ report:HTMLFormat
76 rdf:type report:Format ; 81 rdf:type report:Format ;
77 rdfs:label "HTMLFormat"^^xsd:string . 82 rdfs:label "HTMLFormat"^^xsd:string .
78 83
84 +report:NPTR
85 + rdf:type owl:Class ;
86 + rdfs:comment "Metadata about a Non-Productive Time Report."^^xsd:string ;
87 + rdfs:label "NPTR"^^xsd:string ;
88 + rdfs:subClassOf foaf:Document .
89 +
79 report:PDFFormat 90 report:PDFFormat
80 rdf:type report:Format ; 91 rdf:type report:Format ;
81 rdfs:label "PDFFormat"^^xsd:string . 92 rdfs:label "PDFFormat"^^xsd:string .
82 93
83 report:WDR 94 report:WDR
84 - rdf:type rdfs:Class ; 95 + rdf:type owl:Class ;
85 rdfs:comment "Metadata about a Weekly Drilling Report"^^xsd:string ; 96 rdfs:comment "Metadata about a Weekly Drilling Report"^^xsd:string ;
86 rdfs:label "WDR"^^xsd:string ; 97 rdfs:label "WDR"^^xsd:string ;
87 rdfs:subClassOf foaf:Document . 98 rdfs:subClassOf foaf:Document .
...@@ -107,6 +118,12 @@ report:wellBoreId ...@@ -107,6 +118,12 @@ report:wellBoreId
107 rdf:type owl:DatatypeProperty ; 118 rdf:type owl:DatatypeProperty ;
108 rdfs:label "well bore id"^^xsd:string . 119 rdfs:label "well bore id"^^xsd:string .
109 120
121 +report:xml
122 + rdf:type owl:DatatypeProperty ;
123 + rdfs:comment "The XML code of a report."^^xsd:string ;
124 + rdfs:label "xml"^^xsd:string ;
125 + rdfs:range xsd:string .
126 +
110 foaf:Document 127 foaf:Document
111 rdf:type rdfs:Class ; 128 rdf:type rdfs:Class ;
112 rdfs:label "Document"^^xsd:string . 129 rdfs:label "Document"^^xsd:string .
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
7 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 7 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
8 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 8 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
9 @prefix reportspin: <http://www.reportinghub.no/system/spin/reporting#> . 9 @prefix reportspin: <http://www.reportinghub.no/system/spin/reporting#> .
10 +@prefix rhspin: <http://www.reportinghub.no/spin/rh#> .
10 @prefix sp: <http://spinrdf.org/sp#> . 11 @prefix sp: <http://spinrdf.org/sp#> .
11 @prefix spin: <http://spinrdf.org/spin#> . 12 @prefix spin: <http://spinrdf.org/spin#> .
12 @prefix spl: <http://spinrdf.org/spl#> . 13 @prefix spl: <http://spinrdf.org/spl#> .
...@@ -38,6 +39,70 @@ ...@@ -38,6 +39,70 @@
38 owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/system/schema/reporting> ; 39 owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/system/schema/reporting> ;
39 owl:versionInfo "0.1.0"^^xsd:string . 40 owl:versionInfo "0.1.0"^^xsd:string .
40 41
42 +reportspin:DDRsOverview
43 + rdf:type spin:SelectTemplate ;
44 + rdfs:label "DDRs overview"^^xsd:string ;
45 + rdfs:subClassOf spin:SelectTemplates ;
46 + spin:body
47 + [ rdf:type sp:Select ;
48 + sp:orderBy ([ sp:varName "wellBoreName"^^xsd:string
49 + ] [ sp:varName "date"^^xsd:string
50 + ] [ sp:varName "created"^^xsd:string
51 + ]) ;
52 + sp:resultVariables ([ sp:varName "wellBoreName"^^xsd:string
53 + ] [ sp:varName "date"^^xsd:string
54 + ] [ sp:varName "created"^^xsd:string
55 + ] [ sp:varName "id"^^xsd:string
56 + ]) ;
57 + sp:where ([ sp:object
58 + [ sp:varName "wellBoreId"^^xsd:string
59 + ] ;
60 + sp:predicate <http://www.reportinghub.no/system/schema/reporting#wellBoreId> ;
61 + sp:subject
62 + [ sp:varName "ddr"^^xsd:string
63 + ]
64 + ] [ sp:object
65 + [ sp:varName "created"^^xsd:string
66 + ] ;
67 + sp:predicate <http://purl.org/dc/terms/created> ;
68 + sp:subject
69 + [ sp:varName "ddr"^^xsd:string
70 + ]
71 + ] [ sp:object
72 + [ sp:varName "date"^^xsd:string
73 + ] ;
74 + sp:predicate <http://purl.org/dc/terms/date> ;
75 + sp:subject
76 + [ sp:varName "ddr"^^xsd:string
77 + ]
78 + ] [ sp:object
79 + [ sp:varName "id"^^xsd:string
80 + ] ;
81 + sp:predicate <http://rdfs.org/sioc/ns#id> ;
82 + sp:subject
83 + [ sp:varName "ddr"^^xsd:string
84 + ]
85 + ] [ rdf:type sp:Bind ;
86 + sp:expression
87 + [ rdf:type rhspin:wellBoreById ;
88 + sp:arg1 [ sp:varName "wellBoreId"^^xsd:string
89 + ]
90 + ] ;
91 + sp:variable
92 + [ sp:varName "wellBore"^^xsd:string
93 + ]
94 + ] [ rdf:type sp:Bind ;
95 + sp:expression
96 + [ rdf:type rhspin:npdName ;
97 + sp:arg1 [ sp:varName "wellBore"^^xsd:string
98 + ]
99 + ] ;
100 + sp:variable
101 + [ sp:varName "wellBoreName"^^xsd:string
102 + ]
103 + ])
104 + ] .
105 +
41 reportspin:graphByDDRId 106 reportspin:graphByDDRId
42 rdf:type spin:Function ; 107 rdf:type spin:Function ;
43 rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report:DDR (metadata) with a given id."^^xsd:string ; 108 rdfs:comment "Gets the URI of the named graph containing the triples submitted by a report:DDR (metadata) with a given id."^^xsd:string ;
...@@ -146,16 +211,16 @@ reportspin:idOfDDRByDateAndWellBoreId ...@@ -146,16 +211,16 @@ reportspin:idOfDDRByDateAndWellBoreId
146 ] ; 211 ] ;
147 spin:constraint 212 spin:constraint
148 [ rdf:type spl:Argument ; 213 [ rdf:type spl:Argument ;
149 - rdfs:comment "The id of the well bore."^^xsd:string ;
150 - spl:predicate <http://spinrdf.org/arg#wellBoreId> ;
151 - spl:valueType xsd:string
152 - ] ;
153 - spin:constraint
154 - [ rdf:type spl:Argument ;
155 rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ; 214 rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ;
156 spl:predicate <http://spinrdf.org/arg#date> ; 215 spl:predicate <http://spinrdf.org/arg#date> ;
157 spl:valueType xsd:date 216 spl:valueType xsd:date
158 ] ; 217 ] ;
218 + spin:constraint
219 + [ rdf:type spl:Argument ;
220 + rdfs:comment "The id of the well bore."^^xsd:string ;
221 + spl:predicate <http://spinrdf.org/arg#wellBoreId> ;
222 + spl:valueType xsd:string
223 + ] ;
159 spin:returnType xsd:string . 224 spin:returnType xsd:string .
160 225
161 reportspin:idOfDPRByDateAndOwner 226 reportspin:idOfDPRByDateAndOwner
...@@ -204,14 +269,14 @@ reportspin:idOfDPRByDateAndOwner ...@@ -204,14 +269,14 @@ reportspin:idOfDPRByDateAndOwner
204 ] ; 269 ] ;
205 spin:constraint 270 spin:constraint
206 [ rdf:type spl:Argument ; 271 [ rdf:type spl:Argument ;
207 - rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ;
208 - spl:predicate <http://spinrdf.org/arg#date> ;
209 - spl:valueType xsd:date
210 - ] ;
211 - spin:constraint
212 - [ rdf:type spl:Argument ;
213 rdfs:comment "The Licence or BAA."^^xsd:string ; 272 rdfs:comment "The Licence or BAA."^^xsd:string ;
214 spl:predicate <http://spinrdf.org/arg#owner> ; 273 spl:predicate <http://spinrdf.org/arg#owner> ;
215 spl:valueType <http://www.reportinghub.no/np/schema/npd#Owner> 274 spl:valueType <http://www.reportinghub.no/np/schema/npd#Owner>
216 ] ; 275 ] ;
276 + spin:constraint
277 + [ rdf:type spl:Argument ;
278 + rdfs:comment "The date of the DDR (not the submission date, but the start date of the report)."^^xsd:string ;
279 + spl:predicate <http://spinrdf.org/arg#date> ;
280 + spl:valueType xsd:date
281 + ] ;
217 spin:returnType xsd:string . 282 spin:returnType xsd:string .
......