drlivingston / kr

Clojure API for RDF and SPARQL - provides consistent access to APIs including Jena and Sesame
56 stars 17 forks source link

Access to remote Sesame #11

Open nicolasGuillouet opened 10 years ago

nicolasGuillouet commented 10 years ago

Hi Kevin,

I would be interested for future version by using remote Sesame. This solution is'nt already implemented ? We can only use in memory store ? Do you think it would be possible ? It is just a question, not a demand for the next release ;-)

Nicolas

nicolasGuillouet commented 10 years ago

I have my response : with this example . Can we also update data on remote ?

Nicolas

drlivingston commented 10 years ago

Hi Nicolas, KR doesn't really know the difference between what kind of KB it has. (Although, I guess it's true that different KBs could implement different parts of the interface.) All the Sesame repositories are treated pretty much the same. Anything you can do with an in-memory Sesame store you could do with an HTTP repository.

So yes you should be able to add triples too. (You might need to connect with a user name and password to have the permission to do so, it depends on your store what connection you get by default.)

Is that what you mean by update? If you mean delete, I haven't specifically wrapped that functionality yet. In my own use it's extremely rare, but I know other's must want to do it. You could make the calls directly to the repository object or we can extend the KR API for that - with a feature request. I don't think it would be that difficult, mostly a copy and paste of add and add-statement in core rdf, then extending the jena and sesame implementations.

If you mean via the SPARQL API inserts/deletes are also not wrapped, but you can use the api to send arbitrary sparql strings too, so I think it should support this. You could still use the helper functions in sparql to construct the where clause and namespace prefixes too. ... and maybe this isn't actually that much work to extend the apis for inserts deletes updates, but I would need a lot of tests to be sure.

Kevin

nicolasGuillouet commented 10 years ago

Ok thanks for your reply, I just anticipate a functionality I will need for future versions of my soft. I am not sure I will remove triples, only adding ... I'll let you know ...

Nicolas