David Leal

DPR2 date bug fixed

...@@ -13,9 +13,21 @@ ...@@ -13,9 +13,21 @@
13 13
14 <http://www.reportinghub.no/ep/schema/1.0/report> 14 <http://www.reportinghub.no/ep/schema/1.0/report>
15 rdf:type owl:Ontology ; 15 rdf:type owl:Ontology ;
16 - owl:imports <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/np/schema/1.0/npd> ; 16 + owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> ;
17 owl:versionInfo "0.1.0"^^xsd:string . 17 owl:versionInfo "0.1.0"^^xsd:string .
18 18
19 +<http://www.reportinghub.no/ep/schema/activity#existsThroughout>
20 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
21 + rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
22 + rdfs:label "exists throughout"^^xsd:string ;
23 + rdfs:range xsd:dateTime .
24 +
25 +<http://www.reportinghub.no/ep/schema/activity#existsWithin>
26 + rdf:type owl:DatatypeProperty ;
27 + rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
28 + rdfs:label "exists within"^^xsd:string ;
29 + rdfs:range xsd:dateTime .
30 +
19 ep-report:DailyDrillingReport 31 ep-report:DailyDrillingReport
20 rdf:type owl:Class ; 32 rdf:type owl:Class ;
21 rdfs:label "daily drilling report"^^xsd:string ; 33 rdfs:label "daily drilling report"^^xsd:string ;
...@@ -31,7 +43,7 @@ ep-report:DailyProductionReport ...@@ -31,7 +43,7 @@ ep-report:DailyProductionReport
31 rdfs:subClassOf ep-report:ProductionReport . 43 rdfs:subClassOf ep-report:ProductionReport .
32 44
33 ep-report:FinalDailyDrillingReport 45 ep-report:FinalDailyDrillingReport
34 - rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ; 46 + rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
35 rdfs:label "final daily drilling report"^^xsd:string ; 47 rdfs:label "final daily drilling report"^^xsd:string ;
36 rdfs:subClassOf ep-report:DailyDrillingReport . 48 rdfs:subClassOf ep-report:DailyDrillingReport .
37 49
...@@ -50,8 +62,13 @@ ep-report:NonProductivetimeReport ...@@ -50,8 +62,13 @@ ep-report:NonProductivetimeReport
50 rdfs:subClassOf ep-report:Report ; 62 rdfs:subClassOf ep-report:Report ;
51 rdfs:subClassOf 63 rdfs:subClassOf
52 [ rdf:type owl:Restriction ; 64 [ rdf:type owl:Restriction ;
65 + owl:allValuesFrom xsd:dateTime ;
66 + owl:onProperty ep-report:createdAt
67 + ] ;
68 + rdfs:subClassOf
69 + [ rdf:type owl:Restriction ;
53 owl:cardinality "1"^^xsd:nonNegativeInteger ; 70 owl:cardinality "1"^^xsd:nonNegativeInteger ;
54 - owl:onProperty ep-report:reportOn 71 + owl:onProperty ep-report:createdAt
55 ] ; 72 ] ;
56 rdfs:subClassOf 73 rdfs:subClassOf
57 [ rdf:type owl:Restriction ; 74 [ rdf:type owl:Restriction ;
...@@ -61,21 +78,16 @@ ep-report:NonProductivetimeReport ...@@ -61,21 +78,16 @@ ep-report:NonProductivetimeReport
61 rdfs:subClassOf 78 rdfs:subClassOf
62 [ rdf:type owl:Restriction ; 79 [ rdf:type owl:Restriction ;
63 owl:cardinality "1"^^xsd:nonNegativeInteger ; 80 owl:cardinality "1"^^xsd:nonNegativeInteger ;
64 - owl:onProperty ep-report:createdAt 81 + owl:onProperty ep-report:reportOn
65 - ] ;
66 - rdfs:subClassOf
67 - [ rdf:type owl:Restriction ;
68 - owl:allValuesFrom xsd:dateTime ;
69 - owl:onProperty ep-report:createdAt
70 ] . 82 ] .
71 83
72 ep-report:NormalDailyDrillingReport 84 ep-report:NormalDailyDrillingReport
73 - rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ; 85 + rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
74 rdfs:label "normal daily drilling report"^^xsd:string ; 86 rdfs:label "normal daily drilling report"^^xsd:string ;
75 rdfs:subClassOf ep-report:DailyDrillingReport . 87 rdfs:subClassOf ep-report:DailyDrillingReport .
76 88
77 ep-report:PreliminaryDailyDrillingReport 89 ep-report:PreliminaryDailyDrillingReport
78 - rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ; 90 + rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
79 rdfs:label "preliminary daily drilling report"^^xsd:string ; 91 rdfs:label "preliminary daily drilling report"^^xsd:string ;
80 rdfs:subClassOf ep-report:DailyDrillingReport . 92 rdfs:subClassOf ep-report:DailyDrillingReport .
81 93
...@@ -119,8 +131,8 @@ ep-report:ReportAliasIdentifier ...@@ -119,8 +131,8 @@ ep-report:ReportAliasIdentifier
119 rdfs:subClassOf owl:Thing ; 131 rdfs:subClassOf owl:Thing ;
120 rdfs:subClassOf 132 rdfs:subClassOf
121 [ rdf:type owl:Restriction ; 133 [ rdf:type owl:Restriction ;
122 - owl:cardinality "1"^^xsd:nonNegativeInteger ; 134 + owl:minCardinality "1"^^xsd:nonNegativeInteger ;
123 - owl:onProperty ep-report:isAliasFor 135 + owl:onProperty ep-report:aliasName
124 ] ; 136 ] ;
125 rdfs:subClassOf 137 rdfs:subClassOf
126 [ rdf:type owl:Restriction ; 138 [ rdf:type owl:Restriction ;
...@@ -129,62 +141,62 @@ ep-report:ReportAliasIdentifier ...@@ -129,62 +141,62 @@ ep-report:ReportAliasIdentifier
129 ] ; 141 ] ;
130 rdfs:subClassOf 142 rdfs:subClassOf
131 [ rdf:type owl:Restriction ; 143 [ rdf:type owl:Restriction ;
132 - owl:minCardinality "1"^^xsd:nonNegativeInteger ; 144 + owl:cardinality "1"^^xsd:nonNegativeInteger ;
133 - owl:onProperty ep-report:aliasName 145 + owl:onProperty ep-report:isAliasFor
134 ] . 146 ] .
135 147
136 ep-report:ReportForGasYearToDate 148 ep-report:ReportForGasYearToDate
137 - rdf:type ep-report:ReportPeriodType , owl:Class ; 149 + rdf:type owl:Class , ep-report:ReportPeriodType ;
138 rdfs:label "report for gas year to date"^^xsd:string ; 150 rdfs:label "report for gas year to date"^^xsd:string ;
139 rdfs:subClassOf ep-report:Report . 151 rdfs:subClassOf ep-report:Report .
140 152
141 ep-report:ReportForInstant 153 ep-report:ReportForInstant
142 - rdf:type ep-report:ReportPeriodType , owl:Class ; 154 + rdf:type owl:Class , ep-report:ReportPeriodType ;
143 rdfs:label "report for instant"^^xsd:string ; 155 rdfs:label "report for instant"^^xsd:string ;
144 rdfs:subClassOf ep-report:Report . 156 rdfs:subClassOf ep-report:Report .
145 157
146 ep-report:ReportForMonthToDate 158 ep-report:ReportForMonthToDate
147 - rdf:type ep-report:ReportPeriodType , owl:Class ; 159 + rdf:type owl:Class , ep-report:ReportPeriodType ;
148 rdfs:label "report for month to date"^^xsd:string ; 160 rdfs:label "report for month to date"^^xsd:string ;
149 rdfs:subClassOf ep-report:Report . 161 rdfs:subClassOf ep-report:Report .
150 162
151 ep-report:ReportForOneDay 163 ep-report:ReportForOneDay
152 - rdf:type ep-report:ReportPeriodType , owl:Class ; 164 + rdf:type owl:Class , ep-report:ReportPeriodType ;
153 rdfs:label "report for one day"^^xsd:string ; 165 rdfs:label "report for one day"^^xsd:string ;
154 rdfs:subClassOf ep-report:Report . 166 rdfs:subClassOf ep-report:Report .
155 167
156 ep-report:ReportForOneGasDay 168 ep-report:ReportForOneGasDay
157 - rdf:type ep-report:ReportPeriodType , owl:Class ; 169 + rdf:type owl:Class , ep-report:ReportPeriodType ;
158 rdfs:label "report for one gas day"^^xsd:string ; 170 rdfs:label "report for one gas day"^^xsd:string ;
159 rdfs:subClassOf ep-report:Report . 171 rdfs:subClassOf ep-report:Report .
160 172
161 ep-report:ReportForOneGasMonth 173 ep-report:ReportForOneGasMonth
162 - rdf:type ep-report:ReportPeriodType , owl:Class ; 174 + rdf:type owl:Class , ep-report:ReportPeriodType ;
163 rdfs:label "report for one gas month"^^xsd:string ; 175 rdfs:label "report for one gas month"^^xsd:string ;
164 rdfs:subClassOf ep-report:Report . 176 rdfs:subClassOf ep-report:Report .
165 177
166 ep-report:ReportForOneGasYear 178 ep-report:ReportForOneGasYear
167 - rdf:type ep-report:ReportPeriodType , owl:Class ; 179 + rdf:type owl:Class , ep-report:ReportPeriodType ;
168 rdfs:label "report for one gas year"^^xsd:string ; 180 rdfs:label "report for one gas year"^^xsd:string ;
169 rdfs:subClassOf ep-report:Report . 181 rdfs:subClassOf ep-report:Report .
170 182
171 ep-report:ReportForOneMonth 183 ep-report:ReportForOneMonth
172 - rdf:type ep-report:ReportPeriodType , owl:Class ; 184 + rdf:type owl:Class , ep-report:ReportPeriodType ;
173 rdfs:label "report for one month"^^xsd:string ; 185 rdfs:label "report for one month"^^xsd:string ;
174 rdfs:subClassOf ep-report:Report . 186 rdfs:subClassOf ep-report:Report .
175 187
176 ep-report:ReportForOneWeek 188 ep-report:ReportForOneWeek
177 - rdf:type ep-report:ReportPeriodType , owl:Class ; 189 + rdf:type owl:Class , ep-report:ReportPeriodType ;
178 rdfs:label "report for one week"^^xsd:string ; 190 rdfs:label "report for one week"^^xsd:string ;
179 rdfs:subClassOf ep-report:Report . 191 rdfs:subClassOf ep-report:Report .
180 192
181 ep-report:ReportForOneYear 193 ep-report:ReportForOneYear
182 - rdf:type ep-report:ReportPeriodType , owl:Class ; 194 + rdf:type owl:Class , ep-report:ReportPeriodType ;
183 rdfs:label "report for one year"^^xsd:string ; 195 rdfs:label "report for one year"^^xsd:string ;
184 rdfs:subClassOf ep-report:Report . 196 rdfs:subClassOf ep-report:Report .
185 197
186 ep-report:ReportForYearToDate 198 ep-report:ReportForYearToDate
187 - rdf:type owl:Class , ep-report:ReportPeriodType ; 199 + rdf:type ep-report:ReportPeriodType , owl:Class ;
188 rdfs:label "report for year to date"^^xsd:string ; 200 rdfs:label "report for year to date"^^xsd:string ;
189 rdfs:subClassOf ep-report:Report . 201 rdfs:subClassOf ep-report:Report .
190 202
...@@ -198,23 +210,23 @@ ep-report:WeeklyDrillingReport ...@@ -198,23 +210,23 @@ ep-report:WeeklyDrillingReport
198 rdfs:subClassOf ep-report:Report ; 210 rdfs:subClassOf ep-report:Report ;
199 rdfs:subClassOf 211 rdfs:subClassOf
200 [ rdf:type owl:Restriction ; 212 [ rdf:type owl:Restriction ;
201 - owl:cardinality "1"^^xsd:nonNegativeInteger ; 213 + owl:allValuesFrom ep-report:DailyDrillingReport ;
202 - owl:onProperty ep-report:createdAt 214 + owl:onProperty ep-report:reportOn
203 ] ; 215 ] ;
204 rdfs:subClassOf 216 rdfs:subClassOf
205 [ rdf:type owl:Restriction ; 217 [ rdf:type owl:Restriction ;
206 - owl:allValuesFrom xsd:dateTime ; 218 + owl:cardinality "7"^^xsd:nonNegativeInteger ;
207 - owl:onProperty ep-report:createdAt 219 + owl:onProperty ep-report:reportOn
208 ] ; 220 ] ;
209 rdfs:subClassOf 221 rdfs:subClassOf
210 [ rdf:type owl:Restriction ; 222 [ rdf:type owl:Restriction ;
211 - owl:cardinality "7"^^xsd:nonNegativeInteger ; 223 + owl:allValuesFrom xsd:dateTime ;
212 - owl:onProperty ep-report:reportOn 224 + owl:onProperty ep-report:createdAt
213 ] ; 225 ] ;
214 rdfs:subClassOf 226 rdfs:subClassOf
215 [ rdf:type owl:Restriction ; 227 [ rdf:type owl:Restriction ;
216 - owl:allValuesFrom ep-report:DailyDrillingReport ; 228 + owl:cardinality "1"^^xsd:nonNegativeInteger ;
217 - owl:onProperty ep-report:reportOn 229 + owl:onProperty ep-report:createdAt
218 ] . 230 ] .
219 231
220 ep-report:WellTestReport 232 ep-report:WellTestReport
...@@ -231,12 +243,12 @@ ep-report:aliasOwner ...@@ -231,12 +243,12 @@ ep-report:aliasOwner
231 rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> . 243 rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> .
232 244
233 ep-report:createdAt 245 ep-report:createdAt
234 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty ; 246 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
235 rdfs:domain ep-report:Report ; 247 rdfs:domain ep-report:Report ;
236 rdfs:label "created at"^^xsd:string . 248 rdfs:label "created at"^^xsd:string .
237 249
238 ep-report:dailyDrillingReportNumber 250 ep-report:dailyDrillingReportNumber
239 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty ; 251 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
240 rdfs:domain ep-report:DailyDrillingReport ; 252 rdfs:domain ep-report:DailyDrillingReport ;
241 rdfs:label "daily drilling report number"^^xsd:string . 253 rdfs:label "daily drilling report number"^^xsd:string .
242 254
...@@ -261,7 +273,7 @@ ep-report:disclaimer ...@@ -261,7 +273,7 @@ ep-report:disclaimer
261 rdfs:range xsd:string . 273 rdfs:range xsd:string .
262 274
263 ep-report:hasContent 275 ep-report:hasContent
264 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty ; 276 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
265 rdfs:domain ep-report:Report ; 277 rdfs:domain ep-report:Report ;
266 rdfs:label "has content"^^xsd:string . 278 rdfs:label "has content"^^xsd:string .
267 279
...@@ -270,12 +282,12 @@ ep-report:isAliasFor ...@@ -270,12 +282,12 @@ ep-report:isAliasFor
270 rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> . 282 rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> .
271 283
272 ep-report:issuedAt 284 ep-report:issuedAt
273 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty ; 285 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
274 rdfs:domain ep-report:Report ; 286 rdfs:domain ep-report:Report ;
275 rdfs:label "issued at"^^xsd:string . 287 rdfs:label "issued at"^^xsd:string .
276 288
277 ep-report:nameAsDatumObject 289 ep-report:nameAsDatumObject
278 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty ; 290 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
279 rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ; 291 rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
280 rdfs:label "name as datum object"^^xsd:string . 292 rdfs:label "name as datum object"^^xsd:string .
281 293
...@@ -285,13 +297,13 @@ ep-report:reportOn ...@@ -285,13 +297,13 @@ ep-report:reportOn
285 rdfs:label "report on"^^xsd:string . 297 rdfs:label "report on"^^xsd:string .
286 298
287 ep-report:reportSubmittedBy 299 ep-report:reportSubmittedBy
288 - rdf:type owl:FunctionalProperty , owl:ObjectProperty ; 300 + rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
289 rdfs:domain ep-report:Report ; 301 rdfs:domain ep-report:Report ;
290 rdfs:label "report submitted by"^^xsd:string ; 302 rdfs:label "report submitted by"^^xsd:string ;
291 rdfs:range <http://www.reportinghub.no/ep/schema/core#PhysicalObject> . 303 rdfs:range <http://www.reportinghub.no/ep/schema/core#PhysicalObject> .
292 304
293 ep-report:reportSubmittedFrom 305 ep-report:reportSubmittedFrom
294 - rdf:type owl:ObjectProperty , owl:FunctionalProperty ; 306 + rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
295 rdfs:domain ep-report:Report ; 307 rdfs:domain ep-report:Report ;
296 rdfs:label "report submitted from"^^xsd:string ; 308 rdfs:label "report submitted from"^^xsd:string ;
297 rdfs:range <http://www.reportinghub.no/ep/schema/facility#Facility> . 309 rdfs:range <http://www.reportinghub.no/ep/schema/facility#Facility> .
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 20
21 <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> 21 <http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
22 rdf:type owl:Ontology ; 22 rdf:type owl:Ontology ;
23 - owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production> ; 23 + owl:imports <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://spinrdf.org/spin> ;
24 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 24 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
25 25
26 ep-mpr-spin-lib:Function 26 ep-mpr-spin-lib:Function
...@@ -38,10 +38,17 @@ arg2 is the report end date"""^^xsd:string ; ...@@ -38,10 +38,17 @@ arg2 is the report end date"""^^xsd:string ;
38 ]) ; 38 ]) ;
39 sp:where ([ rdf:type sp:Bind ; 39 sp:where ([ rdf:type sp:Bind ;
40 sp:expression 40 sp:expression
41 - [ rdf:type fn:concat ; 41 + [ rdf:type sp:if ;
42 + sp:arg1 [ rdf:type sp:eq ;
43 + sp:arg1 spin:_arg1 ;
44 + sp:arg2 spin:_arg2
45 + ] ;
46 + sp:arg2 spin:_arg1 ;
47 + sp:arg3 [ rdf:type fn:concat ;
42 sp:arg1 spin:_arg1 ; 48 sp:arg1 spin:_arg1 ;
43 sp:arg2 "$" ; 49 sp:arg2 "$" ;
44 sp:arg3 spin:_arg2 50 sp:arg3 spin:_arg2
51 + ]
45 ] ; 52 ] ;
46 sp:variable 53 sp:variable
47 [ sp:varName "intervalIdentifier"^^xsd:string 54 [ sp:varName "intervalIdentifier"^^xsd:string
......