-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi,
Thank you for that nice tool.
I am trying out the custom function feature as described in the README.
My current problem is that even if the function returns a url, as:
functions: {
'http://example.com/grel.ttl#getSexUrl': function (data) {
if (data[0] == 1) {
return `http://publications.europa.eu/resource/authority/human-sex/MALE`;
} else {
return `http://publications.europa.eu/resource/authority/human-sex/FEMALE`;
}
}
},
But the generated RDF is:
<http://example.com/9791234567890> <http://data.europa.eu/m8g/sex> "http://publications.europa.eu/resource/authority/human-sex/FEMALE" .
What I want is a URL (and not a string) as object, for instance:
<http://example.com/9791234567890> <http://data.europa.eu/m8g/sex> <http://publications.europa.eu/resource/authority/human-sex/FEMALE> .
I am using the mapping as proposed in the README,
<#FunctionMap>
fnml:functionValue [
rml:logicalSource <#LOGICALSOURCE> ;
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [
rr:constant grel:getSexUrl;
rr:termType rr:IRI
]
] ;
rr:predicateObjectMap [
rr:predicate grel:inputString ;
rr:objectMap [ rml:reference "sex" ]
];
] .
I did also add a rr:termType rr:IR in the rr:objectMap (see here above), but same result.
I am no RML expert, and tried out quite a few things with no good result (even worse with the "help" of chatGPT)
Thank you for any pointer.
Fabian