I am looking for a Java library for parsing SPARQL that would let me extract all the URIs from the queries. I've looked over openRDF (Sesame) a bit, but the API seems a bit over-complicated for such a task, so I'm not sure if I would rather just write my own parser. Any suggestions?
Thank you in advance!
asked 25 Jan '12, 09:23
I don't know of any library that does just what you say and nothing more. But I imagine you'll probably do well to use Sesame or ARQ to parse the query and then just walk the resulting query tree to identify the URIs. This smells to me like a situation in which dealing with something that is over-complicated is going to be a better (quicker, easier) choice than building your own solution, as tempting as the latter option often is to us engineers.
answered 25 Jan '12, 09:27
Whistles …coughs… …regex… feels ashamed.
answered 25 Jan '12, 17:24