Excellent, that was the problem, I was trying to get that information from OpProject but it is in OpExtend.
I was simply not looking at the right place. Thank you very much. On Thu, Mar 5, 2015 at 3:07 PM, Andy Seaborne <[email protected]> wrote: > On 05/03/15 13:05, trylks wrote: > >> 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 in advance. >> >> 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 >> >> > We seem to have crossed emails: > > My reply to the original email: > > http://mail-archives.apache.org/mod_mbox/jena-users/ > 201503.mbox/%3C54F83FA1.7000309%40apache.org%3E >
