Skip to content

Commit 711f72e

Browse files
authored
Merge pull request #34 from kg-construct/test-cases
Update of test cases
2 parents 64d5ca8 + abb4498 commit 711f72e

83 files changed

Lines changed: 3319 additions & 46 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
__pycache__
44
.DS_Store
55
.mypy_cache
6+
test-cases/extract_data.py

test-cases/RMLSTARTC001a/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
```
1111
c1,c2,c3
1212
b0,o,ABC
13+
1314
```
1415

1516
**Mapping**

test-cases/RMLSTARTC001a/data.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
c1,c2,c3
2+
b0,o,ABC
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
2+
@prefix rml: <http://w3id.org/rml/> .
3+
@prefix ex: <http://example/> .
4+
@prefix : <http://example.org/> .
5+
@base <http://example.org/> .
6+
7+
:firstTM a rml:AssertedTriplesMap ;
8+
rml:logicalSource [
9+
rml:source [ a rml:Source, rml:RelativePathSource;
10+
rml:path "data.csv";
11+
];
12+
rml:referenceFormulation rml:CSV
13+
];
14+
rml:subjectMap [
15+
rml:reference "c1" ;
16+
rml:termType rml:BlankNode
17+
];
18+
rml:predicateObjectMap [
19+
rml:predicate ex:p ;
20+
rml:objectMap [
21+
rml:template "http://example/{c2}"
22+
]
23+
] .
24+
25+
:secondTM a rml:AssertedTriplesMap ;
26+
rml:logicalSource [
27+
rml:source [ a rml:Source, rml:RelativePathSource;
28+
rml:path "data.csv";
29+
];
30+
rml:referenceFormulation rml:CSV
31+
];
32+
rml:subjectMap [
33+
rml:quotedTriplesMap :firstTM
34+
];
35+
rml:predicateObjectMap [
36+
rml:predicate ex:q ;
37+
rml:objectMap [
38+
rml:reference "c3"
39+
]
40+
] .

test-cases/RMLSTARTC001a/output.nt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_:b0 <http://example/p> <http://example/o> .
2+
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .

test-cases/RMLSTARTC001b/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ b0,o,1
1515

1616
**Input 1**
1717
```
18+
**Input 1**
1819
c2-1,c2-2
1920
ABC,1
2021

test-cases/RMLSTARTC001b/data1.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
c1-1,c1-2,c1-3
2+
b0,o,1

test-cases/RMLSTARTC001b/data2.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**Input 1**
2+
c2-1,c2-2
3+
ABC,1
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
2+
@prefix rml: <http://w3id.org/rml/> .
3+
@prefix ex: <http://example/> .
4+
@prefix : <http://example.org/> .
5+
@base <http://example.org/> .
6+
7+
:firstTM a rml:AssertedTriplesMap ;
8+
rml:logicalSource [
9+
rml:source [ a rml:Source, rml:RelativePathSource;
10+
rml:path "data1.csv";
11+
];
12+
rml:referenceFormulation rml:CSV
13+
];
14+
rml:subjectMap [
15+
rml:reference "c1-1" ;
16+
rml:termType rml:BlankNode
17+
];
18+
rml:predicateObjectMap [
19+
rml:predicate ex:p ;
20+
rml:objectMap [
21+
rml:template "http://example/{c1-2}"
22+
]
23+
] .
24+
25+
:secondTM a rml:AssertedTriplesMap ;
26+
rml:logicalSource [
27+
rml:source [ a rml:Source, rml:RelativePathSource;
28+
rml:path "data2.csv";
29+
];
30+
rml:referenceFormulation rml:CSV
31+
];
32+
rml:subjectMap [
33+
rml:quotedTriplesMap :firstTM ;
34+
rml:joinCondition [
35+
rml:child "c2-2" ;
36+
rml:parent "c1-3" ;
37+
];
38+
];
39+
rml:predicateObjectMap [
40+
rml:predicate ex:q ;
41+
rml:objectMap [
42+
rml:reference "c2-1"
43+
]
44+
] .

test-cases/RMLSTARTC001b/output.nt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
_:b0 <http://example/p> <http://example/o> .
2+
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .

0 commit comments

Comments
 (0)