Toggle navigation
Toggle navigation
This project
Loading...
Sign in
data.posccaesar.org
/
npd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Authored by
David Leal
2012-09-15 19:44:37 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
51c3e7ba809eae3863869d2e06958c891b6ddb78
51c3e7ba
1 parent
03db30f6
Exists throughout for month added
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
1 deletions
www.reportinghub.no/ep/spin/SPIN_EPIM-MPR-lib-v1.1.spin.ttl
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0.ttl
www.reportinghub.no/ep/spin/SPIN_EPIM-MPR-lib-v1.1.spin.ttl
View file @
51c3e7b
...
...
@@ -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/spi
n>
;
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/productio
n>
;
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
;
...
...
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0.ttl
View file @
51c3e7b
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment