Soheila DehghanZadeh
Soheila DehghanZadeh

Reputation: 419

adding a filter clause to jena to a SPARQL query using Jena ARQ

I have a jena query say select * where {?S ?p ? O} and I want to add a limit at the end to be select * where {?S ?p ? O} LIMIT 100, the approach proposed in Adding an OPTIONAL clause to a SPARQL query using Jena ARQ doesn’t work because there is no ElementLimit type of class and I also don't want to do string manipulation because there might be existing LIMIT clause which in that case I want to change the bound of existing clause.

Upvotes: 1

Views: 189

Answers (1)

AndyS
AndyS

Reputation: 16700

Element* are syntax items for things in the pattern matching. Limit is part fo the query level, not the pattern matching.

Asked on the jena users list the question was about OpLimit. Use OpSlice which is offset+limit combined.

Upvotes: 2

Related Questions