David Price

Extended Drilling RD gen to start Object Properties, added 3 PropertySpace rd links to core

This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -13,6 +13,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 smf: <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spif: <http://spinrdf.org/spif#> .
@prefix spin: <http://spinrdf.org/spin#> .
......@@ -27,7 +28,7 @@
owl:Class
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0001 Set URI and designation for EHR RD Class"^^xsd:string ;
rdfs:comment "0110 Set URI and designation for EHR RD Class"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
......@@ -107,7 +108,7 @@ owl:Class
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/{?pcaid}>"
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "thisrduri"^^xsd:string
......@@ -125,7 +126,39 @@ owl:Class
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0003 Handle subclasses"^^xsd:string ;
rdfs:comment "0120 Set sameAs for RD items already in PCA RDL"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "rduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "same"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "seerd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:buildURI ;
sp:arg1 [ sp:varName "seerd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "rduri"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0130 Handle subclasses"^^xsd:string ;
sp:templates ([ sp:object ISO-15926-2_2003:Specialization ;
sp:predicate rdf:type ;
sp:subject
......@@ -183,7 +216,7 @@ owl:Class
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/{?pcaid}>"
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "specuri"^^xsd:string
......@@ -192,7 +225,7 @@ owl:Class
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0004 Set Part 2 Class of EHR RD Class"^^xsd:string ;
rdfs:comment "0140 Set Part 2 Class of EHR RD Class"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "p2class"^^xsd:string
] ;
......
......@@ -3,12 +3,13 @@
# imports: http://rds.posccaesar.org/2008/06/OWL/RDL-annotations
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/drilling
# imports: http://www.reportinghub.no/refdata/DrillingClasses
# imports: http://www.reportinghub.no/refdata/transform/class2rd
@prefix : <http://www.reportinghub.no/refdata/transform/objprop2rd#> .
@prefix ISO-15926-2_2003: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> .
@prefix RDL-annotations: <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
@prefix class2rd: <http://www.reportinghub.no/refdata/transform/class2rd#> .
@prefix drilling: <http://www.reportinghub.no/ep/schema/1.0/drilling#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
......@@ -20,15 +21,168 @@
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/ep/schema/core#PropertySpace>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0250 Set URI and designation for EHR Property Spaces Linked to PCA RD"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "same"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "seerd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 [ sp:varName "seerd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "thisrduri"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0251 Set URI and designation for EHR RD Property Spaces"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "desigation"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasDesignation> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "definition"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasDefinition> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "pcaid"^^xsd:string
] ;
sp:predicate <http://posccaesar.org/rdl/hasIdPCA> ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object ISO-15926-2_2003:PropertySpace ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/core#PropertySpace> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "same"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "seerd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
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.linkedmodel.org/schema/vaem#"
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ rdf:type afn:namespace ;
sp:arg1 spin:_this
] ;
sp:arg2 "http://www.w3.org/2004/02/skos/core#"
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "definition"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
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 "thisrduri"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:upper-case ;
sp:arg1 [ sp:varName "label"^^xsd:string
]
] ;
sp:variable
[ sp:varName "desigation"^^xsd:string
]
])
] .
<http://www.reportinghub.no/refdata/transform/objprop2rd>
rdf:type owl:Ontology ;
owl:imports <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/drilling> , <http://www.reportinghub.no/refdata/DrillingClasses> ;
owl:imports <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/drilling> , <http://www.reportinghub.no/refdata/transform/class2rd> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
owl:ObjectProperty
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0001 Set URI and designation for EHR RD from Object Property NOT Class of Indirect Property"^^xsd:string ;
rdfs:comment "0210 Set URI and designation for EHR RD from Object Property NOT Class of Indirect Property"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
......@@ -55,6 +209,11 @@ owl:ObjectProperty
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object ISO-15926-2_2003:ClassOfRelationship ;
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> ;
......@@ -121,7 +280,7 @@ owl:ObjectProperty
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/{?pcaid}>"
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "thisrduri"^^xsd:string
......@@ -139,7 +298,7 @@ owl:ObjectProperty
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0002 Set URI and designation for EHR RD from Object Property Class of Indirect Property"^^xsd:string ;
rdfs:comment "0220 Set URI and designation for EHR RD from Object Property Class of Indirect Property"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
......@@ -235,7 +394,7 @@ owl:ObjectProperty
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
sp:arg1 "<http://posccaesar.org/{?pcaid}>"
sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
] ;
sp:variable
[ sp:varName "thisrduri"^^xsd:string
......@@ -253,7 +412,7 @@ owl:ObjectProperty
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0004 Set Class of Indirect Property Possessor"^^xsd:string ;
rdfs:comment "0240 Set Class of Indirect Property Possessor"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "possessor"^^xsd:string
] ;
......@@ -283,4 +442,129 @@ owl:ObjectProperty
[ sp:varName "domain"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0260 Set Class of Indirect Property Property Space"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "space"^^xsd:string
] ;
sp:predicate ISO-15926-2_2003:hasPropertySpace ;
sp:subject
[ sp:varName "rdproperty"^^xsd:string
]
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/core#Class_of_indirect_property> ;
sp:predicate rdf:type ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "rdproperty"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "range"^^xsd:string
] ;
sp:predicate rdfs:range ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "space"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject
[ sp:varName "range"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "0270 Set Part 2 ClassOfRelation of EHR RD Object Property"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "p2class"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "domainrduri"^^xsd:string
] ;
sp:predicate
[ sp:varName "p2rel1"^^xsd:string
] ;
sp:subject
[ sp:varName "thisrduri"^^xsd:string
]
] [ sp:object
[ sp:varName "rangerduri"^^xsd:string
] ;
sp:predicate
[ sp:varName "p2rel2"^^xsd:string
] ;
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> ;
sp:predicate rdf:type ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "thisrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "domain"^^xsd:string
] ;
sp:predicate rdfs:domain ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "domainrduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject
[ sp:varName "domain"^^xsd:string
]
] [ sp:object
[ sp:varName "range"^^xsd:string
] ;
sp:predicate rdfs:range ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "rangerduri"^^xsd:string
] ;
sp:predicate owl:sameAs ;
sp:subject
[ sp:varName "range"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ rdf:type sp:TriplePath ;
sp:object <http://www.reportinghub.no/ep/schema/activity#Activity> ;
sp:path [ rdf:type sp:ModPath ;
sp:modMax -2 ;
sp:modMin 0 ;
sp:subPath rdfs:subClassOf
] ;
sp:subject
[ sp:varName "domain"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression ISO-15926-2_2003:ClassOfParticipation ;
sp:variable
[ sp:varName "p2class"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression ISO-15926-2_2003:hasClassOfWhole ;
sp:variable
[ sp:varName "p2rel1"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression ISO-15926-2_2003:hasClassOfPart ;
sp:variable
[ sp:varName "p2rel2"^^xsd:string
]
])
])
] .
......