Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions test-cases/RMLTC-CC-0011-Const/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## RMLTC-CC-0011-Const

**Title**: Constant mapping can omit logical source

**Description**: Test a Triples Map with only constant expression in a gather map can omit logical source

**Error expected?** No

**Input**
[http://w3id.org/rml/resources/rml-io/RMLTC-CC-0011-Const/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0011-Const/Friends.json)

**Mapping**
```
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

<http://example.com/base/TriplesMap1> a rml:TriplesMap;
rml:subjectMap [ rml:constant <http://example.com/Gaston> ];
rml:predicateObjectMap [
rml:predicate rdfs:label;
rml:objectMap [
rml:gather ( [ rml:constant "Gaston Lagaffe" ] );
rml:gatherAs rdf:Alt;
];
].


```

**Output**
```
<http://example.com/Gaston> <http://www.w3.org/2000/01/rdf-schema#label> _:b0 .
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "Gaston Lagaffe" .
```

3 changes: 3 additions & 0 deletions test-cases/RMLTC-CC-0011-Const/default.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<http://example.com/Gaston> <http://www.w3.org/2000/01/rdf-schema#label> _:b0 .
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "Gaston Lagaffe" .
14 changes: 14 additions & 0 deletions test-cases/RMLTC-CC-0011-Const/mapping.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

<http://example.com/base/TriplesMap1> a rml:TriplesMap;
rml:subjectMap [ rml:constant <http://example.com/Gaston> ];
rml:predicateObjectMap [
rml:predicate rdfs:label;
rml:objectMap [
rml:gather ( [ rml:constant "Gaston Lagaffe" ] );
rml:gatherAs rdf:Alt;
];
].

30 changes: 30 additions & 0 deletions test-cases/RMLTC-CC-0012-NonConst/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## RMLTC-CC-0012-NonConst

**Title**: Non constant mapping, while ommiting logical source

**Description**: Test a Triples Map with only reference expression in a gather map cannot omit logical source

**Error expected?** Yes

**Input**
[http://w3id.org/rml/resources/rml-io/RMLTC-CC-0012-NonConst/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0012-NonConst/Friends.json)

**Mapping**
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.

<http://example.com/base/TriplesMap1> a rml:TriplesMap;
rml:subjectMap [ rml:constant <http://example.com/Gaston> ];
rml:predicateObjectMap [
rml:predicate rdfs:label;
rml:objectMap [
rml:gather ( [ rml:reference "{name}" ] );
rml:gatherAs rdf:Alt;
];
].


```

14 changes: 14 additions & 0 deletions test-cases/RMLTC-CC-0012-NonConst/mapping.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.

<http://example.com/base/TriplesMap1> a rml:TriplesMap;
rml:subjectMap [ rml:constant <http://example.com/Gaston> ];
rml:predicateObjectMap [
rml:predicate rdfs:label;
rml:objectMap [
rml:gather ( [ rml:reference "{name}" ] );
rml:gatherAs rdf:Alt;
];
].

4 changes: 3 additions & 1 deletion test-cases/descriptions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ RMLTC-CC-0008-ROMb,Elements via reference object-map with default join condition
RMLTC-CC-0009-DUP-Bag,Gather duplicate values in an RDF Bag,Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.,,JSON,JSON,no,data.json,,,
RMLTC-CC-0009-DUP-List,Gather duplicate values in an RDF List,Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.,,JSON,JSON,no,data.json,,,
RMLTC-CC-0010-Lista,Combining graph maps and gather maps (graph map has a template and gather map does not),"Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.",,JSON,JSON,no,data.json,,,
RMLTC-CC-0010-Listb,Combining graph maps and gather maps (both graph map and gather map have a template),"Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.",,JSON,JSON,no,data.json,,,
RMLTC-CC-0010-Listb,Combining graph maps and gather maps (both graph map and gather map have a template),"Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.",,JSON,JSON,no,data.json,,,
RMLTC-CC-0011-Const,Constant mapping can omit logical source,Test a Triples Map with only constant expression in a gather map can omit logical source,,,,no,,,,
RMLTC-CC-0012-NonConst,"Non constant mapping, while ommiting logical source",Test a Triples Map with only reference expression in a gather map cannot omit logical source,,,,yes,,,,
2 changes: 1 addition & 1 deletion test-cases/make-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def main(spec: str):
output1 = 'default.nq'
output_format1 = 'application/n-quads'
else:
raise NotImplementedError('output1 is not known, but required')
error = "true"

if os.path.exists(os.path.join(testcase, 'dump1.nq')):
output2 = 'dump1.nq'
Expand Down
Loading
Loading