Skip to content

Commit

Permalink
Merge commit 'e9c5dd102b1f656378347ced1f0980fefae91d95' into talia_re…
Browse files Browse the repository at this point in the history
…merge
  • Loading branch information
averell23 committed Feb 11, 2010
2 parents 66ae6c7 + e9c5dd1 commit a3d0534
Show file tree
Hide file tree
Showing 35 changed files with 78 additions and 78 deletions.
2 changes: 1 addition & 1 deletion activerdf-jena/test/test_jena_adapter.rb
Expand Up @@ -14,7 +14,7 @@
require "fileutils"

class TestJenaAdapter < Test::Unit::TestCase
include ActiveRdf
include ActiveRDF

def setup
@adapter = ConnectionPool.add_data_source(:type => :jena, :ontology => :rdfs)
Expand Down
2 changes: 1 addition & 1 deletion activerdf-jena/test/test_ng4j_adapter.rb
Expand Up @@ -14,7 +14,7 @@
require "fileutils"

class TestNG4JAdapter < Test::Unit::TestCase
include ActiveRdf
include ActiveRDF

def setup
@adapter = ConnectionPool.add_data_source(:type => :ng4j)
Expand Down
2 changes: 1 addition & 1 deletion activerdf-rdflite/lib/activerdf_rdflite/fetching.rb
Expand Up @@ -3,7 +3,7 @@
# License:: LGPL

# FetchingAdapter is an extension to rdflite for fetching RDF from online sources.
module ActiveRdf
module ActiveRDF
class FetchingAdapter < RDFLite
ConnectionPool.register_adapter(:fetching, self)

Expand Down
4 changes: 2 additions & 2 deletions activerdf-rdflite/lib/activerdf_rdflite/rdflite.rb
Expand Up @@ -11,9 +11,9 @@
require 'mime/types'

# RDFLite is a lightweight RDF database on top of sqlite3. It can act as adapter
# in ActiveRdf. It supports on-disk and in-memory usage, and allows keyword
# in ActiveRDF. It supports on-disk and in-memory usage, and allows keyword
# search if ferret is installed.
module ActiveRdf
module ActiveRDF
class RDFLite < ActiveRdfAdapter
ActiveRdfLogger::log_info "Loading RDFLite adapter", self

Expand Down
2 changes: 1 addition & 1 deletion activerdf-redland/lib/activerdf_redland/redland.rb
Expand Up @@ -8,7 +8,7 @@

# Adapter to Redland database
# uses SPARQL for querying
module ActiveRdf
module ActiveRDF
class RedlandAdapter < ActiveRdfAdapter
ActiveRdfLogger::log_info "Loading Redland adapter", self
ConnectionPool.register_adapter(:redland,self)
Expand Down
2 changes: 1 addition & 1 deletion activerdf-sesame/lib/activerdf_sesame/sesame.rb
Expand Up @@ -4,7 +4,7 @@

require 'active_rdf'

module ActiveRdf
module ActiveRDF
# TODO: about this adapter
class SesameAdapter < ActiveRdfAdapter
ActiveRdfLogger::log_info "Loading Sesame adapter", self
Expand Down
2 changes: 1 addition & 1 deletion activerdf-sesame/test/test_sesame_adapter.rb
Expand Up @@ -19,7 +19,7 @@


class TestSesameAdapter < Test::Unit::TestCase
include ActiveRdf
include ActiveRDF

# TODO maybe put more stuff into setup and teardown...
def setup
Expand Down
2 changes: 1 addition & 1 deletion activerdf-sparql/lib/activerdf_sparql/sparql.rb
Expand Up @@ -5,7 +5,7 @@
require 'rexml/document'
require "#{File.dirname(__FILE__)}/sparql_result_parser"

module ActiveRdf
module ActiveRDF
# SPARQL adapter
class SparqlAdapter < ActiveRdfAdapter
ActiveRdfLogger::log_info "Loading SPARQL adapter", self
Expand Down
2 changes: 1 addition & 1 deletion activerdf-sparql/test/test_sparql_adapter.rb
Expand Up @@ -10,7 +10,7 @@


class TestSparqlAdapter < Test::Unit::TestCase
include ActiveRdf
include ActiveRDF

def setup
ConnectionPool.clear
Expand Down
2 changes: 1 addition & 1 deletion activerdf-yars/lib/activerdf_yars/jars2.rb
Expand Up @@ -9,7 +9,7 @@

# Read-only adapter to jars2
# (experimental YARS branch for SWSE engine)
module ActiveRdf
module ActiveRDF
class Jars2Adapter < ActiveRdfAdapter
ActiveRdfLogger::log_info "Loading Jars2 adapter", self
ConnectionPool.register_adapter(:jars2, self)
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/federation/active_rdf_adapter.rb
Expand Up @@ -2,7 +2,7 @@
require 'queryengine/query2sparql'

