-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
I try to map the following data:
[
{
"k":"v1"
},
{
"k":"v2"
}
]
using the following mapping:
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix ex: <https://example.org/> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.
@prefix fnml: <http://semweb.mmlab.be/ns/fnml#>.
@prefix fno: <https://w3id.org/function/ontology#>.
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.
ex:my_Map a rr:TriplesMap ;
rml:logicalSource [
rml:source "test_data.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$[*]"
] ;
rr:subjectMap [ rr:termType rr:BlankNode ] ;
rr:predicateObjectMap [
rr:predicate ex:my_prop;
rr:objectMap [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes;
rr:objectMap [
rr:constant grel:controls_if
]
];
rr:predicateObjectMap [
rr:predicate grel:bool_b;
rr:objectMap [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes;
rr:objectMap [
rr:constant grel:string_contains
]
];
rr:predicateObjectMap [
rr:predicate grel:valueParameter;
rr:objectMap [ rml:reference "k" ]
];
rr:predicateObjectMap [
rr:predicate grel:string_sub;
rr:objectMap [ rr:constant "v1" ]
]
]
]
];
rr:predicateObjectMap [
rr:predicate grel:any_true;
rr:objectMap [rr:constant ex:my_v1_resource]
];
rr:predicateObjectMap [
rr:predicate grel:any_false;
rr:objectMap [rr:constant ex:my_default_resource]
]
]
]
].
If I use a resource in the line rr:objectMap [rr:constant ex:my_default_resource], I get a literal like "https://example.org/my_default_resource" instead of the expected <https://example.org/my_default_resource> If I use a typed literal as object for the rr:constant, the type gets lost. Is there a way to force a conversion to a specific type? How to create resources from functions?
Metadata
Metadata
Assignees
Labels
No labels