Copyright © 2024-2025 the Contributors to the RML-Star: Test Cases Specification, published by the Knowledge Graph Construction Community Group under the W3C Community Contributor License Agreement (CLA). A human-readable summary is available.
This document defines the RML-Star test cases to the determine the RML-Star specification conformance of tools.
This specification was published by the Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.
GitHub Issues are preferred for discussion of this specification.
This document defines the RML-Star test cases, consisting of a collection of test case documents (input and expected output). The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Star specification.
The test cases are semantically described for re-usability and shareability following the W3C Test case description.
Each test:Testcase
as the following properties:
dcterms:identifier
: unique ID of the test case.rmltest:hasError
: if an error of the RML Processor is expected or not.rmltest:input
: One or more input data of the test case.rmltest:output
: One or more output data of the test case.rmltest:inputFormat
: the input data format.rmltest:outputFormat
: the output data format.rmltest:mappingDocument
: the RML mapping rules in Turtle.This section describes the RML-Star test cases. These descriptions are also available as RDF.
The files are available on GitHub in the folder test-cases
.
Each test case is contained in a single folder, containing three types of files:
mapping.ttl
, in the Turtle format.Title: quoted triple in subject, one source, blank node in quoted subject
Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file
Error expected? No
Input
c1,c2,c3
b0,o,ABC
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:reference "c1" ;
rml:termType rml:BlankNode
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c3"
]
] .
Output
_:b0 <http://example/p> <http://example/o> .
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
Title: quoted triple in subject, two sources, blank node in quoted subject
Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files
Error expected? No
Input
c1-1,c1-2,c1-3
b0,o,1
Input 1
c2-1,c2-2
ABC,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:reference "c1-1" ;
rml:termType rml:BlankNode
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-3" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c2-1"
]
] .
Output
_:b0 <http://example/p> <http://example/o> .
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
Title: quoted triple in subject, one source, blank node in quoted object
Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file
Error expected? No
Input
c1,c2,c3
s,b1,456
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:reference "c2" ;
rml:termType rml:BlankNode
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c3";
rml:datatype xsd:integer
]
] .
Output
<http://example/s> <http://example/p> _:b1 .
<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
Title: quoted triple in subject, two sources, blank node in quoted object
Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files
Error expected? No
Input
c1-1,c1-2,c1-3
s,b1,1
Input 1
c2-1,c2-2
456,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:reference "c1-2" ;
rml:termType rml:BlankNode
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-3" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c2-1";
rml:datatype xsd:integer
]
] .
Output
<http://example/s> <http://example/p> _:b1 .
<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
Title: two-level quoted triple in subject, one source
Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file
Error expected? No
Input
c1,c2,c3,c4
s,o,z,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:r ;
rml:objectMap [
rml:template "http://example/{c3}"
]
] .
:thirdTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :secondTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c4" ;
rml:datatype xsd:integer
]
] .
Output
<http://example/s> <http://example/p> <http://example/o> .
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
Title: two-level quoted triple in subject, two sources
Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files
Error expected? No
Input
c1-1,c1-2,c1-3,c1-4
s,o,z,1
Input 1
c2-1,c2-2
1,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:r ;
rml:objectMap [
rml:template "http://example/{c1-3}"
]
] .
:thirdTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :secondTM;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-4" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c2-1" ;
rml:datatype xsd:integer
]
] .
Output
<http://example/s> <http://example/p> <http://example/o> .
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
Title: two-level quoted triple in subject and object, one source
Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file
Error expected? No
Input
c1,c2,c3,c4
s,o,a,z
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c3}"
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:quotedTriplesMap :firstTM
]
] .
:thirdTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :secondTM
];
rml:predicateObjectMap [
rml:predicate ex:r ;
rml:objectMap [
rml:template "http://example/{c4}"
]
] .
Output
<http://example/s> <http://example/p> <http://example/o> .
<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
Title: two-level quoted triple in subject and object, two sources
Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources
Error expected? No
Input
c1-1,c1-2,c1-3,c1-4
s,o,a,1
Input 1
c2-1,c2-2
z,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-3}"
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:quotedTriplesMap :firstTM
]
] .
:thirdTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :secondTM;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-4" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:r ;
rml:objectMap [
rml:template "http://example/{c2-1}"
]
] .
Output
<http://example/s> <http://example/p> <http://example/o> .
<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
Title: non-asserted quoted triple in subject, one source
Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from one file
Error expected? No
Input
c1,c2,c3
s,o,z
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:template "http://example/{c3}"
]
] .
Output
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
Title: non-asserted quoted triple in subject, two sources
Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from two files
Error expected? No
Input
c1-1,c1-2,c1-3
s,o,1
Input 1
c2-1,c2-2
z,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-3" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:template "http://example/{c2-1}"
]
] .
Output
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
Title: non-asserted quoted triple in object, one source
Description: Tests the creation of a non-asserted quoted triple in the position of object with data from one file
Error expected? No
Input
c1,c2,c3
s,o,x
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c3}"
];
rml:predicateObjectMap [
rml:predicate ex:p; ;
rml:objectMap [
rml:quotedTriplesMap :firstTM
]
] .
Output
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
Title: non-asserted quoted triple in object, two sources
Description: Tests the creation of a non-asserted quoted triple in the position of object with data from two files
Error expected? No
Input
c1-1,c1-2,c1-3
s,o,1
Input 1
c2-1,c2-2
x,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c2-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p; ;
rml:objectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-3" ;
];
]
] .
Output
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
Title: non-asserted quoted triples in subject and object, one source
Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file
Error expected? No
Input
c1,c2,c3,c4
s1,o1,s2,o2
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p1 ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:q; ;
rml:objectMap [
rml:quotedTriplesMap :thirdTM
]
] .
:thirdTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c3}"
];
rml:predicateObjectMap [
rml:predicate ex:p2 ;
rml:objectMap [
rml:template "http://example/{c4}"
]
] .
Output
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
Title: non-asserted quoted triples in subject and object, two sources
Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources
Error expected? No
Input
c1-1,c1-2,c1-3
s1,o1,1
Input 1
c2-1,c2-2,c2-3
s2,o2,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p1 ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-3" ;
rml:parent "c1-3" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q; ;
rml:objectMap [
rml:quotedTriplesMap :thirdTM
]
] .
:thirdTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c2-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p2 ;
rml:objectMap [
rml:template "http://example/{c2-2}"
]
] .
Output
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
Title: two-level non-asserted quoted triple in subject and object two-fold, one source
Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source
Error expected? No
Input
c1,c2,c3,c4,c5,c6,c7,c8
s1,o1,s2,o2,s3,o3,s4,o4
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:elementaryTM1 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p1 ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .
:firstJoinTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :elementaryTM1
];
rml:predicateObjectMap [
rml:predicate ex:q1; ;
rml:objectMap [
rml:quotedTriplesMap :elementaryTM2
]
] .
:elementaryTM2 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c3}"
];
rml:predicateObjectMap [
rml:predicate ex:p2 ;
rml:objectMap [
rml:template "http://example/{c4}"
]
] .
:centralJoinTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstJoinTM
];
rml:predicateObjectMap [
rml:predicate ex:q2;
rml:objectMap [
rml:quotedTriplesMap :secondJoinTM
]
] .
:elementaryTM3 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c5}"
];
rml:predicateObjectMap [
rml:predicate ex:p3 ;
rml:objectMap [
rml:template "http://example/{c6}"
]
] .
:secondJoinTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :elementaryTM3
];
rml:predicateObjectMap [
rml:predicate ex:q3; ;
rml:objectMap [
rml:quotedTriplesMap :elementaryTM4
]
] .
:elementaryTM4 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c7}"
];
rml:predicateObjectMap [
rml:predicate ex:p4 ;
rml:objectMap [
rml:template "http://example/{c8}"
]
] .
Output
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
Title: two-level non-asserted quoted triple in subject and object two-fold, two sources
Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources
Error expected? No
Input
c1-1,c1-2,c1-3,c1-4,c1-5
s1,o1,s2,o2,1
Input 1
c2-1,c2-2,c2-3,c2-4,c2-5
s3,o3,s4,o4,1
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:elementaryTM1 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p1 ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .
:firstJoinTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :elementaryTM1
];
rml:predicateObjectMap [
rml:predicate ex:q1; ;
rml:objectMap [
rml:quotedTriplesMap :elementaryTM2
]
] .
:elementaryTM2 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-3}"
];
rml:predicateObjectMap [
rml:predicate ex:p2 ;
rml:objectMap [
rml:template "http://example/{c1-4}"
]
] .
:centralJoinTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstJoinTM ;
rml:joinCondition [
rml:child "c2-5" ;
rml:parent "c1-5" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q2;
rml:objectMap [
rml:quotedTriplesMap :secondJoinTM
]
] .
:elementaryTM3 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c2-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p3 ;
rml:objectMap [
rml:template "http://example/{c2-2}"
]
] .
:secondJoinTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :elementaryTM3
];
rml:predicateObjectMap [
rml:predicate ex:q3; ;
rml:objectMap [
rml:quotedTriplesMap :elementaryTM4
]
] .
:elementaryTM4 a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c2-3}"
];
rml:predicateObjectMap [
rml:predicate ex:p4 ;
rml:objectMap [
rml:template "http://example/{c2-4}"
]
] .
Output
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
Title:
Description:
Error expected? Yes
Input
c1,c2,c3,c4
a,s,o,z
Mapping
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:quotedTriplesMap :secondTM ;
rml:objectMap [
rml:template "http://example/{c4}"
]
] .
:secondTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c2}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c3}"
]
] .
Title:
Description:
Error expected? Yes
Input
c1,c2,c3,c4
a,s,o,z
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .
:firstTM a rml:AssertedTriplesMap, rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p;
rml:quotedTriplesMap :secondTM ;
] .
:secondTM a rml:NonAssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c2}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c3}"
]
] .