# Generic superclass of all adapters
module ActiveRdf
module ActiveRDF
class ActiveRdfAdapter
# indicate if adapter can read and write
bool_accessor :reads, :writes, :contexts, :enabled
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/federation/connection_pool.rb
Expand Up @@ -4,7 +4,7 @@
# right adapter for a given datasource, by either reusing an
# existing adapter-instance or creating new a adapter-instance.

module ActiveRdf
module ActiveRDF
class ConnectionPool
class << self
attr_accessor :write_adapter
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/federation/federation_manager.rb
Expand Up @@ -5,7 +5,7 @@
# Manages the federation of datasources: distributes queries to right
# datasources and merges their results

module ActiveRdf
module ActiveRDF
class FederationManager
def FederationManager.contexts
ConnectionPool.adapters.collect{|adapter| adapter.contexts if adapter.respond_to?(:contexts)}.flatten.compact
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/objectmanager/bnode.rb
@@ -1,6 +1,6 @@
require 'active_rdf'

module ActiveRdf
module ActiveRDF
Namespace.register(:bnode, "http://www.activerdf.org/bnode#")

class BNode < RDFS::Resource
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/objectmanager/literal.rb
Expand Up @@ -3,7 +3,7 @@

module RDFS
module Literal
ActiveRdf::Namespace.register :xsd, 'http://www.w3.org/2001/XMLSchema#'
ActiveRDF::Namespace.register :xsd, 'http://www.w3.org/2001/XMLSchema#'

class << self
attr_accessor :class_uri
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/objectmanager/namespace.rb
@@ -1,7 +1,7 @@
# require 'active_rdf'

# Manages namespace abbreviations and expansions
module ActiveRdf
module ActiveRDF
class Namespace
@@namespaces = Hash.new
@@inverted_namespaces = Hash.new
Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/objectmanager/object_manager.rb
@@ -1,7 +1,7 @@
# require 'active_rdf'

# Constructs Ruby classes for RDFS classes (in the right namespace)
module ActiveRdf
module ActiveRDF
class ObjectManager
# Constructs empty Ruby classes for all RDF types found in the data. Allows
# users to invoke methods on classes (e.g. FOAF::Person) without
Expand Down
16 changes: 8 additions & 8 deletions lib/active_rdf/objectmanager/property.rb
Expand Up @@ -45,7 +45,7 @@ def initialize(property, subject = nil)
end
end

self.class_uri = ActiveRdf::Namespace.lookup(:rdf, :Property)
self.class_uri = ActiveRDF::Namespace.lookup(:rdf, :Property)

def initialize_copy(property)
if @subject
Expand Down Expand Up @@ -77,7 +77,7 @@ def [](md5_or_value)
def []=(md5_or_value,new_value)
value = self[md5_or_value]
raise IndexError, "Couldn't find existing value to replace: #{md5_or_value}" unless value
ActiveRdf::FederationManager.delete(@subject, self.property, value)
ActiveRDF::FederationManager.delete(@subject, self.property, value)
add(new_value)
end

Expand Down Expand Up @@ -110,17 +110,17 @@ def ==(other)
def add(*args)
args.each do |arg|
if arg.respond_to?(:to_ary)
arg.to_ary.each {|item| ActiveRdf::FederationManager.add(@subject, self.property, item)}
arg.to_ary.each {|item| ActiveRDF::FederationManager.add(@subject, self.property, item)}
else
ActiveRdf::FederationManager.add(@subject, self.property, arg)
ActiveRDF::FederationManager.add(@subject, self.property, arg)
end
end
self
end

# Removes all values
def clear
ActiveRdf::FederationManager.delete(@subject, self.property)
ActiveRDF::FederationManager.delete(@subject, self.property)
self
end

Expand Down Expand Up @@ -176,7 +176,7 @@ def datatype=(type)
def delete(md5_or_value)
value = self[md5_or_value]
if value
ActiveRdf::FederationManager.delete(@subject, self.property, value)
ActiveRDF::FederationManager.delete(@subject, self.property, value)
value
elsif block_given?
yield
Expand All @@ -191,7 +191,7 @@ def delete_if(&block) # :yields: key, value

# Calls block once for each value, passing a copy of the value as a parameter
def each(&block) # :yields: value
q = ActiveRdf::Query.new.distinct(:o).where(@subject,self,:o,@context)
q = ActiveRDF::Query.new.distinct(:o).where(@subject,self,:o,@context)
if @lang and !@datatype
q.lang(:o,@lang,@exact_lang)
elsif @datatype and !@lang
Expand Down Expand Up @@ -294,7 +294,7 @@ def length
# If more than 1 value is found, ActiveRdfError is thrown.
def only
entries = self.entries
raise ActiveRdf::ActiveRdfError if entries.size > 1
raise ActiveRDF::ActiveRdfError if entries.size > 1
entries[0]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/active_rdf/objectmanager/property_lookup.rb
@@ -1,4 +1,4 @@
module ActiveRdf
module ActiveRDF
class PropertyLookup

# not directly chainable like ResourceQuery
Expand Down

0 comments on commit a3d0534

Please sign in to comment.