lib/active_rdf.rb in activerdf_net7-1.6.16 vs lib/active_rdf.rb in activerdf_net7-1.7.0
- old
+ new
@@ -1,29 +1,40 @@
require 'rubygems'
# ActiveRDF loader
-file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
-this_dir = File.dirname(File.expand_path(file))
+# Provide (partial) reasoning for RDF and RDFS only (Default: false)
+$activerdf_internal_reasoning = false
-$: << this_dir + '/'
-$: << this_dir + '/active_rdf/'
+# If true, disable datatype support (Default: false)
+$activerdf_without_datatype = false
+ 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'
# load standard classes that need to be loaded at startup
+require 'objectmanager/namespace'
require 'objectmanager/resource_like'
require 'objectmanager/resource'
+require 'objectmanager/resource_query'
+require 'objectmanager/property'
+require 'objectmanager/property_lookup'
require 'objectmanager/bnode'
require 'objectmanager/literal'
-require 'objectmanager/namespace'
require 'federation/connection_pool'
require 'queryengine/query'
require 'federation/active_rdf_adapter'
+# Todo: Not used in ARDF any more? -> Still required for Talia
+require 'objectmanager/property_list'
ActiveRdfLogger::log_info "ActiveRDF loaded, logging level: #{ActiveRdfLogger::logger.level}"
def load_adapter s
begin
@@ -35,26 +46,26 @@
end
end
# determine whether activerdf is installed as a gem:
-if Gem::cache.search(/^activerdf$/).empty?
+if Gem::cache.find_name('activerdf').empty?
# we are not running as a gem
ActiveRdfLogger::log_info 'ActiveRDF is NOT installed as a Gem', self
if ENV['ACTIVE_RDF_ADAPTERS'].nil?
- if RUBY_PLATFORM =~ /java/
- load_adapter this_dir + '/activerdf/activerdf-jena/lib/activerdf_jena/init'
- load_adapter this_dir + '/activerdf/activerdf-sparql/lib/activerdf_sparql/sparql'
+ if RUBY_PLATFORM =~ /java/
+ load_adapter this_dir + '/activerdf/activerdf-jena/lib/activerdf_jena/init'
+ load_adapter this_dir + '/activerdf/activerdf-sparql/lib/activerdf_sparql/sparql'
load_adapter this_dir + '/../activerdf-sesame/lib/activerdf_sesame/sesame'
- else
- load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/rdflite'
- load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/fetching'
- load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/suggesting'
- 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'
- end
else
+ load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/rdflite'
+ load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/fetching'
+ load_adapter this_dir + '/../activerdf-rdflite/lib/activerdf_rdflite/suggesting'
+ 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'
+ end
+else
#load specified adapters
#for example: ENV['ACTIVE_RDF_ADAPTERS'] = "redland,sparql"
ENV['ACTIVE_RDF_ADAPTERS'].split(",").uniq.each { |adapterItem|
case adapterItem.strip.downcase
when "rdflite"