Go to Redland Home - Language Bindings Home - Ruby API Home
Class Redland::TripleStore
In: rdf/redland/store.rb
Parent: Object

A class for storing RDF triples

Methods

Attributes

store  [RW] 
store_type  [RW] 

Public Class methods

You shouldn’t use this. Used internally for cleanup.

[Source]

# File rdf/redland/store.rb, line 29
    def TripleStore.create_finalizer(store)
      proc {|id| "Finalizer on #{id}"
        $log_final.info "closing store"
        Redland::librdf_free_storage(store) if store
      }
    end

Creates a store with the given type, name, and options

[Source]

# File rdf/redland/store.rb, line 10
    def initialize(store_type='memory',name='',options='')
      case store_type
      when "memory";
      when "hashes";
      when "file";
      else
        raise RedlandError.new('Failed to initialize storage')
      end
      @name = name
      @store_type = store_type
      @store=Redland.librdf_new_storage($world.world,store_type,name,options)
      unless @store
        raise RedlandError.new("Creating Storage Failed")
      end

      ObjectSpace.define_finalizer(self,TripleStore.create_finalizer(@store))
    end

Go to Redland Home - Language Bindings Home - Ruby API Home

Copyright 2004-2005 Dave Beckett, Institute for Learning and Research Technology, University of Bristol