David Leal

Exists throughout for month added

......@@ -6,6 +6,7 @@
# imports: http://www.reportinghub.no/ep/schema/1.0/production-equipment
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
......@@ -13,6 +14,7 @@
@prefix production-geometry: <http://evn.topbraidlive.org/www.reportinghub.no/ep/schema/1.0/production-geometry#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix smf: <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
......@@ -20,7 +22,7 @@
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
rdf:type owl:Ontology ;
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: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:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-mpr-spin-lib:Function
......@@ -2713,6 +2715,112 @@ ep-mpr-spin-lib:selectMolarVolumeScale
])
] .
ep-mpr-spin-lib:selectMonthRelationship
rdf:type spin:Function ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
rdfs:comment """arg1 startDate
arg2 endDate
arg3 month
returns existsWithin or existsThroughout .
At present checks only that the start is the first day of the month and that the end is the 31st, 30th, 29th or 28th day. There is no check for the right number of days in the month."""^^xsd:string ;
sp:resultVariables ([ sp:varName "myVar"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 0 ;
arg:toIndex 7 ;
sp:arg1 spin:_arg1
] ;
sp:arg2 [ rdf:type smf:subString ;
arg:fromIndex 0 ;
arg:toIndex 7 ;
sp:arg1 spin:_arg3
]
] ;
sp:arg2 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 0 ;
arg:toIndex 7 ;
sp:arg1 spin:_arg2
] ;
sp:arg2 [ rdf:type smf:subString ;
arg:fromIndex 0 ;
arg:toIndex 7 ;
sp:arg1 spin:_arg3
]
] ;
sp:arg2 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 8 ;
arg:toIndex 10 ;
sp:arg1 spin:_arg1
] ;
sp:arg2 "01"
] ;
sp:arg2 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 8 ;
arg:toIndex 10 ;
sp:arg1 spin:_arg2
] ;
sp:arg2 "31"
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 8 ;
arg:toIndex 10 ;
sp:arg1 spin:_arg2
] ;
sp:arg2 "30"
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 8 ;
arg:toIndex 10 ;
sp:arg1 spin:_arg2
] ;
sp:arg2 "29"
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:arg3 [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type smf:subString ;
arg:fromIndex 8 ;
arg:toIndex 10 ;
sp:arg1 spin:_arg2
] ;
sp:arg2 "28"
] ;
sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin>
]
]
]
] ;
sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin>
] ;
sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin>
] ;
sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin>
] ;
sp:variable
[ sp:varName "myVar"^^xsd:string
]
])
] .
ep-mpr-spin-lib:selectMovementOfProductFlag
rdf:type spin:Function ;
rdfs:label "select MovementOfProductFlag"^^xsd:string ;
......