Skip to content

Commit 5f7b531

Browse files
authored
Merge pull request #255 from jduchateau/patch-1
Fix RMLTC-0002g-JSON and RMLTC-0002e-JSON
2 parents 8235737 + c67bffe commit 5f7b531

8 files changed

Lines changed: 4941 additions & 76 deletions

File tree

test-cases/RMLTC0002e-JSON/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
];
3636
rml:predicateObjectMap [
3737
rml:objectMap [
38-
rml:reference "$.IDs"
38+
rml:reference "$.ID"
3939
];
4040
rml:predicate ex:id
4141
];

test-cases/RMLTC0002e-JSON/mapping.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
];
1313
rml:predicateObjectMap [
1414
rml:objectMap [
15-
rml:reference "$.IDs"
15+
rml:reference "$.ID"
1616
];
1717
rml:predicate ex:id
1818
];

test-cases/RMLTC0002g-JSON/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
rml:referenceFormulation rml:JSONPath;
3131
rml:source [ a rml:RelativePathSource;
3232
rml:root rml:MappingDirectory;
33-
rml:path "student2.json"
33+
rml:path "student.json"
3434
]
3535
];
3636
rml:predicateObjectMap [

test-cases/RMLTC0002g-JSON/mapping.ttl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
rml:referenceFormulation rml:JSONPath;
88
rml:source [ a rml:RelativePathSource;
99
rml:root rml:MappingDirectory;
10-
rml:path "student2.json"
10+
rml:path "student.json"
1111
]
1212
];
1313
rml:predicateObjectMap [
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## RMLTC0012e-JSON
2+
3+
**Title**: "Blank node as subject"
4+
5+
**Description**: "Test a subjectMap with termType BlankNode without expressionMap"
6+
7+
**Default Base IRI**: http://example.com/
8+
9+
**Error expected?** No
10+
11+
**Mapping**
12+
```
13+
@prefix rml: <http://w3id.org/rml/> .
14+
@prefix : <http://example.org/> .
15+
16+
:jsonSource a rml:LogicalSource ;
17+
rml:source [
18+
a rml:RelativePathSource , rml:Source ;
19+
rml:root rml:MappingDirectory ;
20+
rml:path "people.json" ;
21+
] ;
22+
rml:referenceFormulation rml:JSONPath ;
23+
rml:iterator "$[*]" .
24+
25+
:triplesMapPerson a rml:TriplesMap ;
26+
rml:logicalSource :jsonSource ;
27+
rml:subjectMap [
28+
rml:termType rml:BlankNode ;
29+
] ;
30+
rml:predicateObjectMap [
31+
rml:predicate :firstName ;
32+
rml:objectMap [
33+
rml:reference "firstName" ;
34+
] ;
35+
];
36+
rml:predicateObjectMap [
37+
rml:predicate :lastName ;
38+
rml:objectMap [
39+
rml:reference "lastName" ;
40+
] ;
41+
] .
42+
```
43+
44+
**Output**
45+
```
46+
_:Blank1 <http://example.org/firstName> "Alice" .
47+
_:Blank1 <http://example.org/lastName> "Smith" .
48+
_:Blank2 <http://example.org/firstName> "Bob" .
49+
_:Blank2 <http://example.org/lastName> "Jones" .
50+
```
51+

0 commit comments

Comments
 (0)