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

Sparql path properties in rdflib #32

Open
sergeitarasov opened this issue Oct 31, 2019 · 5 comments
Open

Sparql path properties in rdflib #32

sergeitarasov opened this issue Oct 31, 2019 · 5 comments

Comments

@sergeitarasov
Copy link

Hi,
I wonder if R rdflib supports path properties in sparql queries, e.g., '+', '*', '/', etc? For example, I tried few queries:

WHERE {
dry:phenotype_17956 rdfs:subClassOf/rdfs:subClassOf ?x .
}'

WHERE {
dry:phenotype_17956 rdfs:subClassOf* ?x .
}'

and all of them return the same error about the syntax:

librdf error - syntax error, unexpected '/'
rdf_query_results.c:422: (librdf_query_results_to_string2) assertion failed: object pointer of type librdf_query_results is NULL.
Error: file must be a string, raw vector or a connection.

Cheers, Sergei

@amoeba
Copy link

amoeba commented Oct 31, 2019

Hi @sergeitarasov: rdflib is built on the redlands R package which is built on the redlands library which uses the Rasqal library for SPARQL queries which does not support Property Path expressions. See "Supported Query Languages" on that page. I think that explains your error.

@sergeitarasov
Copy link
Author

ok! Thanks for the prompt reply!

@cboettig
Copy link
Member

Thanks @amoeba ! @sergeitarasov , just in case it is helpful, Bryce and I have an alternative R package, https://github.com/ropensci/virtuoso, which uses virtuoso instead of redlands as the backend. I haven't actually tried Property Path expressions in virtuoso either, but have often found it covers cases that redlands library does not.

@amoeba
Copy link

amoeba commented Oct 31, 2019

Good call, @cboettig. I'd bet they work there.

@sergeitarasov
Copy link
Author

Thanks @cboettig ! I've just tried Virtuoso and it supports, at least some (like '/'), path expression.

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

No branches or pull requests

3 participants