RDF API for Drupal 6.x

Arto's picture

Only local images are allowed.

I've been working on an RDF API for Drupal 6.x for a few months now, but have been reluctant to much discuss it publicly until such time that I had something that was viable and (dare I say it) usable. Given that I've been fortunate enough to recently find funding for part of this work, and that certain key people (thanks Boris and Ivan) have encouraged me to be less of an introvert, I will in the immediate future be doing a series of posts about the project.

The project is currently in an early alpha status and consists of an ensemble of interrelated Drupal modules, four of which are currently downloadable from the RDF project page. The diagram to the right shows the intended components of the final version (note that RDFbus is a separate project).

Compared to the earlier RDF-related projects for Drupal, the RDF API is minimal and not overly ambitious. Its main purpose is simply to provide a uniform API and storage abstraction layer for querying and storing RDF statements in repositories, letting other Drupal modules hook into this to provide the actual implementation of storage backends and any other higher-level functionality. The RDF API exports a number of Drupal hooks, through which other modules can implement e.g. repositories, parsers and serializers for RDF formats, and namespace abbreviations.

I started the project before the ARC2 library was available, but have recently rewritten parts of it to use ARC. While the core RDF API isn't dependent on ARC and provides a more Drupal-like procedural interface, it will also automatically load up ARC if it has been installed, facilitating ARC usage on Drupal. In addition, ARC is explicitly needed e.g. for the RDF Import and and RDF Export modules, as the RDF API itself provides serialization functionality only for the programmer-oriented RDF/PHP and RDF/JSON formats.

Here are some early sneak peeks of the administration interface provided by these modules, showing the data query & export screens, the various settings and the repository management screen, and the status report entry indicating whether the ARC2 library has been installed or not:

Only local images are allowed. Only local images are allowed. Only local images are allowed.
Only local images are allowed. Only local images are allowed. Only local images are allowed.

Some more screenshots are available, and there is some (very preliminary) developer documentation as well.

The API is still ongoing rapid evolution and refactoring, and there are components (such as the RDF Schema and SPARQL modules shown on the diagram) which I've not published yet; I'd recommend that anyone interested in this project subscribe to the RSS feed of the CVS commits.

There is already one published Drupal 6.x module that requires the RDF API as a dependency, namely the Skype Status module, which retrieves users' Skype online presence information from Skype's public RDF-based presence service, using the RDF API to parse the data and cache it as a named graph in a local RDBMS-backed repository provided by the RDF DB module. While this is a trivial module, it can perhaps be useful as an example of RDF API usage for the moment, and I would point any interested developers at its source code for reference.

I'm interested in collaborating with the authors of the existing RDF projects for Drupal as they move forward to Drupal 6.x. For developers, introducing the RDF API as a dependency will mean not having to worry about many of the incidental details of RDF, including reading and writing e.g. RDF/XML, thus freeing up more time to concentrate on the higher-level functionality. Additionally, there is clear opportunity for network effects in case we manage to standardize on a uniform API. I've already began discussions with Jonathan and Dan, and would love to hear from anyone else. I will also be at FOSDEM 2008, and I'm easy to recognize - I'll be the guy wearing sunglasses when coding ;-)

More information to follow.



scor's picture

Well done Arto! That looks like a good start for a Semantic Web enabled Drupal!

Semantic Web Publishing with Drupal

tiernosbah@gmail.com's picture

Good morning, Stéphane

  1. Is there a follow-up to the paper “Semantic Web Publishing with Drupal” you co-published in 2009 with Richard Cyganiak Axel Polleres Stefan Decker?

  2. I would like to draw further from your professional experience for my SemanticAfrica project.


I'm thrilled !

Thomas_Zahreddin's picture

Arto, that was the thing, I had in mind while talking with the group in Barcelona! It is an fantastic starting point, because of the openness of an API and not being a Modul hard to connect to.

Enabeling Drupal to handle and interact with RDF Stores and Databases as a Service this will open totally new dimension for contentent and metadata of content. With this Metadata is also a new Level of funktions possible - starting with all the recommodation-tools, going on with a sematical / logical drill down and aggreation of data and whatever you can imagin. Have a look in what Google is interested: http://video.google.com/videoplay?docid=-7704388615049492068

You will find this also expressed in Dries vision "From infinite extensibility to infinite interoperability" http://buytaert.net/from-infinite-extensibility-to-infinite-interoperabi... .

An API is in my opinion the best way to lay a cornerstone - Arto thank you for your effort, so lets go and spread the news!

Have a look here.

neoliminal's picture


I'm working out some of the logistical issues involved in passing fields from server to server. Perhaps these issues have already been solved in your implementation. In particular the issues I raise are those related to remote and local revisions of field data.

John Kipling Lewis

Semantic Web

Group organizers

Group events

  • 2018-05-31 17:00 - 2018-06-02 18:00 Europe/Amsterdam
Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: