David Leal

DPR2 date bug fixed

......@@ -13,9 +13,21 @@
<http://www.reportinghub.no/ep/schema/1.0/report>
rdf:type owl:Ontology ;
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> ;
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> ;
owl:versionInfo "0.1.0"^^xsd:string .
<http://www.reportinghub.no/ep/schema/activity#existsThroughout>
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
rdfs:label "exists throughout"^^xsd:string ;
rdfs:range xsd:dateTime .
<http://www.reportinghub.no/ep/schema/activity#existsWithin>
rdf:type owl:DatatypeProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
rdfs:label "exists within"^^xsd:string ;
rdfs:range xsd:dateTime .
ep-report:DailyDrillingReport
rdf:type owl:Class ;
rdfs:label "daily drilling report"^^xsd:string ;
......@@ -31,7 +43,7 @@ ep-report:DailyProductionReport
rdfs:subClassOf ep-report:ProductionReport .
ep-report:FinalDailyDrillingReport
rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ;
rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
rdfs:label "final daily drilling report"^^xsd:string ;
rdfs:subClassOf ep-report:DailyDrillingReport .
......@@ -50,8 +62,13 @@ ep-report:NonProductivetimeReport
rdfs:subClassOf ep-report:Report ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:reportOn
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
......@@ -61,21 +78,16 @@ ep-report:NonProductivetimeReport
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
owl:onProperty ep-report:reportOn
] .
ep-report:NormalDailyDrillingReport
rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ;
rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
rdfs:label "normal daily drilling report"^^xsd:string ;
rdfs:subClassOf ep-report:DailyDrillingReport .
ep-report:PreliminaryDailyDrillingReport
rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ;
rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
rdfs:label "preliminary daily drilling report"^^xsd:string ;
rdfs:subClassOf ep-report:DailyDrillingReport .
......@@ -119,8 +131,8 @@ ep-report:ReportAliasIdentifier
rdfs:subClassOf owl:Thing ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:isAliasFor
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:aliasName
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
......@@ -129,62 +141,62 @@ ep-report:ReportAliasIdentifier
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:aliasName
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:isAliasFor
] .
ep-report:ReportForGasYearToDate
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for gas year to date"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForInstant
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for instant"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForMonthToDate
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for month to date"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneDay
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one day"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneGasDay
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one gas day"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneGasMonth
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one gas month"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneGasYear
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one gas year"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneMonth
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one month"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneWeek
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one week"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForOneYear
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdfs:label "report for one year"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportForYearToDate
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "report for year to date"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
......@@ -198,23 +210,23 @@ ep-report:WeeklyDrillingReport
rdfs:subClassOf ep-report:Report ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:createdAt
owl:allValuesFrom ep-report:DailyDrillingReport ;
owl:onProperty ep-report:reportOn
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
owl:cardinality "7"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:reportOn
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "7"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:reportOn
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-report:DailyDrillingReport ;
owl:onProperty ep-report:reportOn
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:createdAt
] .
ep-report:WellTestReport
......@@ -231,12 +243,12 @@ ep-report:aliasOwner
rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> .
ep-report:createdAt
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "created at"^^xsd:string .
ep-report:dailyDrillingReportNumber
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain ep-report:DailyDrillingReport ;
rdfs:label "daily drilling report number"^^xsd:string .
......@@ -261,7 +273,7 @@ ep-report:disclaimer
rdfs:range xsd:string .
ep-report:hasContent
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "has content"^^xsd:string .
......@@ -270,12 +282,12 @@ ep-report:isAliasFor
rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> .
ep-report:issuedAt
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "issued at"^^xsd:string .
ep-report:nameAsDatumObject
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
rdfs:label "name as datum object"^^xsd:string .
......@@ -285,13 +297,13 @@ ep-report:reportOn
rdfs:label "report on"^^xsd:string .
ep-report:reportSubmittedBy
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "report submitted by"^^xsd:string ;
rdfs:range <http://www.reportinghub.no/ep/schema/core#PhysicalObject> .
ep-report:reportSubmittedFrom
rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "report submitted from"^^xsd:string ;
rdfs:range <http://www.reportinghub.no/ep/schema/facility#Facility> .
......
......@@ -20,7 +20,7 @@
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
rdf:type owl:Ontology ;
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> ;
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> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-mpr-spin-lib:Function
......@@ -38,10 +38,17 @@ arg2 is the report end date"""^^xsd:string ;
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 spin:_arg1 ;
sp:arg2 spin:_arg2
] ;
sp:arg2 spin:_arg1 ;
sp:arg3 [ rdf:type fn:concat ;
sp:arg1 spin:_arg1 ;
sp:arg2 "$" ;
sp:arg3 spin:_arg2
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
......