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
Bob DuCharme
2012-03-27 17:15:45 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
29bd9594116c83dae8c2a3152e6e666490b29eee
29bd9594
1 parent
d72632c6
trying to output MPRG using rhspin:MPRGTableTemplates
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
410 additions
and
16 deletions
www.reportinghub.no/ep/spin/SPIN_EP-MPR-tables-v1.0.spin.ttl
www.reportinghub.no/swp/MPRG.uispin.html
www.reportinghub.no/swp/SWP_mprg.ui.ttl
www.reportinghub.no/ep/spin/SPIN_EP-MPR-tables-v1.0.spin.ttl
View file @
29bd959
# baseURI: http://www.reportinghub.no/ep/spin/mpr-tables
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/production
# imports: http://www.reportinghub.no/ep/schema/1.0/production-report
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
...
...
@@ -7,6 +8,7 @@
@prefix
owl:
<http://www.w3.org/2002/07/owl#>
.
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
.
@prefix
rdfs:
<http://www.w3.org/2000/01/rdf-schema#>
.
@prefix
rhspin:
<http://www.reportinghub.no/spin/rh#>
.
@prefix
sp:
<http://spinrdf.org/sp#>
.
@prefix
spin:
<http://spinrdf.org/spin#>
.
@prefix
spl:
<http://spinrdf.org/spl#>
.
...
...
@@ -14,5 +16,386 @@
<http://www.reportinghub.no/ep/spin/mpr-tables>
rdf:
type
owl:
Ontology
;
owl:
imports
<http://
spinrdf.org/spin>
,
<http://www.reportinghub.no/ep/schema/1.0/production-report>
,
<http://www.reportinghub.no/ep/spin/1.1/lib
>
;
owl:
imports
<http://
www.reportinghub.no/ep/schema/1.0/production>
,
<http://www.reportinghub.no/ep/spin/1.1/lib>
,
<http://www.reportinghub.no/ep/schema/1.0/production-report>
,
<http://spinrdf.org/spin
>
;
owl:
versionInfo
"Created with TopBraid Composer"
^^
xsd:
string
.
mpr-tables:
ProductionFlows
rdf:
type
rhspin:
TableTemplate
;
rdfs:
label
"Production flows"
^^
xsd:
string
;
rdfs:
subClassOf
rhspin:
MPRGTableTemplates
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
resultVariables
([
sp:
varName
"productionFlowFacilityName"
^^
xsd:
string
]
[
sp:
varName
"productionFlowName"
^^
xsd:
string
]
[
sp:
varName
"productionFlowDefinitionTypeName"
^^
xsd:
string
]
[
sp:
varName
"productionFlowDefinitionSubTypeName"
^^
xsd:
string
]
[
sp:
varName
"productionFlowPurposeTypeName"
^^
xsd:
string
]
[
sp:
varName
"productFlowName"
^^
xsd:
string
]
[
sp:
varName
"productFlowMaterialTypeName"
^^
xsd:
string
]
[
sp:
varName
"productFlowGrossOrNetTypeName"
^^
xsd:
string
]
[
sp:
varName
"productFlowInPeriodDurationTypeName"
^^
xsd:
string
]
[
sp:
varName
"massInKilograms"
^^
xsd:
string
]
[
sp:
varName
"pressureInAtmospheres"
^^
xsd:
string
]
[
sp:
varName
"temperatureInCelsius"
^^
xsd:
string
]
[
sp:
varName
"volumeInMetre3"
^^
xsd:
string
]
[
sp:
varName
"grossCalorificValueInMegaJouleMetre_3"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
<http://www.reportinghub.no/ep/schema/production-report#ProductionReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionReport"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#partOf>
;
sp:
subject
[
sp:
varName
"productVolumeReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/production-report#ProductVolumeReport>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productVolumeReport"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowsInReportingPeriod"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/report#reportOn>
;
sp:
subject
[
sp:
varName
"productVolumeReport"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductionFlow>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlowsInReportingPeriod"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowInReportingPeriod"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#hasNetworkPart>
;
sp:
subject
[
sp:
varName
"productionFlowsInReportingPeriod"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"productionFlowInReportingPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#WholeLifeProductionFlow>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowFacility"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf>
;
sp:
subject
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowFacilityName"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/np/schema/npd#name>
;
sp:
subject
[
sp:
varName
"productionFlowFacility"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionFlowName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionFlowDefinitionType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductionFlowDefinitionType>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlowDefinitionType"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowDefinitionTypeName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productionFlowDefinitionType"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionFlowDefinitionSubType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductionFlowDefinitionSubType>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlowDefinitionSubType"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowDefinitionSubTypeName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productionFlowDefinitionSubType"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productionFlowPurposeType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlow"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductionFlowPurposeType>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productionFlowPurposeType"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productionFlowPurposeTypeName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productionFlowPurposeType"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowInReportingPeriod"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#hasMixedPart>
;
sp:
subject
[
sp:
varName
"productionFlowInReportingPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductFlow>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowInReportingPeriod"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlow"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"productFlowInReportingPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#WholeLifeProductFlow>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlow"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productFlow"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowMaterialType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlow"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductMaterialType>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowMaterialType"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowMaterialTypeName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productFlowMaterialType"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowGrossOrNetType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlow"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#ProductFlowGrossOrNetType>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowGrossOrNetType"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowGrossOrNetTypeName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productFlowGrossOrNetType"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowInReportingPeriod"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"productFlowInPeriod"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"productFlowInPeriodDurationType"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowInPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlowDurationType>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"productFlowInPeriodDurationType"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"productFlowInPeriodDurationTypeName"
^^
xsd:
string
]
;
sp:
predicate
rdfs:
label
;
sp:
subject
[
sp:
varName
"productFlowInPeriodDurationType"
^^
xsd:
string
]
])
]
[
sp:
object
[
sp:
varName
"materialThatFlowsInPeriod"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#materialThatFlows>
;
sp:
subject
[
sp:
varName
"productFlowInPeriod"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"mass"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"materialThatFlowsInPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Mass>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"mass"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"massInKilograms"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#kilogram>
;
sp:
subject
[
sp:
varName
"mass"
^^
xsd:
string
]
])
]
[
sp:
object
[
sp:
varName
"materialThatFlowsInPeriod"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#temporalPartOf>
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriod"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"pressure"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Pressure>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"pressure"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"pressureInAtmospheres"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#atmosphere>
;
sp:
subject
[
sp:
varName
"pressure"
^^
xsd:
string
]
])
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"temperature"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Temperature>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"temperature"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"temperatureInCelsius"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#celsius>
;
sp:
subject
[
sp:
varName
"temperature"
^^
xsd:
string
]
])
]
[
sp:
object
[
sp:
varName
"volume"
^^
xsd:
string
]
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriod"
^^
xsd:
string
]
]
[
sp:
object
<http://www.reportinghub.no/ep/schema/core#Volume>
;
sp:
predicate
rdf:
type
;
sp:
subject
[
sp:
varName
"volume"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"volumeInMetre3"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#metre3>
;
sp:
subject
[
sp:
varName
"volume"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Optional
;
sp:
elements
([
sp:
object
[
sp:
varName
"calorificValue"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/flow#grossCalorificValue>
;
sp:
subject
[
sp:
varName
"stateOfMaterialThatFlowsInPeriod"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"grossCalorificValueInMegaJouleMetre_3"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/ep/schema/core#megajoule_m-3>
;
sp:
subject
[
sp:
varName
"calorificValue"
^^
xsd:
string
]
])
])
])
])
])
]
;
rhspin:
tableHeaders
(
"""flag1
productionFlowFacilityName"""
^^
xsd:
string
"productionFlowName"
^^
xsd:
string
"productionFlowDefinitionTypeName"
^^
xsd:
string
"productionFlowDefinitionSubTypeName"
^^
xsd:
string
"productionFlowPurposeTypeName"
^^
xsd:
string
"productFlowName"
^^
xsd:
string
"productFlowMaterialTypeName"
^^
xsd:
string
"productFlowGrossOrNetTypeName"
^^
xsd:
string
"productFlowInPeriodDurationTypeName"
^^
xsd:
string
"massInKilograms"
^^
xsd:
string
"pressureInAtmospheres"
^^
xsd:
string
"temperatureInCelsius"
^^
xsd:
string
"volumeInMetre3"
^^
xsd:
string
)
.
...
...
www.reportinghub.no/swp/MPRG.uispin.html
View file @
29bd959
<ui:group
let:facilityName=
"{# SELECT DISTINCT
?productionFlowFacilityName WHERE { ?productionFlow a ep-flow:WholeLifeProductionFlow ; ep-flow:flowIntoOrOutOf ?productionFlowFacility . ?productionFlowFacility npd:name ?productionFlowFacilityName . } }"
>
<h1></h1>
<ui:group
let:report=
"{# SELECT ?report WHERE { ?report a ep-prodreport:ProductionReport . } }"
>
<!--
let:facilityName="{# SELECT DISTINCT
?productionFlowFacilityName WHERE { ?productionFlow a ep-flow:WholeLifeProductionFlow ; ep-flow:flowIntoOrOutOf ?productionFlowFacility . ?productionFlowFacility npd:name ?productionFlowFacilityName . } }"
-->
<h1>
{= ?facilityName } Field
</h1>
<ui:forEach
ui:resultSet=
"{#
<!--
<ui:forEach ui:resultSet="{#
SELECT
?productionFlowFacilityName
?productionFlowName
...
...
@@ -115,8 +123,7 @@ OPTIONAL {
}
}
}"
>
<!-- next: define a view of the productionFlow based on the table above -->
<!-- ui:resourceView ui:resource="{= ?productionFlow }"/-->
}">
<h3>{= ?productionFlowName }</h3>
<table>
...
...
@@ -136,8 +143,12 @@ OPTIONAL {
</table>
</ui:forEach>
</ui:forEach> -->
<p>
template test start
</p>
<ddrswp:Table
arg:report=
"{= ?report }"
arg:template=
"mpr-tables:ProductionFlows"
/>
<p>
template test end
</p>
</ui:group>
\ No newline at end of file
...
...
www.reportinghub.no/swp/SWP_mprg.ui.ttl
View file @
29bd959
# baseURI: http://www.reportinghub.no/swp/mprg
# imports: http://uispin.org/tui
# imports: http://www.reportinghub.no/ep/schema/1.0/production
# imports: http://www.reportinghub.no/ep/schema/1.0/production-report
# imports: http://www.reportinghub.no/ep/spin/ddr-tables
# imports: http://www.reportinghub.no/ep/spin/mpr-tables
# imports: http://www.reportinghub.no/spin/rh
@prefix
arg:
<http://spinrdf.org/arg#>
.
...
...
@@ -51,7 +51,7 @@ arg:template
<http://www.reportinghub.no/swp/mprg>
rdf:
type
owl:
Ontology
;
owl:
imports
<http://
uispin.org/tui>
,
<http://www.reportinghub.no/ep/schema/1.0/production-report>
,
<http://www.reportinghub.no/ep/spin/ddr-tables>
,
<http://www.reportinghub.no/spin/rh>
,
<http://www.reportinghub.no/ep/schema/1.0/production
>
;
owl:
imports
<http://
www.reportinghub.no/ep/spin/mpr-tables>
,
<http://www.reportinghub.no/spin/rh>
,
<http://www.reportinghub.no/ep/spin/ddr-tables>
,
<http://www.reportinghub.no/ep/schema/1.0/production-report>
,
<http://uispin.org/tui
>
;
owl:
versionInfo
"0.1.0"
^^
xsd:
string
.
mprgswp:
MPRGView
...
...
@@ -65,12 +65,6 @@ mprgswp:MPRGView
spl:
valueType
<http://www.reportinghub.no/ep/schema/production-report#ProductionReport>
]
;
ui:
headIncludes
[
rdf:
type
html:
Link
;
html:
href
"http://spinrdf.org/rhlib/ddr.css"
^^
xsd:
string
;
html:
rel
"stylesheet"
^^
xsd:
string
;
html:
type
"text/css"
^^
xsd:
string
]
;
ui:
headIncludes
[
rdf:
type
html:
Title
;
ui:
child
[
rdf:
type
ui:
TextNode
;
...
...
@@ -78,4 +72,10 @@ mprgswp:MPRGView
ui:
text
"Monthly Production Report (government)"
^^
xsd:
string
]
]
;
ui:
headIncludes
[
rdf:
type
html:
Link
;
html:
href
"http://spinrdf.org/rhlib/ddr.css"
^^
xsd:
string
;
html:
rel
"stylesheet"
^^
xsd:
string
;
html:
type
"text/css"
^^
xsd:
string
]
;
ui:
prototype
<http://www.reportinghub.no/swp/MPRG.uispin.html>
.
...
...
Please
register
or
login
to post a comment