Redland RDF Language Bindings - Ruby RDoc - Class: Redland::TripleStore

### Home Classes Methods

### In Files

- rdf/redland/store.rb

### Parent

Object

### Methods

- ::create_finalizer
- ::new

### Files

- Makefile
- Makefile
- Makefile
- Makefile

### Class/Module Index

Quicksearch

- Redland
- Redland::BNode
- Redland::ContextParser
- Redland::FileStore
- Redland::HashOpen
- Redland::HashStore
- Redland::Literal
- Redland::MemoryStore
- Redland::MergedModel
- Redland::Model
- Redland::Namespace
- Redland::Node
- Redland::NodeIterator
- Redland::NodeTypeError
- Redland::OWL
- Redland::Parser
- Redland::Query
- Redland::QueryResults
- Redland::RDFS
- Redland::RedlandError
- Redland::Resource
- Redland::Serializer
- Redland::Statement
- Redland::Stream
- Redland::TripleStore
- Redland::Uri
- Redland::Util
- Redland::World
- DC
- FOAF

No matching classes.

# Redland::TripleStore

A class for storing RDF triples

### Attributes

store[RW]
store_type[RW]

### Public Class Methods

create_finalizer(store) click to toggle source

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

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

new(store_type='memory',name='',options='') click to toggle source

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

    # File rdf/redland/store.rb, line 10
    def initialize(store_type='memory',name='',options='')
      case store_type
      when "memory";
      when "hashes";
      when "file";
      when "uri";
      when "mysql";
      when "sqlite";
      when "postgresql";
      else
        raise RedlandError.new("Failed to initialize storage, unknown storage type [#{store_type}]")
      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

(C) Copyright 2004-2013 Dave Beckett, (C) Copyright 2004-2005 University of Bristol