Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

egonw
Copy link
Member

@egonw egonw commented Mar 4, 2018

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
1 participant