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

Support <bnode:> SPARQL extension in plugins.stores.sparqlstore #511

Closed
ssssam opened this issue Aug 22, 2015 · 1 comment
Closed

Support <bnode:> SPARQL extension in plugins.stores.sparqlstore #511

ssssam opened this issue Aug 22, 2015 · 1 comment
Labels
enhancement New feature or request SPARQL store Related to a store.
Milestone

Comments

@ssssam
Copy link
Contributor

ssssam commented Aug 22, 2015

Hello!
Right now the 'plugins.stores.sparqlstore' module has a big warning saying "The SPARQL Store does not support blank-nodes!" because they can't be expressed in SPARQL.

Playing with the 4Store triple store, I've found that it does actually let you represent blank nodes in SPARQL by using a special URI form, like this: <bnode:b000012>

In the process of getting the rdflib-web module to browse a 4Store triple store using the 'plugins.stores.sparqlstore' module, I hacked support for these blank nodes into the code, and it seems to be working fine. Without this change, rdflib-web can't be used on my data, it raises an exception as soon as it starts due to there being blank nodes in the data.

I noticed that the sparqlstore constructor takes a 'bNodeAsURI' flag which is completely unused, I thought maybe this is what it's meant for so I used that as a way of enabling this functionality.

@joernhees joernhees added enhancement New feature or request SPARQL store Related to a store. labels Aug 23, 2015
@joernhees joernhees added this to the rdflib 4.2.2 milestone Aug 23, 2015
@joernhees
Copy link
Member

see #512 for further discussion

joernhees added a commit to joernhees/rdflib that referenced this issue Mar 9, 2016
initBindings, contexts, addN, remove, add_graph and remove_graph now call the
node_to_sparql customizable function. Some support for BNode graph names added.

Add-on for RDFLib#513, see also RDFLib#511, RDFLib#512
joernhees added a commit to joernhees/rdflib that referenced this issue Mar 9, 2016
query (initBindings), contexts, addN, remove, add_graph and remove_graph now call
node_to_sparql. Some support for BNode graph names added.

Add-on for RDFLib#513, see also RDFLib#511, RDFLib#512
joernhees added a commit to joernhees/rdflib that referenced this issue Mar 9, 2016
query (initBindings), contexts, addN, remove, add_graph and remove_graph now call
node_to_sparql. Some support for BNode graph names added.

Add-on for RDFLib#513, see also RDFLib#511, RDFLib#512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SPARQL store Related to a store.
Projects
None yet
Development

No branches or pull requests

2 participants