Skip to content

Commit 4063527

Browse files
test-cases: add HTML view
1 parent 3d1f902 commit 4063527

File tree

340 files changed

+44221
-0
lines changed

Some content is hidden

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

340 files changed

+44221
-0
lines changed

test-cases/RMLTC0000-CSV/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# RMLTC0000-CSV
2+
3+
**Title**: "one table, one column, zero rows"
4+
5+
**Description**: "Tests if an empty table produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
Name
12+
13+
```
14+
15+
**Mapping**
16+
```
17+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
18+
@prefix rml: <http://w3id.org/rml/> .
19+
20+
<http://example.com/base/TriplesMap1> a rml:TriplesMap;
21+
rml:logicalSource [ a rml:LogicalSource;
22+
rml:referenceFormulation rml:CSV;
23+
rml:source [ a rml:RelativePathSource;
24+
rml:root rml:MappingDirectory;
25+
rml:path "student.csv"
26+
]
27+
];
28+
rml:predicateObjectMap [
29+
rml:objectMap [
30+
rml:reference "Name"
31+
];
32+
rml:predicate foaf:name
33+
];
34+
rml:subjectMap [
35+
rml:template "http://example.com/{Name}"
36+
] .
37+
38+
```
39+
40+
**Output**
41+
```
42+
# empty database
43+
44+
```
45+

test-cases/RMLTC0000-JSON/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# RMLTC0000-JSON
2+
3+
**Title**: "one table, one column, zero rows"
4+
5+
**Description**: "Tests if an empty table produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
{
12+
"students": []
13+
}
14+
15+
```
16+
17+
**Mapping**
18+
```
19+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
20+
@prefix rml: <http://w3id.org/rml/> .
21+
22+
<http://example.com/base/TriplesMap1> a rml:TriplesMap;
23+
rml:logicalSource [ a rml:LogicalSource;
24+
rml:iterator "$.students[*]";
25+
rml:referenceFormulation rml:JSONPath;
26+
rml:source [ a rml:RelativePathSource;
27+
rml:root rml:MappingDirectory;
28+
rml:path "student.json"
29+
]
30+
];
31+
rml:predicateObjectMap [
32+
rml:objectMap [
33+
rml:reference "$.Name"
34+
];
35+
rml:predicate foaf:name
36+
];
37+
rml:subjectMap [
38+
rml:template "http://example.com/{$.Name}"
39+
] .
40+
41+
```
42+
43+
**Output**
44+
```
45+
# empty database
46+
47+
```
48+

test-cases/RMLTC0000-MySQL/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# RMLTC0000-MySQL
2+
3+
**Title**: "one table, one column, zero rows"
4+
5+
**Description**: "Tests if an empty table produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
USE test;
12+
DROP TABLE IF EXISTS test.student;
13+
CREATE TABLE student (
14+
Name VARCHAR(50)
15+
);
16+
```
17+
18+
**Mapping**
19+
```
20+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
21+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
22+
@prefix rml: <http://w3id.org/rml/> .
23+
24+
<http://example.com/base/TriplesMap1> a rml:TriplesMap;
25+
rml:logicalSource [
26+
rml:source <http://example.com/base/#DB_source>;
27+
rml:referenceFormulation rml:SQL2008Table;
28+
rml:iterator "student"
29+
];
30+
rml:predicateObjectMap [
31+
rml:objectMap [
32+
rml:reference "Name"
33+
];
34+
rml:predicate foaf:name
35+
];
36+
rml:subjectMap [
37+
rml:template "http://example.com/{Name}"
38+
] .
39+
40+
<http://example.com/base/#DB_source> a d2rq:Database;
41+
d2rq:jdbcDSN "CONNECTIONDSN";
42+
d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
43+
d2rq:password "";
44+
d2rq:username "root" .
45+
46+
```
47+
48+
**Output**
49+
```
50+
# empty database
51+
52+
```
53+
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# RMLTC0000-PostgreSQL
2+
3+
**Title**: "one table, one column, zero rows"
4+
5+
**Description**: "Tests if an empty table produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
DROP TABLE IF EXISTS student CASCADE ;
12+
CREATE TABLE student (
13+
"Name" VARCHAR(50)
14+
);
15+
```
16+
17+
**Mapping**
18+
```
19+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
20+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
21+
@prefix rml: <http://w3id.org/rml/> .
22+
23+
<http://example.com/base/TriplesMap1> a rml:TriplesMap;
24+
rml:logicalSource [
25+
rml:source <http://example.com/base/#DB_source>;
26+
rml:referenceFormulation rml:SQL2008Table;
27+
rml:iterator "student"
28+
];
29+
rml:predicateObjectMap [
30+
rml:objectMap [
31+
rml:reference "Name"
32+
];
33+
rml:predicate foaf:name
34+
];
35+
rml:subjectMap [
36+
rml:template "http://example.com/{Name}"
37+
] .
38+
39+
<http://example.com/base/#DB_source> a d2rq:Database;
40+
d2rq:jdbcDSN "CONNECTIONDSN";
41+
d2rq:jdbcDriver "org.postgresql.Driver";
42+
d2rq:password "";
43+
d2rq:username "postgres" .
44+
45+
```
46+
47+
**Output**
48+
```
49+
# empty database
50+
51+
```
52+

