Class RedlandAdapter
In: lib/activerdf_redland/redland.rb
Parent: ActiveRdfAdapter

Adapter to Redland database uses SPARQL for querying

Methods

Public Class methods

instantiate connection to Redland database

Public Instance methods

add triple to datamodel

deletes triple(s,p,o) from datastore nil parameters match anything: delete(nil,nil,nil) will delete all triples

returns all triples in the datastore

flush()

Alias for save

executes query and returns results as SPARQL JSON or XML results requires svn version of redland-ruby bindings

  • query: ActiveRDF Query object
  • result_format: :json or :xml

executes sparql query and returns results as SPARQL JSON or XML results

  • query: sparql query string
  • result_format: :json or :xml

instantiate connection to Redland database in Postgres

load a file from the given location with the given syntax into the model. use Redland syntax strings, e.g. "ntriples" or "rdfxml", defaults to "ntriples"

yields query results (as many as requested in select clauses) executed on data source

saves updates to the model into the redland file location

returns size of datasources as number of triples warning: expensive method as it iterates through all statements

[Validate]