The Librarian:
an RDF-backed catalogue system

About

The RDF Librarian Project ('librarian') is a python code library providing easy methods to create a catalog management system with a back-end in RDF.

The RDFlib is a very useful way to manipulate triples in a RDF store. With minimal knowledge of RDF, it is not difficult to envision how RDF can be used to represent any kind of catalogue.

A catalogue structure is usually relatively simple: a catalog is filled with items, and for each item a list of properties has associated values. Given this framework, managing a catalogue by manipulating triples in RDF again and again may seem overkill.

The issue above is precisely what this library is about:

Providing access to the data through both these paradigms is one way to achieve both ease of use (for normal tasks) and flexibility.

Download

Browse the code or download it from the public CVS repository.

Documentation and Examples

How this library works, and how to use it

Concepts

The single most important concept behind this library is the concept of object programming.

This technique can hardly be explained in only a few lines, so we suggest you read books or documentation on the topic if you are not familiar with it. The basic idea of Object programming is that the code does not solely revolve around procedure, but around objects. Each object is a well-defined entity, with given data structure (variables) and data access (also called methods).

Every object is defined by a class, which can be understood as a blueprint used to create each instance of an object. In Object-oriented languages, classes follow the concept of inheritance, where a basic class defines a generic object, and a derived class defines a more specific object based on the generic one.

In practice...

This is the key concept in the 'librarian': the RDFlib defines a 'Store', the librarian then builds on top of that to define a more specific store that can be used as a generic catalog. This class can be derived again, to create a specific kind of catalogue.

This is precisely how the librarian is used:

Samples: the librarian in action

A rather simple demonstration of the process above: some very simple code built on top of the librarian allows the rapid and easy creation of a DVD catalogue manipulation system, or a DVD listing from this catalogue.