Class Redland::Statement
In: lib/rdf/redland/statement.rb
Parent: Object

Redland Statement (triple class). The main means of manipulating statements is by the subject,predicate,and object properties

  require 'rdf'
  Statement creation from nodes
  statement1 = Statement.new(node1,node2,node3)
  statement2 = Statement.new(:statement=>statement)

  if statement2.resource?
    puts "statement2.subject has uri #{statement2.subject.uri}"

Methods

==   create_finalizer   new   object   object=   predicate   predicate=   subject   subject=   to_s  

Included Modules

Util

Attributes

statement  [R]  the internal librdf statement

Public Class methods

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

create a new Statement with subject,predicate,and object the subject, predicate, and objects can be of class String or Uri.

Public Instance methods

Equivalency. Only works for comparing two Statements

return the object of the statement triple. The return value is either a Literal or Resource depending if object returned from the store is literal or not

set the object of the statement

return the predicate of the statement triple.

set the predicate of the statement

return the subject of the statement triple. The subject is of class Resource

set the subject of the statement

Convert this Statement to a string

[Validate]