File tree Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 32
32
];
33
33
rr:subjectMap [
34
34
a rr:SubjectMap;
35
- rr:template " ecfo_instance: CF_{id}" ;
35
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ CF_{id}" ;
36
36
];
37
37
rr:predicateObjectMap [
38
38
rr:predicateMap [
172
172
];
173
173
rr:objectMap [
174
174
a rr:ObjectMap;
175
- rr:template " ecfo_instance: applicablePeriod/{valid_from}/{valid_to}" ;
175
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ applicablePeriod/{valid_from}/{valid_to}" ;
176
176
rr:termType rr:IRI
177
177
];
178
178
];
265
265
];
266
266
rr:subjectMap [
267
267
a rr:SubjectMap;
268
- rr:template " ecfo_instance: applicablePeriod/{valid_from}/{valid_to}/start" ;
268
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ applicablePeriod/{valid_from}/{valid_to}/start" ;
269
269
];
270
270
rr:predicateObjectMap [
271
271
rr:predicateMap [
299
299
];
300
300
rr:subjectMap [
301
301
a rr:SubjectMap;
302
- rr:template " ecfo_instance: applicablePeriod/{valid_from}/{valid_to}/end" ;
302
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ applicablePeriod/{valid_from}/{valid_to}/end" ;
303
303
];
304
304
rr:predicateObjectMap [
305
305
rr:predicateMap [
333
333
];
334
334
rr:subjectMap [
335
335
a rr:SubjectMap;
336
- rr:template " ecfo_instance: applicablePeriod/{valid_from}/{valid_to}" ;
336
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ applicablePeriod/{valid_from}/{valid_to}" ;
337
337
];
338
338
rr:predicateObjectMap [
339
339
rr:predicateMap [
352
352
];
353
353
rr:objectMap [
354
354
a rr:ObjectMap;
355
- rr:template " ecfo_instance: applicablePeriod/{valid_from}/{valid_to}/start" ;
355
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ applicablePeriod/{valid_from}/{valid_to}/start" ;
356
356
rr:termType rr:IRI
357
357
];
358
358
];
363
363
];
364
364
rr:objectMap [
365
365
a rr:ObjectMap;
366
- rr:template " ecfo_instance: applicablePeriod/{valid_from}/{valid_to}/end" ;
366
+ rr:template " https://w3id.org/ecfkg/i/UK/BEIS/2016/ applicablePeriod/{valid_from}/{valid_to}/end" ;
367
367
rr:termType rr:IRI
368
368
];
369
369
].
Original file line number Diff line number Diff line change @@ -46,5 +46,5 @@ mappings:
46
46
s : http://example.com/Patient/$(ID)
47
47
po :
48
48
- [rdf:type, foaf:Person]
49
- - [http://example.com/ $(last_name), $(LastName), xsd:string]
49
+ - [ex: $(last_name), $(LastName), xsd:string]
50
50
- [ex:height, http://example.com/$(Height)]
Original file line number Diff line number Diff line change 6
6
7
7
__name__ = "INVERSETC-0005 based on YARRRMLTC-0013"
8
8
9
-
10
9
import os
11
10
from ruamel .yaml import YAML
12
11
import yatter
13
12
from rdflib .graph import Graph
14
13
from deepdiff import DeepDiff
14
+
15
15
R2RML_URI = 'http://www.w3.org/ns/r2rml#'
16
16
17
17
@@ -21,12 +21,14 @@ def test_inversetc0005():
21
21
expected_mapping = yaml .load (file )
22
22
23
23
input_mapping = Graph ()
24
- mapping_path = input_mapping .parse (os .path .join (os .path .dirname (os .path .realpath (__file__ )), 'mapping.ttl' ), format = "ttl" )
24
+ mapping_path = input_mapping .parse (os .path .join (os .path .dirname (os .path .realpath (__file__ )), 'mapping.ttl' ),
25
+ format = "ttl" )
25
26
translated_mapping = yaml .load (str (yatter .inverse_translation (mapping_path , mapping_format = R2RML_URI )))
26
27
27
28
ddiff = DeepDiff (expected_mapping ['mappings' ], translated_mapping ['mappings' ], ignore_order = True )
28
-
29
+ print (expected_mapping ['mappings' ])
30
+ print (translated_mapping ['mappings' ])
29
31
if ddiff :
30
32
assert False
31
33
else :
32
- assert True
34
+ assert True
You can’t perform that action at this time.
0 commit comments