Skip to content

Commit

Permalink
test-cases: RMLTTC0007e: add test case for dcat:format
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
DylanVanAssche committed Jun 19, 2024
1 parent 9449422 commit 225991e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
Empty file.
10 changes: 10 additions & 0 deletions test-cases/RMLTTC0007e/dump1.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<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" .
53 changes: 53 additions & 0 deletions test-cases/RMLTTC0007e/mapping.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@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/RMLTTC0007d/Friends.json>;
dcat:format <http://www.iana.org/assignments/media-types/application/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:logicalTarget <#TargetDump1>;
];
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";
];
];
.

<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, td:Thing;
td:hasPropertyAffordance [
td:hasForm [
hctl:hasTarget "http://localhost/data";
hctl:forContentType "application/n-quads";
];
];
];
rml:serialization formats:N-Quads;
.

0 comments on commit 225991e

Please sign in to comment.