RDF instance data (and ontology) management on a Sesame Triple-Store

Events happening in the community are now at Drupal community events on www.drupal.org.
JemRayfield's picture

Hi,

Firstly, let me introduce myself. I am a technical architect working at the BBC. I have architected an RDF based publishing solution. You can find some details here: http://www.bbc.co.uk/blogs/bbcinternet/2010/07/bbc_world_cup_2010_dynami...

However I need to add functionality to the architecture to facilitate a simple tool to allow BBC journalists to add/delete/amend RDF ontology instance data within a Sesame/BigOWLIM triplestore. The BBC sport site wishes to use the architecture to publish dynamic content aggregations based on a triple asset->tag->ontology model. Where we wish to create a set of tools for managing the instance data within a number of ontologies including sport.

So....there are a number of options. Tools such as fluid ops information workbench, Mondeca ITM, Uberlic etc.

However I was thinking that Drupal 7/CCK/RDF might be a solution for generating content types linked to a back-end sesame triplestore and associated set of ontologies.

The only issue I have is trying to find enough documentation to be able to configure drupal 7 with the correct modules in order that I might be able to achieve such a requirement. At the moment I am a little lost and could do with some direction.....

In fact I am not sure if there are modules suitable for this type of RDF content managment within Drupal?

So any pointers with regards to possible Drupal configuration or indeed pointing me towards module build etc would be greatly appreciated.

Thanks any help/pointers greatly appreciated
Jem Rayfield

Comments

Similar Project

jenelfarrell's picture

Hey Jem,

I'm the digital archivist at American Public Media and will be working on similar issues in the near future. I'd like to be connected to you so that we can exchange learnings. Here's my contact info: jfarrell@mpr.org

Regards,
jenel

Drupal in front of a triple store

milesw's picture

Jem,

Great job on the writeup for your project. It's not often I read articles related to semantic web that are so...digestible :)

Some examples for the kind of workflow you have in mind would be helpful. However, I'm pretty sure that your requirements would involve much more than installing the right modules and configuring them. Any development your group could contribute in this area would be tremendously valuable since I guarantee your use case will become more common in the next few years.

Have you investigated the Entity API and Field API (specifically the Field Storage API) yet?

I would also suggest looking at this thread about round-tripping RDF, particularly the comments from scor.

Nice to see that someone with

Jimmel's picture

Nice to see that someone with a lot of experience with real RDF publishing is looking for the configurations and modules to use and looking for some documentation that may point out how to practically use RDF in Drupal. I am not an expert in RDF technology, but have an passing interest in what it can provide in the future and I am glad it is not just me who wants some pragmatic tutorials in laymans terms to implement rdfs.

It seems that the ethereal theory that has surrounded the Semantic Web is finally becoming a practical tool through Drupal. I feel that real life semantic technologies are now within reach without having to spend vasts amounts of valuable time researching the whole area. Hopefully the experts and researchers as they have been doing so far will keep up the good work.

While the RDF functionality

scor's picture

While the RDF functionality in core is pretty stable and functional, it is not the case yet for the contributed modules like the RDF project, which you would need to specify what ontologies to map to your Drupal content types and fields to. Note that CCK does not exist in Drupal 7, it's been merged into core except for node and user reference which live in the references project now (though the concepts remain the same).

As for the storage of RDF data, I started the RDFDB library as the D7 database counterpart. RDFDB supports ARC2, Virtuoso and 4store. I looked at how this could work with Sesame but Sesame does not seem to offer any SPARQL Update functionality, so I would be curious to have your opinion on how to update RDF data via HTTP with Sesame, I guess they might have their own proprietary language or API maybe?

Feel free to give more details about your scenario so we can give you more detailed answers here! Maybe you could specify where Drupal would sit in the architecture diagram of the BBC write up?

Hi Scor, We require a tool

JemRayfield's picture

Hi Scor,

We require a tool primarily to manage ontology instance data. With a direct integration point into our back-end triplestore.

Drupal<->Sesame<->TripleStore

Drupal may well need its own local persistence for managing state changes before publication into the TripleStore perhaps using the MySQL/PostGres model?

The tool should be able to import ontology RDF and associated instance RDF for editing, viewing and ultimately publishing back into the triple-store. Ideally building CMS mappings based on RDF inspection.

So for example a we would want a tool to be able to manage a small piece of RDF for a football team such as Aberdeen. Allowing a journalist to change labels, links, profiles...etc...etc..

@prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
@prefix foaf: http://xmlns.com/foaf/0.1/ .
@prefix owl: http://www.w3.org/2002/07/owl# .
@prefix xsd: http://www.w3.org/2001/XMLSchema# .
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# .
http://www.bbc.co.uk/things/de96e227-7e77-974f-aab2-2e37598c5cc2#id a http://www.bbc.co.uk/ontologies/sport/CompetitiveSportingOrganisation ;
foaf:name "Aberdeen" ;
http://www.bbc.co.uk/ontologies/sport/shortName "Aberdeen"^^ .
http://dbpedia.org/resource/Aberdeen_F.C. a http://www.bbc.co.uk/ontologies/domain/ExternalId .
http://www.bbc.co.uk/domain/external-id-type/dbpedia a http://www.bbc.co.uk/ontologies/domain/ExternalIdType .
http://dbpedia.org/resource/Aberdeen_F.C. http://www.bbc.co.uk/ontologies/domain/externalIdType http://www.bbc.co.uk/domain/external-id-type/dbpedia .
http://www.bbc.co.uk/things/de96e227-7e77-974f-aab2-2e37598c5cc2#id http://www.bbc.co.uk/ontologies/domain/externalId http://dbpedia.org/resource/Aberdeen_F.C. .
a http://www.bbc.co.uk/ontologies/domain/ExternalId .
http://www.bbc.co.uk/domain/external-id-type/press-association a http://www.bbc.co.uk/ontologies/domain/ExternalIdType .
http://www.bbc.co.uk/ontologies/domain/externalIdType http://www.bbc.co.uk/domain/external-id-type/press-association .
http://www.bbc.co.uk/things/de96e227-7e77-974f-aab2-2e37598c5cc2#id http://www.bbc.co.uk/ontologies/domain/externalId .
http://www.afc.co.uk/ a http://www.bbc.co.uk/ontologies/domain/Document ;
http://www.bbc.co.uk/ontologies/domain/documentType http://www.bbc.co.uk/domain/domaintype/external , http://www.bbc.co.uk/domain/documenttype/homepage .
http://www.bbc.co.uk/things/de96e227-7e77-974f-aab2-2e37598c5cc2#id http://www.bbc.co.uk/ontologies/domain/document http://www.afc.co.uk/ .
http://www.bbc.co.uk/sport/football/teams/aberdeen a http://www.bbc.co.uk/ontologies/domain/Document ;
http://www.bbc.co.uk/ontologies/domain/documentType http://www.bbc.co.uk/domain/documenttype/homepage , http://www.bbc.co.uk/domain/documenttype/bbc-document .
http://www.bbc.co.uk/things/de96e227-7e77-974f-aab2-2e37598c5cc2#id http://www.bbc.co.uk/ontologies/domain/document http://www.bbc.co.uk/sport/football/teams/aberdeen .

etc...etc...etc..

It would be great if we could inspecting a class its predicates and object literal types and build an appropriate CMS UI form associated to these literal types. Populate with the associated instance data and then allow editing for publication back into the triple-store.
(Of course the mapping could be done manually using something within Drupals content-type UI, but this would be quite painful.)

On top of this we need a mechanism for navigating the graph (or searching the graph) in order that we can pick particular instances for editing.
I guess something similar to: http://iwb.fluidops.com/
However with a little more control as to which class/predicates/literals are available for administration via a strong set of ACL's. Also with a level of CMS workflow for saving changes, routing changes for review and then finally publishing.

A journalist may for example want to change the name of a football team, a player profile or change the relationship between a player and a football team. All of which need to be possible within a simple web UI.

So the tool should be able to (at a high level):

1) Map content objects (labels/data-items) for class instances into an editable form or other simple UI. (Dynamically or by manual mappings)
2) Be able to change and save changes to instance data before actually publishing to the triple-store. (A pre-publication save)
3) Publish RDF instance data changes back into the triple-store.
(Transactionally. Triple delete/adds must occur within a transactional context).
Named graph CRUD operations will not work and need to act on specific sub-graphs identified within RDF->UI mapping
4) Be able to import spreadsheets of data to map against class/properties for bulk RDF updates

On the sesame question, the sesame 2.x HTTP protocol is specified here and describes all the HTTP verbs for statement query/modification.
http://www.openrdf.org/doc/sesame2/system/ch08.html

sparql update is not part of the sparql spec and thus each implementation is slightly different....

Ideally we also need to be able to manage/administer ontology class/predicate structure however I don't see a CMS (such as Drupal) being the right tool for this kind of task at this stage. In addition ontology schema versioning etc...

In anycase at the moment, it appears that this looks to be a fairly large custom build on top of Drupal. As a number of the building blocks don't appear to be in place. Such as:

1) Full triplestore integration (sesame or other)
2) RDF inspection and associated automated content-type mapping
3) RDF search or navigation

Please do correct me if I am wrong here...

Cheers
Jem

We've been building something

xtfer's picture

We've been building something similar using Drupal 6 for the Australian National University – though it focusses on aggregating published information. You may wish to take a look at the Simple RDF module which was written for this project. Simple RDF publishes RDF data which we aggregate with Virtuoso, and is similar to work Scor completed on RDF CCK, though with a few more options and controls.

The main limitation is that the content types must be built and mapped manually, though it could be possible to generate these dynamically. Due to its architecture, Drupal requires you to build everything natively – and to be fair, if you weren't building it natively there's not much point in using it. Trying to use it as a way to manipulate and manage an RDF triple store directly wouldn't work particularly well anyway (yet).

Semantic Web

Group organizers

Group notifications

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