rdf-virtuoso icon indicating copy to clipboard operation
rdf-virtuoso copied to clipboard

Consider testing repo with RDF_Queryable

Open gkellogg opened this issue 12 years ago • 2 comments

Great to see progress on this adaptor! Consider testing the repo against RDF_Queryable.

gkellogg avatar Oct 25 '12 04:10 gkellogg

Thanks, and sorry for late response!

Regarding RDF::Queryable, is this what you're referring to: https://github.com/datagraph/blog.datagraph.org/blob/master/2010/04/rdf-repository-howto.md Subclassing RDF::Virtuoso::Repository to RDF::Repository and using Sparql::Client for queries makes sense, but we have specific need for advanced Sparql 1.1. update and aggregate queries on the Virtuoso store and experienced issues regarding GET query length, http authentication, persistence, etc. so we made a mixin with the APISmith gem, and our own RDF::Virtuoso::Query.

I notice now that an Update class is underway on Sparql::Client https://github.com/bendiken/sparql-client/commit/2d562bba3cb0d6580c4ca6b06455233e8700ee98 Do you know if there is a move towards standardization of a Sparql 1.1 Update in RDF.rb in general?

Benjamin Oslo Public Library, Norway

bensinober avatar Jan 18 '13 12:01 bensinober

RDF::Queryable is a mixin module implemented by repositories supporting basic RDF queries; basically the work is done in #query_execute, or #query_pattern. The howto is a bit dated, but shows up as a general way to create a custom RDF Repository, which could support enumeration, querying and other persistence operations. It is probably not too difficult to have RDF::Virtuoso::Repository to either sub-class RDF::Repository, or to mix-in RDF::Queryable, which would also do the trick.

Doing this allows the #each_statement, #query and etc. methods, which is great idiomatic Ruby. Clearly, it won't give you the performance advantage of just using SPARQL::Client, but it is useful to operate like a normal RDF Repository.

@bendiken has been working on the SPARQL 1.1 updates for SPARQL::Client, including support for SPARQL Update; he might have more to say about it.

We're going to try to push out a 1.0 version of the RDF libraries soon, and do a 1.1 version along with the RDF 1.1 release. We're most of the way there, but there are some subtle changes to literals, Skolemnized BNodes and IRIs that we'll want to consider. Probably also some changes to RDF::Graph and RDF::Repository to be closer to the RDF 1.1 Concepts, but it shouldn't be too much.

gkellogg avatar Jan 18 '13 15:01 gkellogg