diff --git a/test-cases/RMLTC0022c-JSON/README.md b/test-cases/RMLTC0022c-JSON/README.md index 72870ba6..d7d0afc6 100644 --- a/test-cases/RMLTC0022c-JSON/README.md +++ b/test-cases/RMLTC0022c-JSON/README.md @@ -1,8 +1,8 @@ ## RMLTC0022c-JSON -**Title**: "Generating of triples with datatypeMap with custom datatype" +**Title**: "Generating of triples with a template-valued datatypeMap" -**Description**: "Test triples with a custom datype from the data" +**Description**: "Test triples with a template-valued datatypeMap" **Default Base IRI**: http://example.com/ diff --git a/test-cases/RMLTC0022d-JSON/README.md b/test-cases/RMLTC0022d-JSON/README.md new file mode 100644 index 00000000..51d0812e --- /dev/null +++ b/test-cases/RMLTC0022d-JSON/README.md @@ -0,0 +1,54 @@ +## RMLTC0022d-JSON + +**Title**: "Generating of triples with a constant-valued datatypeMap" + +**Description**: "Test triples with a constant-valued datatypeMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +[ + { "FOO": 1, "BAR": "string"}, + { "FOO": 2, "BAR": "int"} +] + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . +@prefix xsd: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:constant xsd:integer + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . +``` + +**Output** +``` + "1"^^ . + "2"^^ . +``` + diff --git a/test-cases/RMLTC0022d-JSON/data.json b/test-cases/RMLTC0022d-JSON/data.json new file mode 100644 index 00000000..6b0dcef9 --- /dev/null +++ b/test-cases/RMLTC0022d-JSON/data.json @@ -0,0 +1,4 @@ +[ + { "FOO": 1, "BAR": "string"}, + { "FOO": 2, "BAR": "int"} +] diff --git a/test-cases/RMLTC0022d-JSON/mapping.ttl b/test-cases/RMLTC0022d-JSON/mapping.ttl new file mode 100644 index 00000000..40692246 --- /dev/null +++ b/test-cases/RMLTC0022d-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix rml: . +@prefix xsd: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:constant xsd:integer + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0022d-JSON/output.nq b/test-cases/RMLTC0022d-JSON/output.nq new file mode 100644 index 00000000..1382ad87 --- /dev/null +++ b/test-cases/RMLTC0022d-JSON/output.nq @@ -0,0 +1,2 @@ + "1"^^ . + "2"^^ . \ No newline at end of file diff --git a/test-cases/RMLTC0022e-JSON/README.md b/test-cases/RMLTC0022e-JSON/README.md new file mode 100644 index 00000000..15190551 --- /dev/null +++ b/test-cases/RMLTC0022e-JSON/README.md @@ -0,0 +1,54 @@ +## RMLTC0022e-JSON + +**Title**: "Generating of triples with a reference-valued datatypeMap" + +**Description**: "Test triples with a reference-valued datatypeMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +[ + { "FOO": 1, "BAR": "http://www.w3.org/2001/XMLSchema#string"}, + { "FOO": 2, "BAR": "http://www.w3.org/2001/XMLSchema#int"} +] + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:reference "BAR"; + rml:termType rml:IRI + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . +``` + +**Output** +``` + "1"^^ . + "2"^^ . +``` + diff --git a/test-cases/RMLTC0022e-JSON/data.json b/test-cases/RMLTC0022e-JSON/data.json new file mode 100644 index 00000000..508cc270 --- /dev/null +++ b/test-cases/RMLTC0022e-JSON/data.json @@ -0,0 +1,4 @@ +[ + { "FOO": 1, "BAR": "http://www.w3.org/2001/XMLSchema#string"}, + { "FOO": 2, "BAR": "http://www.w3.org/2001/XMLSchema#int"} +] diff --git a/test-cases/RMLTC0022e-JSON/mapping.ttl b/test-cases/RMLTC0022e-JSON/mapping.ttl new file mode 100644 index 00000000..b6e25665 --- /dev/null +++ b/test-cases/RMLTC0022e-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:reference "BAR"; + rml:termType rml:IRI + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0022e-JSON/output.nq b/test-cases/RMLTC0022e-JSON/output.nq new file mode 100644 index 00000000..c81c7378 --- /dev/null +++ b/test-cases/RMLTC0022e-JSON/output.nq @@ -0,0 +1,2 @@ + "1"^^ . + "2"^^ . \ No newline at end of file diff --git a/test-cases/RMLTC0029a-JSON/README.md b/test-cases/RMLTC0029a-JSON/README.md new file mode 100644 index 00000000..167bf474 --- /dev/null +++ b/test-cases/RMLTC0029a-JSON/README.md @@ -0,0 +1,48 @@ +## RMLTC0029a-JSON + +**Title**: "Generating of triples with constant shortcut subject" + +**Description**: "Test triples with a constant shortcut subject from the data" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +[ + { "FOO": "one", "BAR": "string"}, + { "FOO": "two", "BAR": "int"} +] + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subject ex:example . +``` + +**Output** +``` + "one" . + "two" . +``` + diff --git a/test-cases/RMLTC0029a-JSON/data.json b/test-cases/RMLTC0029a-JSON/data.json new file mode 100644 index 00000000..af9269c7 --- /dev/null +++ b/test-cases/RMLTC0029a-JSON/data.json @@ -0,0 +1,4 @@ +[ + { "FOO": "one", "BAR": "string"}, + { "FOO": "two", "BAR": "int"} +] diff --git a/test-cases/RMLTC0029a-JSON/mapping.ttl b/test-cases/RMLTC0029a-JSON/mapping.ttl new file mode 100644 index 00000000..6942bc08 --- /dev/null +++ b/test-cases/RMLTC0029a-JSON/mapping.ttl @@ -0,0 +1,19 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subject ex:example . \ No newline at end of file diff --git a/test-cases/RMLTC0029a-JSON/output.nq b/test-cases/RMLTC0029a-JSON/output.nq new file mode 100644 index 00000000..9d83ff89 --- /dev/null +++ b/test-cases/RMLTC0029a-JSON/output.nq @@ -0,0 +1,2 @@ + "one" . + "two" . \ No newline at end of file diff --git a/test-cases/RMLTC0030a-JSON/README.md b/test-cases/RMLTC0030a-JSON/README.md new file mode 100644 index 00000000..00ed2f96 --- /dev/null +++ b/test-cases/RMLTC0030a-JSON/README.md @@ -0,0 +1,115 @@ +## RMLTC0030a-JSON + +**Title**: "Generation of triples from a join with reference-valued parentMap and childMap" + +**Description**: "Test the results from a join with reference-valued parentMap and childMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} +``` + +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:reference "$.ID" ]; + rml:childMap [ rml:reference "$.Sport" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . +``` + diff --git a/test-cases/RMLTC0030a-JSON/mapping.ttl b/test-cases/RMLTC0030a-JSON/mapping.ttl new file mode 100644 index 00000000..82ffc338 --- /dev/null +++ b/test-cases/RMLTC0030a-JSON/mapping.ttl @@ -0,0 +1,54 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:reference "$.ID" ]; + rml:childMap [ rml:reference "$.Sport" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0030a-JSON/output.nq b/test-cases/RMLTC0030a-JSON/output.nq new file mode 100644 index 00000000..fc03c2a9 --- /dev/null +++ b/test-cases/RMLTC0030a-JSON/output.nq @@ -0,0 +1,9 @@ + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . \ No newline at end of file diff --git a/test-cases/RMLTC0030a-JSON/sport.json b/test-cases/RMLTC0030a-JSON/sport.json new file mode 100644 index 00000000..314277a1 --- /dev/null +++ b/test-cases/RMLTC0030a-JSON/sport.json @@ -0,0 +1,12 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030a-JSON/student.json b/test-cases/RMLTC0030a-JSON/student.json new file mode 100644 index 00000000..1a65a1c0 --- /dev/null +++ b/test-cases/RMLTC0030a-JSON/student.json @@ -0,0 +1,14 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030b-JSON/README.md b/test-cases/RMLTC0030b-JSON/README.md new file mode 100644 index 00000000..c417b196 --- /dev/null +++ b/test-cases/RMLTC0030b-JSON/README.md @@ -0,0 +1,115 @@ +## RMLTC0030b-JSON + +**Title**: "Generation of triples from a join with template-valued parentMap and childMap" + +**Description**: "Test that results from a join with template-valued parentMap and childMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport":300, + "Name": "Demi Moore" + } + ] +} +``` + +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:template "http://example.com/{$.ID}" ]; + rml:childMap [ rml:template "http://example.com/{$.Sport}" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . +``` + diff --git a/test-cases/RMLTC0030b-JSON/mapping.ttl b/test-cases/RMLTC0030b-JSON/mapping.ttl new file mode 100644 index 00000000..9bc6a00a --- /dev/null +++ b/test-cases/RMLTC0030b-JSON/mapping.ttl @@ -0,0 +1,54 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:template "http://example.com/{$.ID}" ]; + rml:childMap [ rml:template "http://example.com/{$.Sport}" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0030b-JSON/output.nq b/test-cases/RMLTC0030b-JSON/output.nq new file mode 100644 index 00000000..fc03c2a9 --- /dev/null +++ b/test-cases/RMLTC0030b-JSON/output.nq @@ -0,0 +1,9 @@ + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . \ No newline at end of file diff --git a/test-cases/RMLTC0030b-JSON/sport.json b/test-cases/RMLTC0030b-JSON/sport.json new file mode 100644 index 00000000..314277a1 --- /dev/null +++ b/test-cases/RMLTC0030b-JSON/sport.json @@ -0,0 +1,12 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030b-JSON/student.json b/test-cases/RMLTC0030b-JSON/student.json new file mode 100644 index 00000000..fa5599a9 --- /dev/null +++ b/test-cases/RMLTC0030b-JSON/student.json @@ -0,0 +1,14 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport":300, + "Name": "Demi Moore" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030c-JSON/README.md b/test-cases/RMLTC0030c-JSON/README.md new file mode 100644 index 00000000..c482f484 --- /dev/null +++ b/test-cases/RMLTC0030c-JSON/README.md @@ -0,0 +1,115 @@ +## RMLTC0030c-JSON + +**Title**: "Generation of triples from a join with constant-valued parentMap" + +**Description**: "Test that results from a join with constant-valued parentMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} +``` + +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:constant "100" ]; + rml:childMap [ rml:reference "$.Sport" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . +``` + diff --git a/test-cases/RMLTC0030c-JSON/mapping.ttl b/test-cases/RMLTC0030c-JSON/mapping.ttl new file mode 100644 index 00000000..3712d15e --- /dev/null +++ b/test-cases/RMLTC0030c-JSON/mapping.ttl @@ -0,0 +1,54 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:constant "100" ]; + rml:childMap [ rml:reference "$.Sport" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0030c-JSON/output.nq b/test-cases/RMLTC0030c-JSON/output.nq new file mode 100644 index 00000000..fc03c2a9 --- /dev/null +++ b/test-cases/RMLTC0030c-JSON/output.nq @@ -0,0 +1,9 @@ + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . \ No newline at end of file diff --git a/test-cases/RMLTC0030c-JSON/sport.json b/test-cases/RMLTC0030c-JSON/sport.json new file mode 100644 index 00000000..314277a1 --- /dev/null +++ b/test-cases/RMLTC0030c-JSON/sport.json @@ -0,0 +1,12 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030c-JSON/student.json b/test-cases/RMLTC0030c-JSON/student.json new file mode 100644 index 00000000..1a65a1c0 --- /dev/null +++ b/test-cases/RMLTC0030c-JSON/student.json @@ -0,0 +1,14 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030d-JSON/README.md b/test-cases/RMLTC0030d-JSON/README.md new file mode 100644 index 00000000..f998f9c5 --- /dev/null +++ b/test-cases/RMLTC0030d-JSON/README.md @@ -0,0 +1,115 @@ +## RMLTC0030d-JSON + +**Title**: "Generation of triples from a join with constant-valued parentMap" + +**Description**: "Test that results from a join with constant-valued parentMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} +``` + +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:constant "http://example.com/100" ]; + rml:childMap [ rml:template "http://example.com/{$.Sport}" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . +``` + diff --git a/test-cases/RMLTC0030d-JSON/mapping.ttl b/test-cases/RMLTC0030d-JSON/mapping.ttl new file mode 100644 index 00000000..abaa8fb3 --- /dev/null +++ b/test-cases/RMLTC0030d-JSON/mapping.ttl @@ -0,0 +1,54 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:constant "http://example.com/100" ]; + rml:childMap [ rml:template "http://example.com/{$.Sport}" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0030d-JSON/output.nq b/test-cases/RMLTC0030d-JSON/output.nq new file mode 100644 index 00000000..fc03c2a9 --- /dev/null +++ b/test-cases/RMLTC0030d-JSON/output.nq @@ -0,0 +1,9 @@ + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . \ No newline at end of file diff --git a/test-cases/RMLTC0030d-JSON/sport.json b/test-cases/RMLTC0030d-JSON/sport.json new file mode 100644 index 00000000..314277a1 --- /dev/null +++ b/test-cases/RMLTC0030d-JSON/sport.json @@ -0,0 +1,12 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030d-JSON/student.json b/test-cases/RMLTC0030d-JSON/student.json new file mode 100644 index 00000000..1a65a1c0 --- /dev/null +++ b/test-cases/RMLTC0030d-JSON/student.json @@ -0,0 +1,14 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030e-JSON/README.md b/test-cases/RMLTC0030e-JSON/README.md new file mode 100644 index 00000000..8d41472c --- /dev/null +++ b/test-cases/RMLTC0030e-JSON/README.md @@ -0,0 +1,115 @@ +## RMLTC0030e-JSON + +**Title**: "Generation of triples from a join with constant-valued childMap" + +**Description**: "Test that results from a join with constant-valued childMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} +``` + +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:reference "$.ID" ]; + rml:childMap [ rml:constant "100" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . +``` + diff --git a/test-cases/RMLTC0030e-JSON/mapping.ttl b/test-cases/RMLTC0030e-JSON/mapping.ttl new file mode 100644 index 00000000..b5591168 --- /dev/null +++ b/test-cases/RMLTC0030e-JSON/mapping.ttl @@ -0,0 +1,54 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:reference "$.ID" ]; + rml:childMap [ rml:constant "100" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0030e-JSON/output.nq b/test-cases/RMLTC0030e-JSON/output.nq new file mode 100644 index 00000000..fc03c2a9 --- /dev/null +++ b/test-cases/RMLTC0030e-JSON/output.nq @@ -0,0 +1,9 @@ + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . \ No newline at end of file diff --git a/test-cases/RMLTC0030e-JSON/sport.json b/test-cases/RMLTC0030e-JSON/sport.json new file mode 100644 index 00000000..314277a1 --- /dev/null +++ b/test-cases/RMLTC0030e-JSON/sport.json @@ -0,0 +1,12 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030e-JSON/student.json b/test-cases/RMLTC0030e-JSON/student.json new file mode 100644 index 00000000..1a65a1c0 --- /dev/null +++ b/test-cases/RMLTC0030e-JSON/student.json @@ -0,0 +1,14 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030f-JSON/README.md b/test-cases/RMLTC0030f-JSON/README.md new file mode 100644 index 00000000..b6049959 --- /dev/null +++ b/test-cases/RMLTC0030f-JSON/README.md @@ -0,0 +1,115 @@ +## RMLTC0030f-JSON + +**Title**: "Generation of triples from a join with constant-valued childMap" + +**Description**: "Test that results from a join with constant-valued childMap" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} +``` + +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:template "http://example.com/{$.ID}" ]; + rml:childMap [ rml:constant "http://example.com/100" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . +``` + diff --git a/test-cases/RMLTC0030f-JSON/mapping.ttl b/test-cases/RMLTC0030f-JSON/mapping.ttl new file mode 100644 index 00000000..10dc7f74 --- /dev/null +++ b/test-cases/RMLTC0030f-JSON/mapping.ttl @@ -0,0 +1,54 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:parentMap [ rml:template "http://example.com/{$.ID}" ]; + rml:childMap [ rml:constant "http://example.com/100" ]; + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0030f-JSON/output.nq b/test-cases/RMLTC0030f-JSON/output.nq new file mode 100644 index 00000000..fc03c2a9 --- /dev/null +++ b/test-cases/RMLTC0030f-JSON/output.nq @@ -0,0 +1,9 @@ + . + "Venus Williams" . + . + "Demi Moore". + . + "Tennis" . + . + . + "Football" . \ No newline at end of file diff --git a/test-cases/RMLTC0030f-JSON/sport.json b/test-cases/RMLTC0030f-JSON/sport.json new file mode 100644 index 00000000..314277a1 --- /dev/null +++ b/test-cases/RMLTC0030f-JSON/sport.json @@ -0,0 +1,12 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + }, + { + "ID": 200, + "Name": "Football" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0030f-JSON/student.json b/test-cases/RMLTC0030f-JSON/student.json new file mode 100644 index 00000000..1a65a1c0 --- /dev/null +++ b/test-cases/RMLTC0030f-JSON/student.json @@ -0,0 +1,14 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Sport": 300, + "Name": "Demi Moore" + } + ] +} \ No newline at end of file diff --git a/test-cases/RMLTC0031a-JSON/README.md b/test-cases/RMLTC0031a-JSON/README.md new file mode 100644 index 00000000..8c4c2de3 --- /dev/null +++ b/test-cases/RMLTC0031a-JSON/README.md @@ -0,0 +1,54 @@ +## RMLTC0031a-JSON + +**Title**: "Generating of triples with a constant-valued language map" + +**Description**: "Test triples with a constant-valued language map" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +[ + {"ID": 10,"label": "apple"}, + { "ID": 20,"label": "pear"} +] + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . +@prefix rdfs: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:languageMap [ + rml:constant "en" + ]; + rml:reference "$.label" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}" + ] . +``` + +**Output** +``` + "apple"@en . + "pear"@en . +``` + diff --git a/test-cases/RMLTC0031a-JSON/data.json b/test-cases/RMLTC0031a-JSON/data.json new file mode 100644 index 00000000..964855b5 --- /dev/null +++ b/test-cases/RMLTC0031a-JSON/data.json @@ -0,0 +1,4 @@ +[ + {"ID": 10,"label": "apple"}, + { "ID": 20,"label": "pear"} +] diff --git a/test-cases/RMLTC0031a-JSON/mapping.ttl b/test-cases/RMLTC0031a-JSON/mapping.ttl new file mode 100644 index 00000000..fe385b55 --- /dev/null +++ b/test-cases/RMLTC0031a-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix rml: . +@prefix rdfs: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:languageMap [ + rml:constant "en" + ]; + rml:reference "$.label" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0031a-JSON/output.nq b/test-cases/RMLTC0031a-JSON/output.nq new file mode 100644 index 00000000..7a04ded3 --- /dev/null +++ b/test-cases/RMLTC0031a-JSON/output.nq @@ -0,0 +1,2 @@ + "apple"@en . + "pear"@en . \ No newline at end of file diff --git a/test-cases/RMLTC0031b-JSON/README.md b/test-cases/RMLTC0031b-JSON/README.md new file mode 100644 index 00000000..9f23f886 --- /dev/null +++ b/test-cases/RMLTC0031b-JSON/README.md @@ -0,0 +1,61 @@ +## RMLTC0031b-JSON + +**Title**: "Generating of triples with a reference-valued language map" + +**Description**: "Test triples with a reference-valued language map" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +[ + { + "ID": 10, + "label": "apple", + "language": "en" + }, + { + "ID": 10, + "label": "pomme", + "language": "fr" + } +] +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . +@prefix rdfs: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:languageMap [ + rml:reference "$.language" + ]; + rml:reference "$.label" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}" + ] . +``` + +**Output** +``` + "apple"@en . + "pomme"@fr . +``` + diff --git a/test-cases/RMLTC0031b-JSON/data.json b/test-cases/RMLTC0031b-JSON/data.json new file mode 100644 index 00000000..c93fc08b --- /dev/null +++ b/test-cases/RMLTC0031b-JSON/data.json @@ -0,0 +1,12 @@ +[ + { + "ID": 10, + "label": "apple", + "language": "en" + }, + { + "ID": 10, + "label": "pomme", + "language": "fr" + } +] \ No newline at end of file diff --git a/test-cases/RMLTC0031b-JSON/mapping.ttl b/test-cases/RMLTC0031b-JSON/mapping.ttl new file mode 100644 index 00000000..8b820170 --- /dev/null +++ b/test-cases/RMLTC0031b-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix rml: . +@prefix rdfs: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:languageMap [ + rml:reference "$.language" + ]; + rml:reference "$.label" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0031b-JSON/output.nq b/test-cases/RMLTC0031b-JSON/output.nq new file mode 100644 index 00000000..76c891ed --- /dev/null +++ b/test-cases/RMLTC0031b-JSON/output.nq @@ -0,0 +1,2 @@ + "apple"@en . + "pomme"@fr . \ No newline at end of file diff --git a/test-cases/RMLTC0031c-JSON/README.md b/test-cases/RMLTC0031c-JSON/README.md new file mode 100644 index 00000000..5662f294 --- /dev/null +++ b/test-cases/RMLTC0031c-JSON/README.md @@ -0,0 +1,63 @@ +## RMLTC0031c-JSON + +**Title**: "Generating of triples with a template-valued language map" + +**Description**: "Test triples with a template-valued language map" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +[ + { + "ID": 10, + "label": "aubergine", + "language": "en", + "region":"GB" + }, + { + "ID": 10, + "label": "eggplant", + "language": "en", + "region": "US" + } +] +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . +@prefix rdfs: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:languageMap [ + rml:template "{$.language}-{$.region}" + ]; + rml:reference "$.label" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}" + ] . +``` + +**Output** +``` + "aubergine"@en-GB . + "eggplant"@en-US . +``` + diff --git a/test-cases/RMLTC0031c-JSON/data.json b/test-cases/RMLTC0031c-JSON/data.json new file mode 100644 index 00000000..34b18810 --- /dev/null +++ b/test-cases/RMLTC0031c-JSON/data.json @@ -0,0 +1,14 @@ +[ + { + "ID": 10, + "label": "aubergine", + "language": "en", + "region":"GB" + }, + { + "ID": 10, + "label": "eggplant", + "language": "en", + "region": "US" + } +] \ No newline at end of file diff --git a/test-cases/RMLTC0031c-JSON/mapping.ttl b/test-cases/RMLTC0031c-JSON/mapping.ttl new file mode 100644 index 00000000..f94da194 --- /dev/null +++ b/test-cases/RMLTC0031c-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix rml: . +@prefix rdfs: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:languageMap [ + rml:template "{$.language}-{$.region}" + ]; + rml:reference "$.label" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}" + ] . \ No newline at end of file diff --git a/test-cases/RMLTC0031c-JSON/output.nq b/test-cases/RMLTC0031c-JSON/output.nq new file mode 100644 index 00000000..f57e81dd --- /dev/null +++ b/test-cases/RMLTC0031c-JSON/output.nq @@ -0,0 +1,2 @@ + "aubergine"@en-GB . + "eggplant"@en-US . \ No newline at end of file diff --git a/test-cases/descriptions.csv b/test-cases/descriptions.csv index 46118084..ebea350f 100644 --- a/test-cases/descriptions.csv +++ b/test-cases/descriptions.csv @@ -42,7 +42,7 @@ RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the gen RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition RMLTC0022a-JSON,Generating of triples with constant datatype,Test triples with a fixed constant datatype RMLTC0022b-JSON,Generating of triples with datatypeMap,Test triples with a XSD datatype generated from the data -RMLTC0022c-JSON,Generating of triples with datatypeMap with custom datatype,Test triples with a custom datype from the data +RMLTC0022c-JSON,Generating of triples with a template-valued datatypeMap,Test triples with a template-valued datatypeMap RMLTC0023a-JSON,Invalid IRI template 1,Test handling of invalid IRI template RMLTC0023b-JSON,Invalid IRI template 2,Test handling of invalid IRI template RMLTC0023c-JSON,Invalid IRI template 3,Test handling of invalid IRI template @@ -63,3 +63,15 @@ RMLTC0027c-JSON,Generation an IRI using the term type IRI,Tests the generation o RMLTC0028a-JSON,Generation of the right datatype for a constant in the mapping,Test the honoring of the datatype specified by the constant term in the mapping RMLTC0028b-JSON,Generation of all named graphs when rml:defaultGraph is involved,Test if the default graph is also generated correctly. RMLTC0028c-JSON,Generation of the right language tag for a constant in the mapping,Test the honoring of the language tag specified by the constant term in the mapping +RMLTC0022d-JSON,Generating of triples with a constant-valued datatypeMap,Test triples with a constant-valued datatypeMap +RMLTC0022e-JSON,Generating of triples with a reference-valued datatypeMap,Test triples with a reference-valued datatypeMap +RMLTC0029a-JSON,Generating of triples with constant shortcut subject,Test triples with a constant shortcut subject from the data +RMLTC0030a-JSON,Generation of triples from a join with reference-valued parentMap and childMap,Test the results from a join with reference-valued parentMap and childMap +RMLTC0030b-JSON,Generation of triples from a join with template-valued parentMap and childMap,Test that results from a join with template-valued parentMap and childMap +RMLTC0030c-JSON,Generation of triples from a join with constant-valued parentMap,Test that results from a join with constant-valued parentMap +RMLTC0030d-JSON,Generation of triples from a join with constant-valued parentMap,Test that results from a join with constant-valued parentMap +RMLTC0030e-JSON,Generation of triples from a join with constant-valued childMap,Test that results from a join with constant-valued childMap +RMLTC0030f-JSON,Generation of triples from a join with constant-valued childMap,Test that results from a join with constant-valued childMap +RMLTC0031a-JSON,Generating of triples with a constant-valued language map,Test triples with a constant-valued language map +RMLTC0031b-JSON,Generating of triples with a reference-valued language map,Test triples with a reference-valued language map +RMLTC0031c-JSON,Generating of triples with a template-valued language map,Test triples with a template-valued language map \ No newline at end of file diff --git a/test-cases/metadata.csv b/test-cases/metadata.csv index f6334f69..e7425a3c 100644 --- a/test-cases/metadata.csv +++ b/test-cases/metadata.csv @@ -1,65 +1,77 @@ ID,title,description,specification,base_iri,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error -RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false -RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false -RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false -RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false -RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false -RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false -RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false -RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,application/json,application/json,application/n-quads,,,student.json,sport.json,student_sport.json,output.nq,,,false -RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,lives.json,persons.json,,output.nq,,,false -RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true -RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true -RMLTC0012e-JSON,"""Blank node as subject""","""Test a subjectMap with termType BlankNode without expressionMap""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,,,,application/n-quads,,,,,,output.nq,,,false -RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_es.json,,,output.nq,,,false -RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,country_es.json,,,,,,true -RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true -RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false -RMLTC0022c-JSON,"""Generating of triples with datatypeMap with custom datatype""","""Test triples with a custom datype from the data""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false -RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0023f-JSON,"""Valid IRI template with backslash-escape""","""Test handling of a valid IRI template using backslash-escape""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0024a-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true -RMLTC0025a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0025b-JSON,"""Generation of triples from arrays with wrong reference""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true -RMLTC0025c-JSON,"""Generation of triples from arrays in subject and object""","""Tests the generation of triples from array input data structures in subject and object""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0026a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0026b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0026c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0026d-JSON,"""Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false -RMLTC0027a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0027b-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0027c-JSON,"""Generation an IRI using the term type IRI""","""Tests the generation of triples with a IRI term type in the subject""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false -RMLTC0028a-JSON,"""Generation of the right datatype for a constant in the mapping""","""Test the honoring of the datatype specified by the constant term in the mapping""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false -RMLTC0028b-JSON,"""Generation of all named graphs when rml:defaultGraph is involved""","""Test if the default graph is also generated correctly.""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false -RMLTC0028c-JSON,"""Generation of the right language tag for a constant in the mapping""","""Test the honoring of the language tag specified by the constant term in the mapping""",http://w3id.org/rml/core/,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false +RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false +RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false +RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false +RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false +RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",core,http://example.com/,mapping.ttl,application/json,application/json,application/json,application/n-quads,,,student.json,sport.json,student_sport.json,output.nq,,,false +RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,lives.json,persons.json,,output.nq,,,false +RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",core,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true +RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",core,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true +RMLTC0012e-JSON,"""Blank node as subject""","""Test a subjectMap with termType BlankNode without expressionMap""",core,http://example.com/,mapping.ttl,,,,application/n-quads,,,,,,output.nq,,,false +RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,country_es.json,,,output.nq,,,false +RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",core,http://example.com/,mapping.ttl,application/json,,,,,,country_es.json,,,,,,true +RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",core,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true +RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0022c-JSON,"""Generating of triples with a template-valued datatypeMap""","""Test triples with a template-valued datatypeMap""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0022d-JSON,"""Generating of triples with a constant-valued datatypeMap""","""Test triples with a constant-valued datatypeMap""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0022e-JSON,"""Generating of triples with a reference-valued datatypeMap""","""Test triples with a reference-valued datatypeMap""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023f-JSON,"""Valid IRI template with backslash-escape""","""Test handling of a valid IRI template using backslash-escape""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0024a-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",core,http://example.com/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0025a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0025b-JSON,"""Generation of triples from arrays with wrong reference""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array""",core,http://example.com/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true +RMLTC0025c-JSON,"""Generation of triples from arrays in subject and object""","""Tests the generation of triples from array input data structures in subject and object""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0026a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0026b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0026c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0026d-JSON,"""Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0027a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0027b-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0027c-JSON,"""Generation an IRI using the term type IRI""","""Tests the generation of triples with a IRI term type in the subject""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0028a-JSON,"""Generation of the right datatype for a constant in the mapping""","""Test the honoring of the datatype specified by the constant term in the mapping""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0028b-JSON,"""Generation of all named graphs when rml:defaultGraph is involved""","""Test if the default graph is also generated correctly.""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0028c-JSON,"""Generation of the right language tag for a constant in the mapping""","""Test the honoring of the language tag specified by the constant term in the mapping""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0029a-JSON,"""Generating of triples with constant shortcut subject""","""Test triples with a constant shortcut subject from the data""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0030a-JSON,"""Generation of triples from a join with reference-valued parentMap and childMap""","""Test the results from a join with reference-valued parentMap and childMap""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0030b-JSON,"""Generation of triples from a join with template-valued parentMap and childMap""","""Test that results from a join with template-valued parentMap and childMap""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0030c-JSON,"""Generation of triples from a join with constant-valued parentMap""","""Test that results from a join with constant-valued parentMap""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0030d-JSON,"""Generation of triples from a join with constant-valued parentMap""","""Test that results from a join with constant-valued parentMap""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0030e-JSON,"""Generation of triples from a join with constant-valued childMap""","""Test that results from a join with constant-valued childMap""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0030f-JSON,"""Generation of triples from a join with constant-valued childMap""","""Test that results from a join with constant-valued childMap""",core,http://example.com/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false +RMLTC0031a-JSON,"""Generating of triples with a constant-valued language map""","""Test triples with a constant-valued language map""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0031b-JSON,"""Generating of triples with a reference-valued language map""","""Test triples with a reference-valued language map""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false +RMLTC0031c-JSON,"""Generating of triples with a template-valued language map""","""Test triples with a template-valued language map""",core,http://example.com/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false