By the way, I want to ask you two questions accordingly, For 1), Can I get the total number first? cause it's better to calculate how much pages there are in advance. For 2), If the resultSet is very Large, will the transferring to List being broken up easily?
On Tue, Oct 22, 2013 at 6:31 PM, Wang Dongsheng <[email protected]> wrote: > Hi Samuel, > Thanks a lot, It's very cool~ :) > > Sincere~ > Wang > > > > On Tue, Oct 22, 2013 at 4:22 PM, Samuel Croset <[email protected]> > wrote: >> Hi, >> >> For 1) you can use the OFFSET and LIMIT constructs >> For 2) You can use: ResultSetFormatter.toList() >> >> See this answer >> http://answers.semanticweb.com/questions/9456/jena-pagination-for-sparql for >> more details. >> >> Cheers, >> >> Samuel >> >> >> On Tue, Oct 22, 2013 at 8:24 AM, Wang Dongsheng <[email protected]>wrote: >> >>> Hi, all >>> I want to implement pagination for ResultSet of Sparql. >>> I guess there are generally two ways: >>> >>> 1, Through a specified SPARQL format, but I dont know how to write the >>> query, >>> 2. Get the size of ResultSet. but there are no way to get the total >>> number that ResultSet contains. >>> >>> I prefer to implement the second way, But Doc of API seems unavailable. >>> >>> Any one tried this kind of effort? Or it was not suitable to paginate >>> the result? >>> >>> Thank in advance~ >>>
