Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b6cc9b01e5
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (41 sloc) 1.535 kb
# Loader of ActiveRDF library
# Author:: Eyal Oren and Renaud Delbru
# Copyright:: (c) 2005-2006 Eyal Oren and Renaud Delbru
# License:: LGPL
# adding active_rdf subdirectory to the ruby loadpath
file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
this_dir = File.dirname(File.expand_path(file))
$: << this_dir
$: << this_dir + '/active_rdf/'
require 'active_rdf_helpers'
require 'active_rdf_log'
$ "ActiveRDF started, logging level: #{$log.level}"
# load standard classes that need to be loaded at startup
require 'objectmanager/resource'
require 'objectmanager/namespace'
require 'federation/connection_pool'
require 'queryengine/query'
require 'federation/active_rdf_adapter'
def load_adapter s
require s
rescue StandardError => e
$ "could not load adapter #{s}: #{e}"
require 'rubygems'
#determine if we are installed as a gem right now:
if Gem::cache().search("activerdf").empty?
#we are not running as a gem
$ 'ActiveRDF is NOT installed as a Gem'
load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/rdflite'
load_adapter this_dir + '/../activerdf-redland/lib/activerdf_redland/redland'
load_adapter this_dir + '/../activerdf-sparql/lib/activerdf_sparql/sparql'
load_adapter this_dir + '/../activerdf-yars/lib/activerdf_yars/jars2'
#we are indeed running as a gem
require 'gem_plugin'
$ 'ActiveRDF is installed as a Gem'
GemPlugin::Manager.instance.load "activerdf" => GemPlugin::INCLUDE
Jump to Line
Something went wrong with that request. Please try again.