Form of a bundle

The rdfherd tool provides an orderly interface for initializing, loading, updating, and otherwise managing a triple store.

Rdfherd's unit of loading, updating, or other processing is the 'bundle'. Most of the Neurocommons bundles are 'content bundles' consisting of content, i.e. collections of RDF statements. However, a bundle can also, or alternatively, contain scripts that manipulate the triple store in arbitrary ways, such as computing transitive closures.

Bundles are implemented as directories. A bundle's directory must contain a file Config.pl that contains directives to rdfherd (see below). For a content bundle, all other files are simply RDF or OWL files. These can provided in a variety of forms: XML/RDF (.rdf), Turtle (.ttl), a 'tar' archive (.tar), or any of these compressed (.gz). A bundles's directory can contain subdirectories, in which case all content in all subdirectories, recursively, is considered part of the bundle.

The common rules 'common/common.mk' for Neurocommons 'Makefiles' contains a rule 'make bundle' that will create a default Config.pl if none exists.

Here is a sample Config.pl:

{    class => "RDF Bundle", name => "bfo", version => 8, authority => "tag:jar@neurocommons.org,2009:jar_on_biota", graph => "http://www.ifomis.org/bfo/1.1", }

Class
The 'class' property should always be the string "RDF Bundle". (Rdfherd is "object-oriented" so that other bundles classes can be defined, but at present none is.)

Name
The name of the bundle, usually the same as the name of the bundle's directory. Should be unique among all bundles contributing to this triple store. The bundle name can be given as an argument to rdfherd commands such as bundle_update. (Future: these may be relative to a base URI, so that the "true" bundle name is a URI. Work in progress.)

Version
An integer that should increase each time a new version of the bundle is created, e.g. when a content source changes.

Erasing the previous version
The default is to load new content on top of old. To force the previous bundle version to be erased before loading, you need another directive. (TBD, is it 'no_need_to_clear_version' ?)

Phrased more declaratively: If a previous bundle version contains a triple that is not part of the current bundle version, this should be asserted.

Authority
This is part of a broken theory and will be replaced by a better mechanism soon. For what you need to do, see explanation at Package Makefile conventions.

Graph
The name of the SPARQL 'graph', for use in SPARQL queries.

More Config.pl features
This ought to be adequate for most content bundles. However there are many other features, such as scripts, dependencies, and multiple graphs per bundle.

Deploying bundles
For each triple store instance, create a directory, say 'store'.

Put all bundles in a directory, and put the name of that directory in the appropriate directive for Config.pl in directory 'store'.

(Talk about load/all and load/master)

Initialize the store according to rdfherd instructions.

Do 'bundle_update bundlename' to update the bundle.