Skip to content

Adds a method to call a remote SPARQL end point, but without having to use Jena.#66

Open
egonw wants to merge 1 commit into
bioclipse:developfrom
egonw:feature/sparqlRemote
Open

Adds a method to call a remote SPARQL end point, but without having to use Jena.#66
egonw wants to merge 1 commit into
bioclipse:developfrom
egonw:feature/sparqlRemote

Conversation

@egonw

@egonw egonw commented Mar 4, 2018

Copy link
Copy Markdown
Member

The reason why this is needed is the Jena tries to parse the SPARQL and complains
about non-standard extensions, e.g. by Blazegraph. Because the returned content is
XML, I opted for returning a byte stream, as passing around Java String sometimes
conflicts with XML content.

This allows a script like:

rawResults = bioclipse.sparqlRemote(
    "https://query.wikidata.org/sparql", sparql
)
results = rdf.processSPARQLXML(rawResults, sparql)

Full example: https://gist.github.com/egonw/ca4c348b9a2d1116efcdb55fa85dd158

This PR is linked to one for bioclipse.rdf, which I'll prepare next.

…o use Jena.

The reason why this is needed is the Jena tries to parse the SPARQL and complains
about non-standard extensions, e.g. by Blazegraph. Because the returned content is
XML, I opted for returning a byte stream, as passing around Java String sometimes
conflicts with XML content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant