Dear andy
Thanks for clarification, 

>>1)  select ?film where { ?film rdf:type movie:film .  Filter(?release_date>= 
>>"2010-12-31"^^xsd:date ) } 

>> 2) select ?actor where { ?film rdf:type movie:film . ?film movie:hasActor 
>> ?actor . }  


>>Yes - loop in the results of the first query, passing in a QuerySolution 
>>each time to the second.


Is there any option to pass all my results of     ?film   say 1000bindings 

as query solution ones instead of looping externally?

Because I am trying to calculate some statistics over my sample second query 
above based on all values 

passed on selected variables from first query. 


One thing what I could think of is like building the First query below as 

a Sub query to the Second. But I dont know if it will work and 

I have to now look for  how can I build subqueries syntactically. If you can 
help me, pointing 

methods to build subqueries syntactically , it will be really quick for me to 
test. Hope I am not 

asking stupid questions.


Thank You
regards

ajaz 

 











________________________________
 From: Andy Seaborne <[email protected]>
To: [email protected] 
Sent: Friday, 25 November 2011 10:40 AM
Subject: Re: Query Exceution Factory with Initial Query Solution Bindings
 
On 25/11/11 06:12, ajaz shaik wrote:
> Dear all,
>
>
> I have a small question in query execution factory method . Sorry If its a 
> repeated question.
>
> static public QueryExecution create(Query query, Dataset dataset, 
> QuerySolution initialBinding)
>
> Should the initial binding, bind all the variables present in the current 
> query which is passed?

It can bind some or all of the variables in the query to be executed. 
"some" is more common.

Think of it as simply replacing each variable with it's value in the 
binding and then execution the query.

(That is a good mental model ... because that is exactly how it works! 
It rewrites the query with the initialBinding as replacements)

> Example:
>
>
> I have an initial query
>
>
> select ?films where { ?film rdf:type movie:film .  Filter(?release_date>= 
> "2010-12-31"^^xsd:date ) }  --->  initialBinding

No "?films" on the pattern : ?films => ?film

> who's solutions I want to pass to query
>
> select ?actor where { ?film rdf:type movie:film . ?film movie:hasActor ?actor 
> . }  -->query
>
> and the dataset.

Yes - loop in the results of the first query, passing in a QuerySolution 
each time to the second.

> Will  my query results gets effected on intial bindings of film ?

Yes.

> If not how can I fulfill such requirement of mine.. any guidence will be 
> really helpful
>
>
> Regards,
>
> aj
>

    Andy

Reply via email to