Synchronizing RDF data from files with the ARC triple store

I have been playing with the excellent ARC framework for a small legal information project (more on that soon). I am beginning to think that many RDF usage scenarios involve data in files (stored in a file system) combined with a triple store that preferrably should be kept in sync with the files. Inspired by Niklas Lindström’s Oort I wrote a small plugin to do that in ARC.

The plugin extends the ARC2_Store class with a sync_with_folder($path_to_folder) method. Here is the source code for the initial version if you want to play with it. Rename the file to ARC2_FilesystemSynchronizerPlugin.php ansd save in the ARC plugin folder.

By popular request, here is a simple usage example:

 //Include ARC and configuration
include_once(‘path/to/arc/ARC2.php’);
include_once(‘path/to/arc/config.php’);

$store = ARC2::getComponent(‘FileSystemSynchronizerPlugin’, $config);
$store->sync_with_folder(“/root/path/to/file/store”);

Save the above code to a file called sync.php and run from the command line with php sync.php

Related Posts:

  • No Related Posts
  • Bruce

    I have almost no experience with PHP. Could you perhaps post a simple usage example?

  • ENC

    One request doesn’t really justify the expression ‘by popular demand’, but it does justify the inclusion of an example, which should have been there right from the beginning.
    Thanks for the post!