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
Holger Knublauch
2011-11-10 15:51:04 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e2c07e47b8f52b65ec3775b9aa3ce285625f3674
e2c07e47
1 parent
2a67e468
Support for DDR Overview page
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
20 deletions
www.reportinghub.no/system/schema/SCHEMA-reporting.ttl
www.reportinghub.no/system/spin/SPIN-reporting.spin.ttl
www.reportinghub.no/system/schema/SCHEMA-reporting.ttl
View file @
e2c07e4
...
...
@@ -21,32 +21,32 @@ sioc:id
owl:
versionInfo
"0.2.0"
^^
xsd:
string
.
report:
AbstractDR
rdf:
type
rdfs
:
Class
;
rdf:
type
owl
:
Class
;
rdfs:
comment
"Abstract base class for various types of daily reports."
^^
xsd:
string
;
rdfs:
subClassOf
foaf:
Document
;
rdfs:
subClassOf
[
rdf:
type
owl:
Restriction
;
owl:
cardinality
"1"
^^
xsd:
nonNegativeInteger
;
owl:
allValuesFrom
xsd:
string
;
owl:
onProperty
sioc:
id
]
;
rdfs:
subClassOf
[
rdf:
type
owl:
Restriction
;
owl:
cardinality
"1"
^^
xsd:
nonNegativeInteger
;
owl:
onProperty
<http://purl.org/dc/terms/
created
>
owl:
onProperty
<http://purl.org/dc/terms/
date
>
]
;
rdfs:
subClassOf
[
rdf:
type
owl:
Restriction
;
owl:
cardinality
"1"
^^
xsd:
nonNegativeInteger
;
owl:
onProperty
<http://purl.org/dc/terms/
date
>
owl:
onProperty
<http://purl.org/dc/terms/
created
>
]
;
rdfs:
subClassOf
[
rdf:
type
owl:
Restriction
;
owl:
allValuesFrom
xsd:
string
;
owl:
cardinality
"1"
^^
xsd:
nonNegativeInteger
;
owl:
onProperty
sioc:
id
]
.
report:
DDR
rdf:
type
rdfs
:
Class
;
rdf:
type
owl
:
Class
;
rdfs:
comment
"The metadata about a Daily Drilling Report."
^^
xsd:
string
;
rdfs:
label
"DDR"
^^
xsd:
string
;
rdfs:
subClassOf
report:
AbstractDR
;
...
...
@@ -54,10 +54,15 @@ report:DDR
[
rdf:
type
owl:
Restriction
;
owl:
cardinality
"1"
^^
xsd:
nonNegativeInteger
;
owl:
onProperty
report:
wellBoreId
]
;
rdfs:
subClassOf
[
rdf:
type
owl:
Restriction
;
owl:
cardinality
"1"
^^
xsd:
nonNegativeInteger
;
owl:
onProperty
report:
xml
]
.
report:
DPR
rdf:
type
rdfs
:
Class
;
rdf:
type
owl
:
Class
;
rdfs:
comment
"The metadata about a Daily Production Report."
^^
xsd:
string
;
rdfs:
label
"DPR"
^^
xsd:
string
;
rdfs:
subClassOf
report:
AbstractDR
;
...
...
@@ -76,12 +81,18 @@ report:HTMLFormat
rdf:
type
report:
Format
;
rdfs:
label
"HTMLFormat"
^^
xsd:
string
.
report:
NPTR
rdf:
type
owl:
Class
;
rdfs:
comment
"Metadata about a Non-Productive Time Report."
^^
xsd:
string
;
rdfs:
label
"NPTR"
^^
xsd:
string
;
rdfs:
subClassOf
foaf:
Document
.
report:
PDFFormat
rdf:
type
report:
Format
;
rdfs:
label
"PDFFormat"
^^
xsd:
string
.
report:
WDR
rdf:
type
rdfs
:
Class
;
rdf:
type
owl
:
Class
;
rdfs:
comment
"Metadata about a Weekly Drilling Report"
^^
xsd:
string
;
rdfs:
label
"WDR"
^^
xsd:
string
;
rdfs:
subClassOf
foaf:
Document
.
...
...
@@ -107,6 +118,12 @@ report:wellBoreId
rdf:
type
owl:
DatatypeProperty
;
rdfs:
label
"well bore id"
^^
xsd:
string
.
report:
xml
rdf:
type
owl:
DatatypeProperty
;
rdfs:
comment
"The XML code of a report."
^^
xsd:
string
;
rdfs:
label
"xml"
^^
xsd:
string
;
rdfs:
range
xsd:
string
.
foaf:
Document
rdf:
type
rdfs:
Class
;
rdfs:
label
"Document"
^^
xsd:
string
.
...
...
www.reportinghub.no/system/spin/SPIN-reporting.spin.ttl
View file @
e2c07e4
...
...
@@ -7,6 +7,7 @@
@prefix
rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
.
@prefix
rdfs:
<http://www.w3.org/2000/01/rdf-schema#>
.
@prefix
reportspin:
<http://www.reportinghub.no/system/spin/reporting#>
.
@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#>
.
...
...
@@ -38,6 +39,70 @@
owl:
imports
<http://spinrdf.org/spin>
,
<http://www.reportinghub.no/system/schema/reporting>
;
owl:
versionInfo
"0.1.0"
^^
xsd:
string
.
reportspin:
DDRsOverview
rdf:
type
spin:
SelectTemplate
;
rdfs:
label
"DDRs overview"
^^
xsd:
string
;
rdfs:
subClassOf
spin:
SelectTemplates
;
spin:
body
[
rdf:
type
sp:
Select
;
sp:
orderBy
([
sp:
varName
"wellBoreName"
^^
xsd:
string
]
[
sp:
varName
"date"
^^
xsd:
string
]
[
sp:
varName
"created"
^^
xsd:
string
])
;
sp:
resultVariables
([
sp:
varName
"wellBoreName"
^^
xsd:
string
]
[
sp:
varName
"date"
^^
xsd:
string
]
[
sp:
varName
"created"
^^
xsd:
string
]
[
sp:
varName
"id"
^^
xsd:
string
])
;
sp:
where
([
sp:
object
[
sp:
varName
"wellBoreId"
^^
xsd:
string
]
;
sp:
predicate
<http://www.reportinghub.no/system/schema/reporting#wellBoreId>
;
sp:
subject
[
sp:
varName
"ddr"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"created"
^^
xsd:
string
]
;
sp:
predicate
<http://purl.org/dc/terms/created>
;
sp:
subject
[
sp:
varName
"ddr"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"date"
^^
xsd:
string
]
;
sp:
predicate
<http://purl.org/dc/terms/date>
;
sp:
subject
[
sp:
varName
"ddr"
^^
xsd:
string
]
]
[
sp:
object
[
sp:
varName
"id"
^^
xsd:
string
]
;
sp:
predicate
<http://rdfs.org/sioc/ns#id>
;
sp:
subject
[
sp:
varName
"ddr"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
wellBoreById
;
sp:
arg1
[
sp:
varName
"wellBoreId"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
[
rdf:
type
sp:
Bind
;
sp:
expression
[
rdf:
type
rhspin:
npdName
;
sp:
arg1
[
sp:
varName
"wellBore"
^^
xsd:
string
]
]
;
sp:
variable
[
sp:
varName
"wellBoreName"
^^
xsd:
string
]
])
]
.
reportspin:
graphByDDRId
rdf:
type
spin:
Function
;
rdfs:
comment
"Gets the URI of the named graph containing the triples submitted by a report:DDR (metadata) with a given id."
^^
xsd:
string
;
...
...
@@ -146,16 +211,16 @@ reportspin:idOfDDRByDateAndWellBoreId
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The id of the well bore."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#wellBoreId>
;
spl:
valueType
xsd:
string
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The date of the DDR (not the submission date, but the start date of the report)."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#date>
;
spl:
valueType
xsd:
date
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The id of the well bore."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#wellBoreId>
;
spl:
valueType
xsd:
string
]
;
spin:
returnType
xsd:
string
.
reportspin:
idOfDPRByDateAndOwner
...
...
@@ -204,14 +269,14 @@ reportspin:idOfDPRByDateAndOwner
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The date of the DDR (not the submission date, but the start date of the report)."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#date>
;
spl:
valueType
xsd:
date
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The Licence or BAA."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#owner>
;
spl:
valueType
<http://www.reportinghub.no/np/schema/npd#Owner>
]
;
spin:
constraint
[
rdf:
type
spl:
Argument
;
rdfs:
comment
"The date of the DDR (not the submission date, but the start date of the report)."
^^
xsd:
string
;
spl:
predicate
<http://spinrdf.org/arg#date>
;
spl:
valueType
xsd:
date
]
;
spin:
returnType
xsd:
string
.
...
...
Please
register
or
login
to post a comment