Binding names in AbstractExpression

Can you use the MappingDictionary to map bindings to names? ie. is there a way in a function to get the name of an argument?

MappingDictionary maps internal numerical IDs to RDF terms (that is, IRIs, bnodes, or literals) and back. It's accessible inside a function via ValueSolution::getDictionary.

Cheers,
Pavel

Is there any way to map the binding long to the binding name?

MappingDictionary::getValue, if I understand your need correctly. That will return the RDF term for its ID.

Sorry, I should have been more specific. I'm trying to do something along the lines of named parameters.

select myfunc:paramName(?myParam) where {}

where inside the function I can get the name of the function argument "myParam

No, you can't get the myParam string currently. Function arguments aren't necessarily variables, could be other functions, constants, and variables. Each variable is identified with an integer ID which you can get via Variable::getName. However, the mapping between variable IDs and variable names isn't available inside functions. It's a different mapping than between long ID and RDF terms that's exposed through MappingDictionary.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.