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 Price
2012-05-28 22:23:22 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3af4556bc589d2726a3aa8efe1b64a167102156
b3af4556
1 parent
ce5cec46
Removed report Kind was always Copex and improved report header with month and title.
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
330 additions
and
370 deletions
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0.ttl
www.reportinghub.no/swp/MPRG.uispin.html
www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0.ttl
View file @
b3af455
...
...
@@ -19,42 +19,16 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001m Create the ProductionReport - extract the name from context/installation"
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/report#ProductionReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
_:
b1
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"installation"
^^
xsd:
string
rdfs:
comment
"STEP 10010 Add the contextFacility"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"contextFacility"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b1
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/geography#locatedWithin>
;
sp:
subject
[
sp:
varName
"production
Report"
^^
xsd:
string
[
sp:
varName
"production
Facility"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
_:
b1
])
;
sp:
where
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#contextRef>
;
...
...
@@ -65,58 +39,53 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
installationRef"
^^
xsd:
string
[
sp:
varName
"
contectFacilityRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
installationRef>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
contextFacilityRef>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
installationRef"
^^
xsd:
string
[
sp:
varName
"
contextFacilityRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"installation"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
arg2
rdfs:
label
]
;
sp:
variable
[
sp:
varName
"normalizedInstallationName"
^^
xsd:
string
[
sp:
varName
"contextFacility"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
buildProductionReportURI
;
sp:
arg1
[
sp:
varName
"normalizedInstallationName"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
;
sp:
variable
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10020 Add the operator"
^^
xsd:
string
;
sp:
templates
([
sp:
object
_:
b2
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/facility#facilityOperator>
;
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/organization#Organization>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b2
]
[
sp:
object
[
sp:
varName
"
operator"
^^
xsd:
string
[
sp:
varName
"
productionFacility"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b2
sp:
subject
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001d Create the interval identifier - dateEnd from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
...
...
@@ -129,94 +98,114 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
operatorRef"
^^
xsd:
string
[
sp:
varName
"
dateEnd"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
operatorRef>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
dateEnd>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"operatorRef"
^^
xsd:
string
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#date>
;
sp:
subject
[
sp:
varName
"operator"
^^
xsd:
string
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateStart"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateStart>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
])
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/report#ProductionReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
_:
b1
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b1
]
[
sp:
object
[
sp:
varName
"installation"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b1
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"
temporalPartOfAProductionFacility"
^^
xsd:
string
[
sp:
varName
"
productionReport"
^^
xsd:
string
]
])
]
[
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
_:
b1
])
;
sp:
where
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
[
sp:
object
[
sp:
varName
"productVolumeRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
contextRef>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
objectRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#Obj_
report>
;
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#Obj_
productVolume>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"
contextRef"
^^
xsd:
string
[
sp:
varName
"
productVolumeRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
dateStart"
^^
xsd:
string
[
sp:
varName
"
installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
dateStart>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
installationRef>
;
sp:
subject
[
sp:
varName
"
contextRef"
^^
xsd:
string
[
sp:
varName
"
productVolumeRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
dateEnd"
^^
xsd:
string
[
sp:
varName
"
installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.
epim.no/schemas/mprml/1#dateEnd>
;
sp:
predicate
<http://www.
reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"
contextRef"
^^
xsd:
string
[
sp:
varName
"
installation"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
buildIntervalIdentifier
;
sp:
arg1
[
sp:
varName
"dateStart"
^^
xsd:
string
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"dateEnd"
^^
xsd:
string
sp:
predicate
<http://www.epim.no/schemas/mprml/1#objectRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#Obj_productionOperation>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
variable
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
sp:
predicate
<http://www.epim.no/schemas/mprml/1#installationRef>
;
sp:
subject
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001b Create the interval identifier - date and dateEnd from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#contextRef>
;
...
...
@@ -227,38 +216,33 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#date>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateStart"
^^
xsd:
string
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
dateStart>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
installationRef>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateEnd>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
sp:
arg2
rdfs:
label
]
;
sp:
variable
[
sp:
varName
"normalizedInstallationName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
build
IntervalIdentifier
;
sp:
arg1
[
sp:
varName
"
date"
^^
xsd:
string
[
rdf:
type
ep-mpr-spin-lib:
build
ProductionReportURI
;
sp:
arg1
[
sp:
varName
"
normalizedInstallationName"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"
dateEnd"
^^
xsd:
string
sp:
arg2
[
sp:
varName
"
intervalIdentifier"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
intervalIdentifier"
^^
xsd:
string
[
sp:
varName
"
productionReport"
^^
xsd:
string
]
])
]
;
...
...
@@ -270,19 +254,19 @@
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
_:
b
3
;
]
[
sp:
object
_:
b
2
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
]
[
sp:
object
[
sp:
varName
"installation"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
...
...
@@ -292,7 +276,7 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
_:
b
3
sp:
subject
_:
b
2
])
;
sp:
where
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
...
...
@@ -367,14 +351,42 @@
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001c Create the interval identifier - date from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
rdfs:
comment
"STEP 10001m Create the ProductionReport - extract the name from context/installation"
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/report#ProductionReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
_:
b3
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b3
]
[
sp:
object
[
sp:
varName
"installation"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b3
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
_:
b3
])
;
sp:
where
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
]
[
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#contextRef>
;
...
...
@@ -385,35 +397,105 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
date"
^^
xsd:
string
[
sp:
varName
"
installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
date>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
installationRef>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
NotExists
;
]
[
sp:
object
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"installation"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
arg2
rdfs:
label
]
;
sp:
variable
[
sp:
varName
"normalizedInstallationName"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
buildProductionReportURI
;
sp:
arg1
[
sp:
varName
"normalizedInstallationName"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"productionReport"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001z Add the issue date and title"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"month"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#issuedAt>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"title"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#contextRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#Obj_report>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"
dateStart"
^^
xsd:
string
[
sp:
varName
"
month"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
dateStart>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
month>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"
dateEnd"
^^
xsd:
string
[
sp:
varName
"
titleRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
dateEnd>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
titleRef>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"title"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
[
sp:
varName
"titleRef"
^^
xsd:
string
]
])
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001
o Create the ProductionReport - extract the name from productVolume/installation"
^^
xsd:
string
;
rdfs:
comment
"STEP 10001
p Create the ProductionReport - no installation"
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/report#ProductionReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
...
...
@@ -427,11 +509,6 @@
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b4
]
[
sp:
object
[
sp:
varName
"installation"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b4
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
...
...
@@ -448,7 +525,8 @@
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
]
[
sp:
object
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"productVolumeRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#objectRef>
;
...
...
@@ -465,13 +543,7 @@
sp:
subject
[
sp:
varName
"productVolumeRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"installation"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
...
...
@@ -512,18 +584,16 @@
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
spl:
object
;
sp:
arg1
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
arg2
rdfs:
label
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
"noInstallation"
]
;
sp:
variable
[
sp:
varName
"normalized
InstallationName"
^^
xsd:
string
[
sp:
varName
"normalized
Name"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
buildProductionReportURI
;
sp:
arg1
[
sp:
varName
"normalized
InstallationName"
^^
xsd:
string
sp:
arg1
[
sp:
varName
"normalized
Name"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
...
...
@@ -535,10 +605,8 @@
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001d Create the interval identifier - dateEnd from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
;
rdfs:
comment
"STEP 10001e Create the interval identifier - no date"
^^
xsd:
string
;
sp:
templates
([
sp:
object
"noDate"
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
])
;
...
...
@@ -552,13 +620,15 @@
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateEnd>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
...
...
@@ -581,10 +651,20 @@
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001e Create the interval identifier - no date"
^^
xsd:
string
;
sp:
templates
([
sp:
object
"noDate"
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
rdfs:
comment
"STEP 10020 Add the operator"
^^
xsd:
string
;
sp:
templates
([
sp:
object
_:
b5
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/facility#facilityOperator>
;
sp:
subject
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/organization#Organization>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b5
]
[
sp:
object
[
sp:
varName
"operator"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
_:
b5
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
...
...
@@ -596,76 +676,47 @@
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
[
sp:
object
[
sp:
varName
"operatorRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateEnd>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#operatorRef>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
]
[
sp:
object
[
sp:
varName
"operatorRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#date>
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
[
sp:
varName
"operator"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateStart"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateStart>
;
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
[
sp:
varName
"productionReport"
^^
xsd:
string
]
])
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001z Add the report kind, issue date and title"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"reportKind"
^^
xsd:
string
]
[
sp:
object
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/
report#ProductionReportKind>
;
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/
facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"reportKind"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/report#ProductionReport>
;
sp:
predicate
rdfs:
subClassOf
;
sp:
subject
[
sp:
varName
"reportKind"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"kind"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#name>
;
sp:
subject
[
sp:
varName
"reportKind"
^^
xsd:
string
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"issueDate"
^^
xsd:
string
])
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#issuedAt>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"title"
^^
xsd:
string
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001b Create the interval identifier - date and dateEnd from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
;
sp:
predicate
<http://purl.org/dc/elements/1.1/title>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
...
...
@@ -677,128 +728,52 @@
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"kind"
^^
xsd:
string
]
[
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#kind>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#date>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"
issueDate"
^^
xsd:
string
[
sp:
varName
"
dateStart"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
issueDate>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
dateStart>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"titleRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#titleRef>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"title"
^^
xsd:
string
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
;
sp:
predicate
<http://www.linkedmodel.org/schema/dtype#value>
;
sp:
subject
[
sp:
varName
"titleRef"
^^
xsd:
string
]
])
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateEnd>
;
sp:
subject
[
sp:
varName
"
productionReport"
^^
xsd:
string
[
sp:
varName
"
contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-dpr-spin-lib:
buildProductionReportKindURI
;
sp:
arg1
[
sp:
varName
"kind"
^^
xsd:
string
[
rdf:
type
ep-mpr-spin-lib:
buildIntervalIdentifier
;
sp:
arg1
[
sp:
varName
"date"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
reportKind"
^^
xsd:
string
[
sp:
varName
"
intervalIdentifier"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 10001p Create the ProductionReport - no installation"
^^
xsd:
string
;
sp:
templates
([
sp:
object
<http://www.reportinghub.no/ep/schema/report#ProductionReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
_:
b5
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
subject
_:
b5
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
_:
b5
])
;
sp:
where
([
sp:
object
rdfs:
comment
"STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"intervalIdentifier"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"productVolumeRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#objectRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#Obj_productVolume>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productVolumeRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#installationRef>
;
sp:
subject
[
sp:
varName
"productVolumeRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#objectRef>
;
sp:
subject
spin:
_this
]
[
sp:
object
<http://www.epim.no/schemas/mprml/1#Obj_productionOperation>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"installationRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#installationRef>
;
sp:
subject
[
sp:
varName
"productionOperationRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#contextRef>
;
...
...
@@ -809,44 +784,40 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"installationRef"
^^
xsd:
string
[
sp:
varName
"dateStart"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#installationRef>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateStart>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizeString
;
sp:
arg1
"noInstallation"
]
[
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
;
sp:
variable
[
sp:
varName
"normalizedName"
^^
xsd:
string
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateEnd>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-mpr-spin-lib:
build
ProductionReportURI
;
sp:
arg1
[
sp:
varName
"
normalizedName"
^^
xsd:
string
[
rdf:
type
ep-mpr-spin-lib:
build
IntervalIdentifier
;
sp:
arg1
[
sp:
varName
"
dateStart"
^^
xsd:
string
]
;
sp:
arg2
[
sp:
varName
"
intervalIdentifier"
^^
xsd:
string
sp:
arg2
[
sp:
varName
"
dateEnd"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"
productionReport"
^^
xsd:
string
[
sp:
varName
"
intervalIdentifier"
^^
xsd:
string
]
])
]
;
spin:
rule
[
rdf:
type
sp:
Construct
;
rdfs:
comment
"STEP 100
10 Add the contextFacility"
^^
xsd:
string
;
rdfs:
comment
"STEP 100
01c Create the interval identifier - date from context"
^^
xsd:
string
;
sp:
templates
([
sp:
object
[
sp:
varName
"
contextFacility"
^^
xsd:
string
[
sp:
varName
"
date"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/geography#locatedWithin>
;
sp:
subject
[
sp:
varName
"productionFacility"
^^
xsd:
string
]
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier>
;
sp:
subject
spin:
_this
])
;
sp:
where
([
sp:
object
[
sp:
varName
"contextRef"
^^
xsd:
string
...
...
@@ -859,44 +830,31 @@
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"
contectFacilityRef"
^^
xsd:
string
[
sp:
varName
"
date"
^^
xsd:
string
]
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
contextFacilityRef>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#
date>
;
sp:
subject
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"contextFacilityRef"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"contextFacility"
^^
xsd:
string
]
]
[
sp:
object
spin:
_this
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/production-core#derivedFrom>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateStart"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility>
;
sp:
predicate
rdf:
type
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateStart>
;
sp:
subject
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
[
sp:
varName
"contextRef"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFacility"
^^
xsd:
string
])
]
[
rdf:
type
sp:
NotExists
;
sp:
elements
([
sp:
object
[
sp:
varName
"dateEnd"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
predicate
<http://www.epim.no/schemas/mprml/1#dateEnd>
;
sp:
subject
[
sp:
varName
"temporalPartOfAProductionFacility"
^^
xsd:
string
[
sp:
varName
"contextRef"
^^
xsd:
string
]
])
])
]
.
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0>
...
...
www.reportinghub.no/swp/MPRG.uispin.html
View file @
b3af455
...
...
@@ -8,6 +8,7 @@ WHERE {
?field npd:name ?fieldName .
}
}"
>
<!--
...
...
@@ -19,7 +20,8 @@ let:facilityName="{# SELECT DISTINCT
<h1>
{= ?fieldName } Field
</h1>
<h1>
Monthly Government Report : {= ?fieldName } Field
</h1>
<h2>
{# SELECT ?title WHERE { ?report a ep-report:ProductionReport . ?report ep-core:name ?title . } } {# SELECT ?month WHERE { ?report a ep-report:ProductionReport . ?report ep-report:issuedAt ?month . } }
</h2>
<!-- <ui:forEach ui:resultSet="{#
SELECT
...
...
Please
register
or
login
to post a comment