|
Hello, 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! |
|
Whistles …coughs… …regex… feels ashamed. show me a regex and I'll show you a query on which it fails... 2
depending on whether you need something that always works or just that usually works, this might be a good solution. 1
You trying to summon Zalgo or something? http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
|


Have a look at this somewhat similar question and the provided answer on how to do this using Sesame's SPARQL parser: http://answers.semanticweb.com/questions/3187/extracting-s-p-o-tuple-statements-from-sparql-queries
In Oracle, you an just query the model for the URI...