Skip to content

Commit 83becaf

Browse files
authored
Merge pull request #252 from kg-construct/issue251
fixes issue #251
2 parents a13d83a + f0a5ceb commit 83becaf

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
@prefix rml: <http://w3id.org/rml/> .
2+
@prefix : <http://example.org/> .
3+
4+
:jsonSource a rml:LogicalSource ;
5+
rml:source [
6+
a rml:RelativePathSource , rml:Source ;
7+
rml:root rml:MappingDirectory ;
8+
rml:path "people.json" ;
9+
] ;
10+
rml:referenceFormulation rml:JSONPath ;
11+
rml:iterator "$[*]" .
12+
13+
:triplesMapPerson a rml:TriplesMap ;
14+
rml:logicalSource :jsonSource ;
15+
rml:subjectMap [
16+
rml:termType rml:BlankNode ;
17+
] ;
18+
rml:predicateObjectMap [
19+
rml:predicate :firstName ;
20+
rml:objectMap [
21+
rml:reference "firstName" ;
22+
] ;
23+
];
24+
rml:predicateObjectMap [
25+
rml:predicate :lastName ;
26+
rml:objectMap [
27+
rml:reference "lastName" ;
28+
] ;
29+
] .
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
_:Blank1 <http://example.org/firstName> "Alice" .
2+
_:Blank1 <http://example.org/lastName> "Smith" .
3+
_:Blank2 <http://example.org/firstName> "Bob" .
4+
_:Blank2 <http://example.org/lastName> "Jones" .
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
{"firstName": "Alice", "lastName": "Smith"},
3+
{"firstName": "Bob", "lastName":"Jones" }
4+
]

test-cases/descriptions.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ RMLTC0012a-JSON,Blank node referencing multiple columns,Tests that blank nodes c
3232
RMLTC0012b-JSON,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.
3333
RMLTC0012c-JSON,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap."
3434
RMLTC0012d-JSON,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap."
35+
RMLTC0012e-JSON,Blank node as subject,"Test a subjectMap with termType BlankNode without expressionMap"
3536
RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly.
3637
RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information
3738
RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error"

0 commit comments

Comments
 (0)