David Price

Merge branch 'drilling-rdwed'

This diff could not be displayed because it is too large.
1 -SELECT DISTINCT ?RDLDesignation ?RDLDefinition ?EntityType ?RDLSuperclass ?ERHLocalname ?ERHOntology 1 +SELECT DISTINCT ?RDLDesignation ?RDLDefinition ?EntityType ?RDLSuperclass ?RDLSuperclassId ?ERHLocalname ?ERHOntology
2 WHERE { 2 WHERE {
3 ?s pca-rdl:hasDesignation ?RDLDesignation . 3 ?s pca-rdl:hasDesignation ?RDLDesignation .
4 ?s pca-rdl:hasDefinition ?RDLDefinition . 4 ?s pca-rdl:hasDefinition ?RDLDefinition .
...@@ -8,6 +8,7 @@ WHERE { ...@@ -8,6 +8,7 @@ WHERE {
8 ?spec ISO-15926-2_2003:hasSubclass ?s . 8 ?spec ISO-15926-2_2003:hasSubclass ?s .
9 ?spec ISO-15926-2_2003:hasSuperclass ?sup . 9 ?spec ISO-15926-2_2003:hasSuperclass ?sup .
10 ?sup pca-rdl:hasDesignation ?RDLSuperclass . 10 ?sup pca-rdl:hasDesignation ?RDLSuperclass .
11 + ?sup pca-rdl:hasIdPCA ?RDLSuperclassId .
11 } 12 }
12 13
13 ?erh owl:sameAs ?s . 14 ?erh owl:sameAs ?s .
......
1 +SELECT DISTINCT ?RDLDesignation ?RDLDefinition ?EntityType ?CoPossessor ?ERHLocalname ?ERHOntology
2 +WHERE {
3 + ?s pca-rdl:hasDesignation ?RDLDesignation .
4 + ?s ISO-15926-2_2003:hasClassOfPossessor ?CoPossessor .
5 + ?s pca-rdl:hasDefinition ?RDLDefinition .
6 + ?s rdf:type ?p2 .
7 + BIND (afn:localname(?p2) AS ?EntityType )
8 + OPTIONAL {
9 + ?spec ISO-15926-2_2003:hasSubclass ?s .
10 + ?spec ISO-15926-2_2003:hasSuperclass ?sup .
11 + ?sup pca-rdl:hasDesignation ?RDLSuperclass .
12 + ?sup pca-rdl:hasIdPCA ?RDLSuperclassId .
13 + }
14 +
15 + ?erh owl:sameAs ?s .
16 + BIND (afn:localname(?erh) AS ?ERHLocalname )
17 + BIND (afn:namespace(?erh) AS ?ERHOntology )
18 +}
...\ No newline at end of file ...\ No newline at end of file
...@@ -25,6 +25,225 @@ ...@@ -25,6 +25,225 @@
25 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> ; 25 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> ;
26 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 26 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
27 27
28 +rdfs:Class
29 + spin:rule
30 + [ rdf:type sp:Construct ;
31 + rdfs:comment "0180 Set URI and designation for EHR RD Class"^^xsd:string ;
32 + sp:templates ([ sp:object
33 + [ sp:varName "thisrduri"^^xsd:string
34 + ] ;
35 + sp:predicate owl:sameAs ;
36 + sp:subject spin:_this
37 + ] [ sp:object
38 + [ sp:varName "desigation"^^xsd:string
39 + ] ;
40 + sp:predicate <http://posccaesar.org/rdl/hasDesignation> ;
41 + sp:subject
42 + [ sp:varName "thisrduri"^^xsd:string
43 + ]
44 + ] [ sp:object
45 + [ sp:varName "definition"^^xsd:string
46 + ] ;
47 + sp:predicate <http://posccaesar.org/rdl/hasDefinition> ;
48 + sp:subject
49 + [ sp:varName "thisrduri"^^xsd:string
50 + ]
51 + ] [ sp:object
52 + [ sp:varName "pcaid"^^xsd:string
53 + ] ;
54 + sp:predicate <http://posccaesar.org/rdl/hasIdPCA> ;
55 + sp:subject
56 + [ sp:varName "thisrduri"^^xsd:string
57 + ]
58 + ] [ sp:object "RDFS Class" ;
59 + sp:predicate rdfs:comment ;
60 + sp:subject
61 + [ sp:varName "thisrduri"^^xsd:string
62 + ]
63 + ]) ;
64 + sp:where ([ rdf:type sp:NotExists ;
65 + sp:elements ([ sp:object owl:Class ;
66 + sp:predicate rdf:type ;
67 + sp:subject spin:_this
68 + ])
69 + ] [ rdf:type sp:NotExists ;
70 + sp:elements ([ sp:object
71 + [ sp:varName "same"^^xsd:string
72 + ] ;
73 + sp:predicate owl:sameAs ;
74 + sp:subject spin:_this
75 + ])
76 + ] [ rdf:type sp:NotExists ;
77 + sp:elements ([ sp:object
78 + [ sp:varName "seerd"^^xsd:string
79 + ] ;
80 + sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
81 + sp:subject spin:_this
82 + ])
83 + ] [ rdf:type sp:Filter ;
84 + sp:expression
85 + [ rdf:type sp:ne ;
86 + sp:arg1 [ rdf:type afn:namespace ;
87 + sp:arg1 spin:_this
88 + ] ;
89 + sp:arg2 "http://www.linkedmodel.org/schema/vaem#"
90 + ]
91 + ] [ sp:object
92 + [ sp:varName "definition"^^xsd:string
93 + ] ;
94 + sp:predicate rdfs:comment ;
95 + sp:subject spin:_this
96 + ] [ sp:object
97 + [ sp:varName "label"^^xsd:string
98 + ] ;
99 + sp:predicate rdfs:label ;
100 + sp:subject spin:_this
101 + ] [ rdf:type sp:Bind ;
102 + sp:expression
103 + [ rdf:type spif:generateUUID
104 + ] ;
105 + sp:variable
106 + [ sp:varName "uuid"^^xsd:string
107 + ]
108 + ] [ rdf:type sp:Bind ;
109 + sp:expression
110 + [ rdf:type fn:concat ;
111 + sp:arg1 "ERH" ;
112 + sp:arg2 [ sp:varName "uuid"^^xsd:string
113 + ]
114 + ] ;
115 + sp:variable
116 + [ sp:varName "pcaid"^^xsd:string
117 + ]
118 + ] [ rdf:type sp:Bind ;
119 + sp:expression
120 + [ rdf:type spif:buildURI ;
121 + sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
122 + ] ;
123 + sp:variable
124 + [ sp:varName "thisrduri"^^xsd:string
125 + ]
126 + ] [ rdf:type sp:Bind ;
127 + sp:expression
128 + [ rdf:type fn:upper-case ;
129 + sp:arg1 [ sp:varName "label"^^xsd:string
130 + ]
131 + ] ;
132 + sp:variable
133 + [ sp:varName "desigation"^^xsd:string
134 + ]
135 + ])
136 + ] ;
137 + spin:rule
138 + [ rdf:type sp:Construct ;
139 + rdfs:comment "0185 Handle subclasses"^^xsd:string ;
140 + sp:templates ([ sp:object ISO-15926-2_2003:Specialization ;
141 + sp:predicate rdf:type ;
142 + sp:subject
143 + [ sp:varName "specuri"^^xsd:string
144 + ]
145 + ] [ sp:object
146 + [ sp:varName "thisrduri"^^xsd:string
147 + ] ;
148 + sp:predicate ISO-15926-2_2003:hasSubclass ;
149 + sp:subject
150 + [ sp:varName "specuri"^^xsd:string
151 + ]
152 + ] [ sp:object
153 + [ sp:varName "superclassrduri"^^xsd:string
154 + ] ;
155 + sp:predicate ISO-15926-2_2003:hasSuperclass ;
156 + sp:subject
157 + [ sp:varName "specuri"^^xsd:string
158 + ]
159 + ]) ;
160 + sp:where ([ rdf:type sp:NotExists ;
161 + sp:elements ([ sp:object owl:Class ;
162 + sp:predicate rdf:type ;
163 + sp:subject spin:_this
164 + ])
165 + ] [ sp:object
166 + [ sp:varName "superclass"^^xsd:string
167 + ] ;
168 + sp:predicate rdfs:subClassOf ;
169 + sp:subject spin:_this
170 + ] [ sp:object
171 + [ sp:varName "thisrduri"^^xsd:string
172 + ] ;
173 + sp:predicate owl:sameAs ;
174 + sp:subject spin:_this
175 + ] [ sp:object
176 + [ sp:varName "superclassrduri"^^xsd:string
177 + ] ;
178 + sp:predicate owl:sameAs ;
179 + sp:subject
180 + [ sp:varName "superclass"^^xsd:string
181 + ]
182 + ] [ rdf:type sp:Bind ;
183 + sp:expression
184 + [ rdf:type spif:generateUUID
185 + ] ;
186 + sp:variable
187 + [ sp:varName "uuid"^^xsd:string
188 + ]
189 + ] [ rdf:type sp:Bind ;
190 + sp:expression
191 + [ rdf:type fn:concat ;
192 + sp:arg1 "ERH" ;
193 + sp:arg2 [ sp:varName "uuid"^^xsd:string
194 + ]
195 + ] ;
196 + sp:variable
197 + [ sp:varName "pcaid"^^xsd:string
198 + ]
199 + ] [ rdf:type sp:Bind ;
200 + sp:expression
201 + [ rdf:type spif:buildURI ;
202 + sp:arg1 "<http://posccaesar.org/rdl/{?pcaid}>"
203 + ] ;
204 + sp:variable
205 + [ sp:varName "specuri"^^xsd:string
206 + ]
207 + ])
208 + ] ;
209 + spin:rule
210 + [ rdf:type sp:Construct ;
211 + rdfs:comment "0190 Set sameAs for RD items already in PCA RDL"^^xsd:string ;
212 + sp:templates ([ sp:object
213 + [ sp:varName "rduri"^^xsd:string
214 + ] ;
215 + sp:predicate owl:sameAs ;
216 + sp:subject spin:_this
217 + ]) ;
218 + sp:where ([ rdf:type sp:NotExists ;
219 + sp:elements ([ sp:object owl:Class ;
220 + sp:predicate rdf:type ;
221 + sp:subject spin:_this
222 + ])
223 + ] [ rdf:type sp:NotExists ;
224 + sp:elements ([ sp:object
225 + [ sp:varName "same"^^xsd:string
226 + ] ;
227 + sp:predicate owl:sameAs ;
228 + sp:subject spin:_this
229 + ])
230 + ] [ sp:object
231 + [ sp:varName "seerd"^^xsd:string
232 + ] ;
233 + sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ;
234 + sp:subject spin:_this
235 + ] [ rdf:type sp:Bind ;
236 + sp:expression
237 + [ rdf:type smf:buildURI ;
238 + sp:arg1 [ sp:varName "seerd"^^xsd:string
239 + ]
240 + ] ;
241 + sp:variable
242 + [ sp:varName "rduri"^^xsd:string
243 + ]
244 + ])
245 + ] .
246 +
28 owl:Class 247 owl:Class
29 spin:rule 248 spin:rule
30 [ rdf:type sp:Construct ; 249 [ rdf:type sp:Construct ;
......