I've done some basic views integration for querying data stored as RDF. I'd like to know if anyone else has started something similar, or thought about this at all. The functionality that I'm aiming for in the near team is: Displaying object literals, creation dates, predicates, subject & contexts. Filtering on contexts, predicates, creation dates, subjects & objects. Once this basic functionality is done I'm going to look at creating views that span multiple statements, ie if towns are in provinces and provinces are in countries, so me all the towns in France.
Comment | File | Size | Author |
---|---|---|---|
#4 | rdf_views_2.patch | 6.49 KB | jmiccolis |
#2 | rdf_views.patch | 6.21 KB | jmiccolis |
Comments
Comment #1
davidseth CreditAttribution: davidseth commentedThis is cool. Tell me more!!!
Comment #2
jmiccolis CreditAttribution: jmiccolis commentedAttached is a patch which exposes the rdf information in the local datastore to views. It makes the basic fields of each rdf statement available (subject, predicate, object, context, uid, created time) and provides for filtering on created time, predicate and context.
This patch doesn't apply to the alpha3 tarball, so you'll need to use CVS HEAD.
Comment #3
Arto CreditAttribution: Arto commentedComment #4
jmiccolis CreditAttribution: jmiccolis commentedThis is an update of the previous patch that adds relationship support. This allows you (among other things) to join data in two local rdf repositories.
Comment #5
fagoreally interesting.
What do you think about the idea to use a SPARQL query engine together with views? Imo this would be the best possible way to query rdf data with views, but it's also more difficult to do.. :(
-> First off we would need something like that patch: http://drupal.org/node/293841
Comment #6
jmiccolis CreditAttribution: jmiccolis commented@fago - I've put a little bit of effort in that direction lately (see http://drupal.org/node/293841 ), and I'm convinced it's possible to provide a query class to views that will generate SPARQL , though it's not straight forward how you'd map the the SQLisms that are baked into views against SPARQL concepts that are somewhat different.
Really though I want it both ways; views having SQL based understanding of my local rdf store, as well as the capacity for generating SPARQL queries that reach out to the larger 'net.
Comment #7
fago>it's not straight forward how you'd map the the SQLisms that are baked into views against SPARQL concepts that are somewhat different.
Indeed, that's no easy task. We could automatically parse the schema and generate fields for properties with literal values and relationships else? To allow querying the larger net we would need a way for the user to add some more schemas, I think.
Comment #8
talatnat CreditAttribution: talatnat commentedSubscribing.
Comment #9
Arto CreditAttribution: Arto commented@Jeff: apologies for the delay, but I've now finally committed your patch in changeset [171969].
You did a nice job, and I'm looking forward to more of these.
To ensure I don't become a bottleneck, I've given you CVS access to the project. Feel free to enhance the Views integration etc. by committing directly to CVS at your convenience (however, for any more extensive changes that would e.g. modify the module's existing core code or APIs I'd prefer that you first post a patch in the tracker for review).