ActiveRDF is a library for accessing RDF data from Ruby programs. It can be used as data layer in Ruby-on-Rails, similar to ActiveRecord (which provides an O/R mapping to relational databases). ActiveRDF in RoR allows you to create semantic web applications very rapidly. ActiveRDF gives you a Domain Specific Language (DSL) for your RDF model: you can address RDF resources, classes, properties, etc. programmatically, without queries.
See www.activerdf.org for more information.
$ rake install
To use ActiveRDF with Sesame or Jena, you must use it with JRuby. To install ActiveRDF on JRuby, use the command below:
$ jruby -S rake install
The following example uses a SPARQL endpoint with FOAF data and displays all people found in the data source:
require 'rubygems' require 'active_rdf' ActiveRDF::ConnectionPool.add_data_source :type => :sparql, :host => '...' ActiveRDF::Namespace.register :foaf, 'http://xmlns.com/foaf/0.1/' ActiveRDF::ObjectManager.construct_classes people = FOAF::Person.find_all
ActiveRDF::ConnectionPool.add_data_source :type => :sesame, :location => 'path/to/store/dir', :inferencing => true
ActiveRDF::ConnectionPool.add_data_source :type => :sesame, :location => 'path/to/store/dir', :backend => 'owlim-se', :ruleset => 'owl-horst'
To use ActiveRDF with OWLIM-SE store, you must get OWLIM-SE >= 4.1 at http://www.ontotext.com/owlim.
After get OWLIM-SE files, execute the procedure below:
-
Extract OWLIM-SE files at your local computer;
-
Copy the content of ‘lib’ and ‘ext’ directories (from OWLIM-SE) to activerdf-sesame/ext;
-
Run rake install again.
Licence information: The OWLIM-SE LICENCE is granted free of charge. The LICENCEE is allowed to install and use the PRODUCTS for research and evaluation purposes only. For more details see http://www.ontotext.com/owlim-license-agreement.
ActiveRDF is distributed under the LGPL license.
-
Eyal Oren
-
Renaud Delbru
-
Sebastian Gerke
-
Benjamin Heitmann