David Price

Delivery of Production RD and Ontologies complete

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
@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 visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
<http://spinrdf.org/spin#topSPINOptions>
"singlePass" ;
composite:index "0"^^xsd:int
] .
# 100 CLASS uri, des, id and def
CONSTRUCT {
?rduri a ?p2uri .
?rduri pca-rdl:hasDesignation ?des .
?rduri pca-rdl:hasDefinition ?def .
?rduri pca-rdl:hasIdPCA ?rdlid .
?ontitemuri owl:sameAs ?rduri .
?specuri a p2:Specialization .
?specuri p2:hasSuperclass ?superuri .
?specuri p2:hasSubclass ?rduri .
}
WHERE {
?this erh-drilling-rd-classes:eRHLocalname ?localname .
?this erh-drilling-rd-classes:eRHOntology ?ont .
BIND (fn:concat(?ont, ?localname) AS ?ontitem) .
BIND (spif:buildURI(?ontitem) AS ?ontitemuri) .
NOT EXISTS {
?ontitemuri owl:sameAs ?anything .
} .
?this erh-drilling-rd-classes:rDId ?rdlid .
?this erh-drilling-rd-classes:rDURI ?rduristr .
BIND (smf:buildURI(?rduristr) AS ?rduri) .
?this erh-drilling-rd-classes:RDDesignation ?des .
?this erh-drilling-rd-classes:rDDefinition ?def .
?this erh-drilling-rd-classes:entityType ?p2name .
BIND (fn:concat("http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#", ?p2name) AS ?p2thing) .
BIND (smf:buildURI(?p2thing) AS ?p2uri) .
OPTIONAL {
?this erh-drilling-rd-classes:rDSuperclassURI ?super .
BIND (smf:buildURI(?super) AS ?superuri) .
BIND (spif:generateUUID() AS ?specuuid) .
BIND (fn:concat("ERH", ?specuuid) AS ?specid) .
BIND (spif:buildURI("<http://posccaesar.org/rdl/{?specid}>") AS ?specuri) .
} .
}
# 100 CLASS uri, des, id and def
CONSTRUCT {
?rduri a ?p2uri .
?rduri pca-rdl:hasDesignation ?des .
?rduri pca-rdl:hasDefinition ?def .
?rduri pca-rdl:hasIdPCA ?rdlid .
}
WHERE {
?this erh-drilling-rd-classes:rDId ?rdlid .
?this erh-drilling-rd-classes:rDURI ?rduristr .
BIND (smf:buildURI(?rduristr) AS ?rduri) .
?this erh-drilling-rd-classes:RDDesignation ?des .
?this erh-drilling-rd-classes:rDDefinition ?def .
?this erh-drilling-rd-classes:entityType ?p2name .
BIND (fn:concat("http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#", ?p2name) AS ?p2thing) .
BIND (smf:buildURI(?p2thing) AS ?p2uri) .
}
# 200 CLASS subclasses
CONSTRUCT {
?specuri a p2:Specialization .
?specuri p2:hasSuperclass ?superuri .
?specuri p2:hasSubclass ?rduri .
}
WHERE {
?this a erh-drilling-rd-classes:erh-drilling-rd-classes .
?this erh-drilling-rd-classes:rDSuperclassURI ?super .
BIND (smf:buildURI(?super) AS ?superuri) .
?this erh-drilling-rd-classes:rDURI ?rduristr .
BIND (smf:buildURI(?rduristr) AS ?rduri) .
BIND (spif:generateUUID() AS ?specuuid) .
BIND (fn:concat("ERH", ?specuuid) AS ?specid) .
BIND (spif:buildURI("<http://posccaesar.org/rdl/{?specid}>") AS ?specuri) .
}
# 300 Class SAME AS
CONSTRUCT {
?ontitemuri owl:sameAs ?rduri .
}
WHERE {
?this a erh-drilling-rd-classes:erh-drilling-rd-classes .
?this erh-drilling-rd-classes:eRHLocalname ?localname .
?this erh-drilling-rd-classes:eRHOntology ?ont .
BIND (fn:concat(?ont, ?localname) AS ?ontitem) .
BIND (spif:buildURI(?ontitem) AS ?ontitemuri) .
?this erh-drilling-rd-classes:rDURI ?rduristr .
BIND (smf:buildURI(?rduristr) AS ?rduri) .
}
\ No newline at end of file
......@@ -41,11 +41,6 @@ owl:DatatypeProperty
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
......
......@@ -55,11 +55,6 @@ owl:DatatypeProperty
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#ClassOfClassOfRepresentation> ;
sp:predicate rdf:type ;
sp:subject
......@@ -239,4 +234,110 @@ owl:DatatypeProperty
[ sp:varName "domain"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0395 Handle classification of RD property as ERH Class"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassified> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00001> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
] ;
sp:variable
[ sp:varName "uuid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "ERH" ;
sp:arg2 [ sp:varName "uuid"^^xsd:string
]
] ;
sp:variable
[ sp:varName "pcaid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "clsnuri"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0395 Handle classification of RD property as ERH Thing"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassified> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
] ;
sp:variable
[ sp:varName "uuid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "ERH" ;
sp:arg2 [ sp:varName "uuid"^^xsd:string
]
] ;
sp:variable
[ sp:varName "pcaid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "clsnuri"^^xsd:string
]
])
] .
......
# baseURI: http://www.reportinghub.no/refdata/transform/make-rd-prod
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/refdata/drilling
# imports: http://www.reportinghub.no/refdata/1.0/production
# imports: http://www.reportinghub.no/refdata/foundation
# imports: http://www.reportinghub.no/refdata/npdfacts
# imports: http://www.reportinghub.no/refdata/production
# imports: http://www.reportinghub.no/refdata/transform/class2rd-prod
# imports: http://www.reportinghub.no/refdata/transform/datprop2rd-prod
# imports: http://www.reportinghub.no/refdata/transform/objprop2rd-prod
@prefix : <http://www.reportinghub.no/refdata/transform/make-rd-prod#> .
@prefix class2rd-prod: <http://www.reportinghub.no/refdata/transform/class2rd-prod#> .
......@@ -18,5 +18,5 @@
<http://www.reportinghub.no/refdata/transform/make-rd-prod>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/refdata/drilling> , <http://www.reportinghub.no/refdata/foundation> , <http://www.reportinghub.no/refdata/npdfacts> , <http://www.reportinghub.no/refdata/production> , <http://www.reportinghub.no/refdata/transform/class2rd-prod> ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/refdata/1.0/production> , <http://www.reportinghub.no/refdata/foundation> , <http://www.reportinghub.no/refdata/transform/class2rd-prod> , <http://www.reportinghub.no/refdata/transform/datprop2rd-prod> , <http://www.reportinghub.no/refdata/transform/objprop2rd-prod> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
# baseURI: http://www.reportinghub.no/refdata/transform/objprop2rd-prod
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/refdata/transform/objprop2rd
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix objprop2rd: <http://www.reportinghub.no/refdata/transform/objprop2rd#> .
@prefix objprop2rd-prod: <http://www.reportinghub.no/refdata/transform/objprop2rd-prod#> .
@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 sp: <http://spinrdf.org/sp#> .
@prefix spif: <http://spinrdf.org/spif#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/refdata/transform/objprop2rd-prod>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/refdata/transform/objprop2rd> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
owl:ObjectProperty
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0395 Handle classification of RD property as Production"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassified> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00004> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
] ;
sp:variable
[ sp:varName "uuid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "ERH" ;
sp:arg2 [ sp:varName "uuid"^^xsd:string
]
] ;
sp:variable
[ sp:varName "pcaid"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "clsnuri"^^xsd:string
]
])
] .
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
@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 visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
composite:index "0"^^xsd:int
] .
......@@ -202,11 +202,6 @@ owl:ObjectProperty
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/core#Class_of_indirect_property> ;
......@@ -307,11 +302,6 @@ owl:ObjectProperty
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/core#Class_of_indirect_property> ;
sp:predicate rdf:type ;
......@@ -444,7 +434,7 @@ owl:ObjectProperty
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0270 Set Part 2 ClassOfRelation of EHR RD Object Property"^^xsd:string ;
rdfs:comment "0270 Set Part 2 ClassOfRelation of ERH RD Object Property"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "p2class"^^xsd:string
] ;
......@@ -536,7 +526,7 @@ owl:ObjectProperty
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0310 Handle classification of RD object properties as NPD"^^xsd:string ;
rdfs:comment "0395 Handle classification of RD property as ERH Class"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
......@@ -549,30 +539,17 @@ owl:ObjectProperty
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00002> ;
] [ sp:object <http://posccaesar.org/rdl/ERH00001> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:eq ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.reportinghub.no/np/schema/npd#"
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
......@@ -602,7 +579,7 @@ owl:ObjectProperty
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0311 Handle classification of RD classes as Drilling"^^xsd:string ;
rdfs:comment "0395 Handle classification of RD property as ERH Thing"^^xsd:string ;
sp:templates ([ sp:object <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#Classification> ;
sp:predicate rdf:type ;
sp:subject
......@@ -615,13 +592,8 @@ owl:ObjectProperty
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00003> ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
] [ sp:object <http://posccaesar.org/rdl/ERH00000> ;
sp:predicate rdf:type ;
sp:predicate <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#hasClassifier> ;
sp:subject
[ sp:varName "clsnuri"^^xsd:string
]
......@@ -631,14 +603,6 @@ owl:ObjectProperty
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.reportinghub.no/np/schema/npd#"
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:generateUUID
......