Hi Tim, you are close to the solution. There are various implementations of IVarValue, and one of them is RDFNodeVarValue. So try casting it into that class to get the actual RDFNode: RDFNode rdfNode = ((RDFNodeVarValue)varValue).getRDFNode();
Holger On Jan 26, 2011, at 7:51 AM, Smith, Tim wrote: > Hi, > > I’m having a problem retrieving the resource to which a variable is bound > once inside my SM module. > > In the createGraph method, I make the following call: > > this.getContext().getVarBindings().getBinding(<var name>); > > According to the java doc found here, this should return a > > com.hp.hpl.jena.rdf.model.RDFNode > > However, TBC thinks it will return an > > org.topbraid.sparqlmotion.engine.IVarValue > > which I cannot find in the javadoc anywhere. Any attempt to cast the result > of the above call, fails. > > Any thoughts on how I can retrieve the resource to which the variable is > bound? I can see how to do it if the getBinding(…) call returned an RDFNode. > Am I looking at the correct javadoc? > > Thanks for your thoughts, > > Tim > > > > -- > You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include TopBraid Composer, > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/topbraid-users?hl=en -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
