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
2013-07-25 18:06:22 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b42cf4272b1785d5864a0a51298d0a889e0b25f4
b42cf427
1 parent
6f5d9fc3
Got productFlowMass, productFlowDensity and productFlowVolume magic properties working
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
89 deletions
www.reportinghub.no/ep/spin/SPIN_EP-MPR-tables-v1.0.spin.ttl
www.reportinghub.no/ep/spin/SPIN_EP-PROD-property.ttl
www.reportinghub.no/ep/spin/SPIN_EP-MPR-tables-v1.0.spin.ttl
View file @
b42cf42
...
...
@@ -2551,111 +2551,31 @@ mpr-tables:ProductionSales
sp:
subject
[
sp:
varName
"productionFlowMixedPart"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowInMonthMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#materialThatFlows>
;
sp:
subject
[
sp:
varName
"productionFlowMixedPart"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowInMonthMaterial"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowInMonthMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"quantityofmaterialinaspecifiedstate"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"quantityofmaterialinaspecifiedstate"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"ma
terialMass
"
^^
xsd:
string
[
sp:
varName
"ma
ssValueString
"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowInMonthMaterial"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Mass>
;
sp:
predicate
rdf:
type
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#productFlowMass>
;
sp:
subject
[
sp:
varName
"materialMass"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizePropertyUnitAndValue
;
sp:
arg1
[
sp:
varName
"materialMass"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"massValueString"
^^
xsd:
string
[
sp:
varName
"productionFlowMixedPart"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"quantityofmaterialinaspecifiedstate"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriodVolume"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"stateVolume"
^^
xsd:
string
[
sp:
varName
"volumeValueString"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriodVolume"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Volume>
;
sp:
predicate
rdf:
type
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#productFlowVolume>
;
sp:
subject
[
sp:
varName
"stateVolume"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizePropertyUnitAndValue
;
sp:
arg1
[
sp:
varName
"stateVolume"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"volumeValueString"
^^
xsd:
string
[
sp:
varName
"productionFlowMixedPart"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowInMonthMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriodDensity"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"stateDensity"
^^
xsd:
string
[
sp:
varName
"densityValueString"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriodDensity"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Density>
;
sp:
predicate
rdf:
type
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#productFlowDensity>
;
sp:
subject
[
sp:
varName
"stateDensity"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizePropertyUnitAndValue
;
sp:
arg1
[
sp:
varName
"stateDensity"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"densityValueString"
^^
xsd:
string
[
sp:
varName
"productionFlowMixedPart"
^^
xsd:
string
]
])
]
[
sp:
object
...
...
www.reportinghub.no/ep/spin/SPIN_EP-PROD-property.ttl
View file @
b42cf42
...
...
@@ -4,6 +4,7 @@
# imports: http://www.reportinghub.no/ep/schema/1.0/production
@prefix
ep-report:
<http://www.reportinghub.no/ep/schema/report#>
.
@prefix
ep-spin-lib:
<http://www.reportinghub.no/ep/spin/lib#>
.
@prefix
owl:
<http://www.w3.org/2002/07/owl#>
.
@prefix
prod-property:
<http://www.reportinghub.no/ep/spin/prod-property#>
.
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
.
...
...
@@ -104,6 +105,185 @@
]
;
spin:
returnType
xsd:
string
.
<http://www.reportinghub.no/ep/schema/flow#productFlowDensity>
rdf:
type
spin:
MagicProperty
,
owl:
DatatypeProperty
;
rdfs:
domain
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
;
rdfs:
label
"product flow density"
^^
xsd:
string
;
rdfs:
range
xsd:
string
;
rdfs:
subClassOf
spin:
MagicProperties
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
([
sp:
varName
"densityValueString"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#materialThatFlows>
;
sp:
subject
spin:
_arg1
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"materialWithDensity"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"density"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"materialWithDensity"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Density>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"density"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizePropertyUnitAndValue
;
sp:
arg1
[
sp:
varName
"density"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"densityValueString"
^^
xsd:
string
]
])
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"the product flow that has mass"
^^
xsd:
string
;
spl:
predicate
sp:
arg1
;
spl:
valueType
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
]
;
spin:
returnType
xsd:
string
.
<http://www.reportinghub.no/ep/schema/flow#productFlowMass>
rdf:
type
spin:
MagicProperty
,
owl:
DatatypeProperty
;
rdfs:
domain
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
;
rdfs:
label
"product flow mass"
^^
xsd:
string
;
rdfs:
range
xsd:
string
;
rdfs:
subClassOf
spin:
MagicProperties
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
([
sp:
varName
"massValueString"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#materialThatFlows>
;
sp:
subject
spin:
_arg1
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"materialMass"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Mass>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"materialMass"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizePropertyUnitAndValue
;
sp:
arg1
[
sp:
varName
"materialMass"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"massValueString"
^^
xsd:
string
]
])
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"the product flow that has mass"
^^
xsd:
string
;
spl:
predicate
sp:
arg1
;
spl:
valueType
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
]
;
spin:
returnType
xsd:
string
.
<http://www.reportinghub.no/ep/schema/flow#productFlowVolume>
rdf:
type
spin:
MagicProperty
,
owl:
DatatypeProperty
;
rdfs:
domain
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
;
rdfs:
label
"product flow volume"
^^
xsd:
string
;
rdfs:
range
xsd:
string
;
rdfs:
subClassOf
spin:
MagicProperties
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
([
sp:
varName
"volumeValueString"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#materialThatFlows>
;
sp:
subject
spin:
_arg1
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowMaterial"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"materialInState"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"materialInState"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"materialInState"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"materialWithVolume"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"volume"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"materialWithVolume"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Volume>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"volume"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
ep-spin-lib:
normalizePropertyUnitAndValue
;
sp:
arg1
[
sp:
varName
"volume"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"volumeValueString"
^^
xsd:
string
]
])
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"the product flow that has mass"
^^
xsd:
string
;
spl:
predicate
sp:
arg1
;
spl:
valueType
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
]
;
spin:
returnType
xsd:
string
.
<http://www.reportinghub.no/ep/schema/flow#reportedFlowMaterial>
rdf:
type
spin:
MagicProperty
,
owl:
ObjectProperty
;
rdfs:
domain
<http://www.reportinghub.no/ep/schema/flow#ProductionFlow>
;
...
...
Please
register
or
login
to post a comment