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
41 changes: 41 additions & 0 deletions test-cases/RMLFNMLTC0200/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## RMLFNMLTC0200

**Title**: Constant function execution can omit logical source

**Description**: Test a Triples Map with only constant expressions in a function execution can omit logical source

**Error expected?** No

**Mapping**
```
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.

<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:functionExecution [
rml:function grel:toUppercase;
rml:input [
rml:parameter grel:valueParam;
rml:inputValueMap [
rml:constant "Gaston Lagaffe"
];
];
];
rml:return grel:stringOut;
rml:language "fr-BE" ;
];
].


```

**Output**
```
<http://example.com/Gaston> <http://www.w3.org/2000/01/rdf-schema#label> "GASTON LAGAFFE"@fr-BE .
```

23 changes: 23 additions & 0 deletions test-cases/RMLFNMLTC0200/mapping.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.

<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:functionExecution [
rml:function grel:toUppercase;
rml:input [
rml:parameter grel:valueParam;
rml:inputValueMap [
rml:constant "Gaston Lagaffe"
];
];
];
rml:return grel:stringOut;
rml:language "fr-BE" ;
];
].

1 change: 1 addition & 0 deletions test-cases/RMLFNMLTC0200/output.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<http://example.com/Gaston> <http://www.w3.org/2000/01/rdf-schema#label> "GASTON LAGAFFE"@fr-BE .
36 changes: 36 additions & 0 deletions test-cases/RMLFNMLTC0201/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## RMLFNMLTC0201

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

**Description**: Test a Triples Map with reference expressions in a function execution cannot omit logical source

**Error expected?** Yes

**Mapping**
```
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.

<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:functionExecution [
rml:function grel:toUppercase;
rml:input [
rml:parameter grel:valueParam;
rml:inputValueMap [
rml:template "{name}"
];
];
];
rml:return grel:stringOut;
rml:language "fr-BE" ;
];
].


```

23 changes: 23 additions & 0 deletions test-cases/RMLFNMLTC0201/mapping.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@prefix rml: <http://w3id.org/rml/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.

<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:functionExecution [
rml:function grel:toUppercase;
rml:input [
rml:parameter grel:valueParam;
rml:inputValueMap [
rml:template "{name}"
];
];
];
rml:return grel:stringOut;
rml:language "fr-BE" ;
];
].

4 changes: 3 additions & 1 deletion test-cases/descriptions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ RMLFNMLTC0081-CSV,"Function on languageMap, 1 parameter",Tests that function on
RMLFNMLTC0101-CSV,"Function on object, 1 false reference parameter",Tests if a false reference parameters is caught,,CSV,CSV,TRUE,student.csv,,,
RMLFNMLTC0102-CSV,"Function on object, wrong function URI",Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine,,CSV,CSV,TRUE,student.csv,,,
RMLFNMLTC0103-CSV,"Function on object, wrong parameter",Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,,
RMLFNMLTC0104-CSV,"Function on object, wrong return parameter",Tests that nothing is generated if a function is defined using a return not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,,
RMLFNMLTC0104-CSV,"Function on object, wrong return parameter",Tests that nothing is generated if a function is defined using a return not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,,
RMLFNMLTC0200,Constant function execution can omit logical source,Test a Triples Map with only constant expressions in a function execution can omit logical source,,,,FALSE,,,,
RMLFNMLTC0201,"Non constant mapping, while omitting logical source",Test a Triples Map with reference expressions in a function execution cannot omit logical source,,,,TRUE,,,,
Loading
Loading