test-cases/RMLTC0000-SPARQL/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# RMLTC0000-SPARQL
2+
3+
**Title**: "Empty dataset"
4+
5+
**Description**: "Test if an empty dataset produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
12+
13+
```
14+
15+
**Mapping**
16+
```
17+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
18+
@prefix formats: <http://www.w3.org/ns/formats/> .
19+
@prefix rml: <http://w3id.org/rml/> .
20+
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
21+
22+
<http://example.com/base#Country> rml:logicalSource [
23+
rml:iterator """
24+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
25+
SELECT ?name
26+
WHERE {
27+
?name a rdfs:Literal .
28+
} """;
29+
rml:referenceFormulation formats:SPARQL_Results_JSON;
30+
rml:source <http://example.com/base#InputSPARQL>
31+
];
32+
rml:predicateObjectMap [
33+
rml:objectMap [
34+
rml:reference "name.value"
35+
];
36+
rml:predicate foaf:name
37+
];
38+
rml:subjectMap [
39+
rml:template "http://example.com/{name.value}"
40+
] .
41+
42+
<http://example.com/base#InputSPARQL> a sd:Service;
43+
sd:endpoint <http://HOST:PORT/ds1/sparql>;
44+
sd:supportedLanguage sd:SPARQL11Query .
45+
46+
```
47+
48+
**Output**
49+
```
50+
51+
```
52+
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# RMLTC0000-SQLServer
2+
3+
**Title**: "one table, one column, zero rows"
4+
5+
**Description**: "Tests if an empty table produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
USE TestDB;
12+
EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
13+
EXEC sp_msforeachtable 'DROP TABLE ?'
14+
15+
CREATE TABLE student (
16+
"Name" VARCHAR(50)
17+
);
18+
19+
```
20+
21+
**Mapping**
22+
```
23+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
24+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
25+
@prefix rml: <http://w3id.org/rml/> .
26+
27+
<http://example.com/base/TriplesMap1> a rml:TriplesMap;
28+
rml:logicalSource [
29+
rml:source <http://example.com/base/#DB_source>;
30+
rml:referenceFormulation rml:SQL2008Table;
31+
rml:iterator "student"
32+
];
33+
rml:predicateObjectMap [
34+
rml:objectMap [
35+
rml:reference "Name"
36+
];
37+
rml:predicate foaf:name
38+
];
39+
rml:subjectMap [
40+
rml:template "http://example.com/{Name}"
41+
] .
42+
43+
<http://example.com/base/#DB_source> a d2rq:Database;
44+
d2rq:jdbcDSN "CONNECTIONDSN";
45+
d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
46+
d2rq:password "YourSTRONG!Passw0rd;";
47+
d2rq:username "sa" .
48+
49+
```
50+
51+
**Output**
52+
```
53+
# empty database
54+
55+
```
56+

test-cases/RMLTC0000-XML/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# RMLTC0000-XML
2+
3+
**Title**: "one table, one column, zero rows"
4+
5+
**Description**: "Tests if an empty table produces an empty RDF graph"
6+
7+
**Error expected?** Yes
8+
9+
**Input**
10+
```
11+
<?xml version="1.0"?>
12+
13+
<students>
14+
15+
</students>
16+
17+
```
18+
19+
**Mapping**
20+
```
21+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
22+
@prefix rml: <http://w3id.org/rml/> .
23+
24+
<http://example.com/base/TriplesMap1> a rml:TriplesMap;
25+
rml:logicalSource [ a rml:LogicalSource;
26+
rml:iterator "/students/student";
27+
rml:referenceFormulation rml:XPath;
28+
rml:source [ a rml:RelativePathSource;
29+
rml:root rml:MappingDirectory;
30+
rml:path "student.xml"
31+
]
32+
];
33+
rml:predicateObjectMap [
34+
rml:objectMap [
35+
rml:reference "Name"
36+
];
37+
rml:predicate foaf:name
38+
];
39+
rml:subjectMap [
40+
rml:template "http://example.com/{Name}"
41+
] .
42+
43+
```
44+
45+
**Output**
46+
```
47+
# empty database
48+
49+
```
50+

0 commit comments

Comments
 (0)