RMLio / rmlmapper-java

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources
http://rml.io
MIT License
146 stars 61 forks source link

Declared method "get" does not exist for class "io.fno.grel.ArrayFunctions" #143

Closed Bahar-Gh closed 2 years ago

Bahar-Gh commented 2 years ago

Hello,

I am trying to create a mapping in which I split the full name into a first name and last name using fno in rml (jar: rmlmapper-4.13.0-r359-all.jar ). My code is like

<#FunctionSplitName>
    fnml:functionValue [
                           rml:logicalSource <#LogicalSource>;
                           rr:predicateObjectMap [
                                                 rr:predicate fno:executes;
                                                 rr:objectMap [
                                                                  rr:constant grel:string_split
                                                              ];
                                             ];
                           rr:predicateObjectMap [
                                                 rr:predicate grel:valueParameter;
                                                 rr:objectMap [
                                                                  rml:reference "metadata__customer_name"
                                                              ];
                                             ];
                           rr:predicateObjectMap [
                                                 rr:predicate grel:p_string_sep;
                                                 rr:objectMap [
                                                                  rr:constant " ";
                                                              ];
                                             ];
                       ].

<#FunctionGetName>

    fnml:functionValue [
                           rr:predicateObjectMap [
                                                     rr:predicate fno:executes ;
                                                     rr:objectMap [ rr:constant grel:array_get ]
                                                 ] ;
                           rr:predicateObjectMap [
                                                     rr:predicate grel:p_array_a ;
                                                     rr:objectMap <#FunctionSplitName>
                                                 ] ;
                           rr:predicateObjectMap [
                                                     rr:predicate grel:param_int_i_from ;
                                                     rr:objectMap [
                                                                      rr:constant 0 ;
                                                                      rr:datatype xsd:integer ;
                                                                  ]
                                                 ];
                           rr:predicateObjectMap [
                                                     rr:predicate grel:param_int_i_opt_to ;
                                                     rr:objectMap [
                                                                      rr:constant 1 ;
                                                                      rr:datatype xsd:integer ;
                                                                  ]
                                                 ]
                       ].

When I run this, I will get the following error:

ERROR be.ugent.rml.cli.Main               .main(389) - Declared method "get" does not exist for class "io.fno.grel.ArrayFunctions".

It seems that I am getting this error regardless of the objectMap in grel:p_array_a of array_get function. For instance if I change the object map from <#FunctionSplitName> to something like

rr:objectMap [
            rml:reference "metadata__customer_name" ;
            rr:datatype   rdf:List ]

I will still get the same error. I'm not sure if I'm doing something wrong...

DylanVanAssche commented 2 years ago

Hi @Bahar-Gh !

Could you provide a minimal reproducible example: full mapping rules, input data and expected output?

Thanks!

no-response[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.