Class Redland::Model
In: lib/rdf/redland/model.rb
Parent: Object

Methods

Included Modules

Util

Attributes

model  [R] 

Public Class methods

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

Constructor - takes an optional argument store, which should be one of the storage classes (all derived from TripleStore)

Public Instance methods

Add the triples (s,p,o) to the model with the optional context

Add the Statement to the Model with optional context Node

Add the Stream of Statements to the Model with optional context Node

list the model contents as a stream of statements

yield the contexts defined in the model. If the store wasn‘t set up for contexts raises a RedlandError. If no block_given returns an array of the contexts

create a resource for this model. The str can be a String, or a Redland::Uri

Remove the statement made of the triples (s,p,o) with the optional context Node

Remove the Statements from the Model with the given context Node

Remove the Statement from the Model with the optional context Node

a screen dump of the triples, if context is included a screen dump of the triples for the given context

find the statements matching the given triple. The triples can be nil

Find all triples with FOAF[‘firstName’] of Dominic

  model.find(nil,FOAF['firstName'],'Dominic Sisneros'){|s,p,o ...}

get a resource given by str. If arg is a string it will create a Resource from it.

Returns true if the given Triple is in the model

Returns true if the Statement is in the Model

Return one Node in the Model matching (source, predicate,?) The source and predicate can be a Node or Uri

parser the file with the given parser and uri and smushes the file with the model on the statements with the given predlist

Return an array of Predicate Nodes in the Model matching (subject,?,target) The subject and target can be a Node or Uri If block_given? yields the Subject Node

execute a query

clears the transactions (?? confirm)

saves this model to the specified filename

Return the size of the Storage Model. Raises a redland error if the model has non countable storage

Effectively removes a Predicate from the Model by replacing all occurrences with a blank node (?? confirm)

Return one Node in the Model matching (?,predicate,target) The source and predicate can be a Node or Uri

Return an array of Subject Nodes in the Model matching (?,predicate,target) The predicate and target can be a Node or Uri If block_given? yields the Subject Node

[Validate]