0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
An rdf repository plugin for bel.rb that uses Apache Jena's TDB data storage to support default and named graphs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0.0
~> 0.4.0
 Project Readme

bel-rdf-jena

This implements an RdfRepository plugin for bel.rb using Apache Jena' TDB Storage. This plugin relies on rdf-jena to interface with Apache Jena as an RDF.rb repository.

Features

  • Plugs in rdf-jena as an Rdf Repository plugin.
  • rdf-jena executable that allows creation of Apache Jena TDB database.

Requirements

  • JRuby 1.7 or 9k series (due to rdf-jena).

Install

First install the gem using:

gem install bel-rdf-jena

Now the plugin is installed and can be used by bel.rb.

Getting started

bel-rdf-jena executable

This gem includes an executable that can create an RDF database (Apache Jena TDB) from one or more RDF files.

You will have the bel-rdf-jena executable available to you (i.e. on your PATH) once you install this gem. Keep in mind that you may have to add $GEM_HOME/bin to your PATH to pick up installed executables.

Now to create an Apache Jena TDB database provide a directory and one or more.

Example:

bel-rdf-jena --dir /opt/data/resources_rdf --file biological-concepts-rdf.ttl

Note: It may take a while to load your RDF data. Apache Jena does a good job of balancing performance and memory allocation. You can increase memory allocation for the process by specifying the -J-Xmx4g (i.e. max heap size of 4 Gb) option in JRUBY_OPTS.

Example:

JRUBY_OPTS="-J-Xmx4g" bel-rdf-jena --dir /opt/data/resources_rdf --file biological-concepts-rdf.ttl

Tip: For the biological-concepts-rdf.ttl file found on the OpenBEL build server try setting this to -J-Xmx4g or -J-Xmx8g if possible.

Plugin to bel.rb for accessing Annotations and Namespaces

bel.rb provides an approach to plugins that is meant to be uncomplicated. The following steps will get you started:

  • Build gem with gem build .gemspec and install with gem install bel-rdf-jena-0.4.0.beta1-java.gem.
  • Now you have this plugin installed and ready for use in bel.rb!
  • With bel.rb installed run the command bel plugins to list available plugins.
$ bel plugins

RDF Repository plugins
----------------------

 Name:        Apache Jena RDF Repository
 Description: A repository of RDF data on Apache Jena using TDB storage.
  • To create the search implementation in Ruby try:
rdf_jena_plugin = BEL::RdfRepository.plugins[:jena]

rdf_jena_plugin.create_repository(:tdb_directory => 'data')
  • Enjoy access to RDF datasets through Apache Jena!

Development

branches

  • master branch

    • Contains stable code. Releases are created from this branch using a tag (e.g. MAJOR.MINOR.PATCH).
  • next branch

    • Contains unstable code. Commits should be merged into master after it stabilizes.

releases

Releases of bel-rdf-jena should follow these steps:

  1. Update the version in the VERSION file.

  2. Add changes for this version to the CHANGELOG file. This file is modelled after http://keepachangelog.com/.

  3. Push the changes for VERSION and CHANGELOG on the master branch.

  4. Ensure the master branch has all of the required changes.

  5. Create a git tag, named after the version, on the master branch. Push this tag to GitHub.

  6. Create the Ruby and Java RubyGem for bel-rdf-jena.

gem build .gemspec

  1. Create a release on GitHub for this version and attach the gem file.

  2. Push gems to RubyGems.

gem push bel-rdf-jena-VERSION-java.gem