I am processing a SPARQL query with Jena ARQ, version 2.12.1 (the latest I found on maven central repository). For this I perform Algebra.compile(QueryFactory.read(__theQuery__)) and I navigate through the structure until I get to a OpProject.
I would like to obtain the real name of the variables in the head of the query, not the aliases. Alternatively a binding among them (variables and aliases) should suffice. I understand this information is present at OpProject.getVars. That method returns the variables, however both Var.getName and Var.getVarName methods return the alias of the variable, not the original name. I understand it would be possible to obtain the original name of the variable having the binding, according to the method Var.lookup, however I was not able to obtain such a binding from anywhere. I could not find information in the documentation for this specific matter. Thank you for your help. Referenced classes: com.hp.hpl.jena.sparql.algebra.op.OpProject com.hp.hpl.jena.query.QueryFactory com.hp.hpl.jena.sparql.algebra.Algebra com.hp.hpl.jena.sparql.core.Var
