oeg-upm / mapeathor

Translator of spreadsheet mappings into R2RML, RML or YARRRML
https://morph.oeg.fi.upm.es/tool/mapeathor
Apache License 2.0
30 stars 10 forks source link

Non valid turtle from Function #43

Open mnieuwland opened 2 years ago

mnieuwland commented 2 years ago
Given the following configuration in the Function tab: FunctionID Feature Value
\ fno:executes ex:function
\ zin:p_dec_a {omvang}
\ zin:p_dec_b 36

The following RML file is generated:

<#Divide>
    a rr:TriplesMap;
    a fnml:FunctionTermMap;
    rr:termType rr:IRI;

    fnml:functionValue [
        rml:logicalSource [
            rml:source "source.csv";
            rml:referenceFormulation ql:CSV;
        ];
        rr:predicateObjectMap [
            rr:predicate fno:executes ;
            rr:objectMap rr:constant ex:function
        ];
        rr:predicateObjectMap [
            rr:predicate zin:p_dec_a ;
            rr:objectMap rml:reference [ "omvang" ]
        ];
        rr:predicateObjectMap [
            rr:predicate zin:p_dec_b ;
            rr:objectMap rr:constant [ "36" ]
        ];
    ]
.

I believe this should be:

<#Divide>
    a rr:TriplesMap;
    a fnml:FunctionTermMap;
    rr:termType rr:IRI;

    fnml:functionValue [
        rml:logicalSource [
            rml:source "source.csv";
            rml:referenceFormulation ql:CSV;
        ];
        rr:predicateObjectMap [
            rr:predicate fno:executes ;
            rr:objectMap [ rr:constant ex:function ]
        ];
        rr:predicateObjectMap [
            rr:predicate zin:p_dec_a ;
            rr:objectMap [ rml:reference "omvang" ]
        ];
        rr:predicateObjectMap [
            rr:predicate zin:p_dec_b ;
            rr:objectMap [ rr:constant "36" ]
        ];
    ]
.

Notice the difference in the use of brackets in lines following rr:objectMap (three times, line numbers 13, 17 and 21)