Skip to content

Commit

Permalink
test-cases: add HTML view
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVanAssche committed Jan 30, 2025
1 parent 508cd2e commit 413de73
Show file tree
Hide file tree
Showing 76 changed files with 6,174 additions and 0 deletions.
94 changes: 94 additions & 0 deletions test-cases/RMLSTC0001a/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# RMLSTC0001a

Test source with UTF-8 encoding

**Error expected?** Yes

**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/RMLSTC0001a/Friends.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";
];
];
.
```

**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" .
```

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

Test source with UTF-16 encoding

**Error expected?** Yes

**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/RMLSTC0001b/Friends-UTF16.json>;
rml:encoding rml:UTF-16;
.
<#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";
];
];
.
```

**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" .
```

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

Test source without compression

**Error expected?** Yes

**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/RMLSTC0002a/Friends.json>;
.
<#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";
];
];
.
```

**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" .
```

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

Test source with GZip compression

**Error expected?** Yes

**Input**
`Friends.json.gz`

**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/RMLSTC0002b/Friends.json.gz>;
rml:compression rml:gzip;
.
<#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";
];
];
.
```

**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" .
```

Loading

0 comments on commit 413de73

Please sign in to comment.