Skip to content

Commit

Permalink
fixing 0006
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdmeest committed Mar 26, 2024
1 parent 416a0af commit d02bcda
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test-cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Some test cases are under discussion, proposed alternatives are noted via a suff
| 0004b | Function on predicate, 1 parameter (replaces 0004) | Tests if a function can be used on a predicate | CSV | FALSE | student.csv |
| 0005 | Function on subject, 1 parameter | Tests if a function can be used on a subject | CSV | FALSE | student.csv |
| 0005 | Function on subject, default termType | Tests if the default termType assigned to the output of the function to be correct | | | |
| 0005b | Function on subject, default termType (replaces 0005) | Tests if the default termType assigned to the output of the function to be correct | | | |
| 0006 | Function on object, the output termType is IRI | Tests if the output of the function is assigned the correct termType | | | |
| 0006b | Function on object, the output termType is IRI (replaces 0006) | Tests if the output of the function is assigned the correct termType | | | |
| 0008 | Function on object, 1 template parameter | Tests if a function with a template parameter can be used | CSV | FALSE | student.csv |
| 0009 | Nested function - Test A | Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function) | CSV | FALSE | student.csv |
40 changes: 40 additions & 0 deletions test-cases/RMLFNOTC0006b-CSV/mapping.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix fno: <https://w3id.org/function/ontology#> .
@prefix fns: <http://example.com/functions/> .
@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
@prefix idlab-fn: <http://example.com/idlab/function/> .

@base <http://example.com/base/> .

<TriplesMap1>
rml:logicalSource [
rml:source [ a rml:RelativePathSource;
rml:root rml:MappingDirectory;
rml:path "student.csv"
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example.com/{Name}"
];
rml:predicateObjectMap [
rml:predicate foaf:name;
rml:objectMap [
rml:functionExecution <#Execution> ;
rml:termType rml:IRI
];
] .

<#Execution>
rml:function fns:schema ;
rml:input
[
rml:parameter fns:stringParameter ;
rml:inputValueMap [
rml:reference "Name"
];
] .
1 change: 1 addition & 0 deletions test-cases/RMLFNOTC0006b-CSV/output.nq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <https://schema.org/Venus> .
2 changes: 2 additions & 0 deletions test-cases/RMLFNOTC0006b-CSV/student.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Id,Name,Comment,Class,url
1,Venus,A&B,A,http://example.com/venus

0 comments on commit d02bcda

Please sign in to comment.