Skip to content

Commit

Permalink
test-cases: update HTML view
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVanAssche committed Feb 17, 2025
1 parent d858015 commit 198708d
Show file tree
Hide file tree
Showing 9 changed files with 366 additions and 110 deletions.
2 changes: 1 addition & 1 deletion test-cases/RMLSTC0006a/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## RMLSTC0006f
## RMLSTC0006a

**Title**: Source with D2RQ access description

Expand Down
21 changes: 8 additions & 13 deletions test-cases/RMLSTC0006b/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## RMLSTC0006f
## RMLSTC0006b

**Title**: Source with D2RQ access description
**Title**: Source with a Relative Path Source

**Description**: Test source with D2RQ access description for SQL databases
**Description**: Test access to a file

**Error expected?** No

Expand All @@ -21,21 +21,16 @@ id, name, age
```
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#D2RQSourceAccess> a rml:Source, d2rq:Database;
d2rq:jdbcDSN "$CONNECTIONDSN";
d2rq:username "$USERNAME";
d2rq:password "$PASSWORD"
.
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#D2RQSourceAccess>;
rml:referenceFormulation rml:SQL2008Table;
rml:iterator "Friends";
rml:source [ a rml:FilePath, rml:Source;
rml:root rml:CurrentWorkingDirectory;
rml:path "./Friends.csv"
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
Expand Down
130 changes: 130 additions & 0 deletions test-cases/RMLSTC0008a/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
## RMLSTC0008a

**Title**: Multiple sources of same type

**Description**: Tests the generation of all triples from multiple homogeneous sources

**Error expected?** No

**Input**
```
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
```

**Mapping**
```
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@base <http://example.com/rules/> .
<#DCATSourceAccess> a rml:Source, dcat:Distribution;
dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008a/Friends.json>;
rml:encoding rml:UTF-8;
.
<#DCATSourceAccess2> a rml:Source, dcat:Distribution;
dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008a/Friends2.json>;
rml:encoding rml:UTF-8;
.
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#DCATSourceAccess>;
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TriplesMap2> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#DCATSourceAccess2>;
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
```

**Output**
```
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
```

129 changes: 129 additions & 0 deletions test-cases/RMLSTC0008b/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
## RMLSTC0008b

**Title**: Multiple sources of different type

**Description**: Tests the generation of all triples from multiple heterogeneous sources

**Error expected?** No

**Input**
```
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
```

**Mapping**
```
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@base <http://example.com/rules/> .
<#DCATSourceAccessJSON> a rml:Source, dcat:Distribution;
dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008b/Friends.json>;
rml:encoding rml:UTF-8;
.
<#DCATSourceAccessCSV> a rml:Source, dcat:Distribution;
dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008b/Friends.csv>;
rml:encoding rml:UTF-8;
.
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#DCATSourceAccessJSON>;
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TriplesMap2> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#DCATSourceAccessCSV>;
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
```

**Output**
```
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
```

2 changes: 1 addition & 1 deletion test-cases/RMLTTC0003a/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
rml:logicalTarget <#TargetDump2>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
Expand Down
19 changes: 9 additions & 10 deletions test-cases/RMLTTC0007a/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## RMLTTC0007a

**Title**: Target with DCAT access description
**Title**: Target with FilePath description

**Description**: Test export all triples to a target with DCAT access description
**Description**: Test export all triples to a target with File path access description

**Error expected?** No

Expand All @@ -13,17 +13,15 @@
```
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#DCATSourceAccess> a rml:Source, dcat:Distribution;
dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0007a/Friends.json>;
.
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#DCATSourceAccess>;
rml:source [ a rml:FilePath, rml:Source;
rml:root rml:CurrentWorkingDirectory;
rml:path "./Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
Expand All @@ -50,8 +48,9 @@
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, dcat:Distribution;
dcat:accessUrl <file://./dump1.nq>;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Expand Down
Loading

0 comments on commit 198708d

Please sign in to comment.