Thank you for your reply. You're right, more like a join where they have common 
variables...
The main idea of what i'm doing is that i get 2 ResultSets from 2 different 
reasoners(and queryEngines) running the same ontology and i want to combine the 
results as if it was one query.
So i would like to make a function like this: public ResultSet 
getJoin(ResultSet a, ResultSet b){
for(; a.hasNext() ;)
for(; b.hasNext() ;)
....
....
Any ideas cause i'm kind of new to Jena???
 
> Date: Sat, 7 May 2011 21:40:31 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: Intersection of 2 ResultSet in Jena
> 
> 
> 
> On 07/05/11 17:25, Jorge Christodoulou wrote:
> >
> > Does anyone know a way to get the intersection of two Result 
> > Sets(com.hp.hpl.jena.query.ResultSet)?
> 
> I'm curious - what's the use case for this?
> 
> There's nothing to do that. You will have to write some code to do it - 
> getting the results as QueryIterators may make it possible to write it 
> using ARQ query engine code. Maybe.
> 
> Do you want exact intersection or where they have common variables, the 
> values are the same (which is a join).
> 
> Andy
                                          

Reply via email to