[ Expand All ] [ Collapse All ] - [ Properties (3) ] [ Methods (18) ] - [ Legend ]

Statement Class v. V0.9.1

Object
Statement

Class: Statement ----------------------------------------------------------------------------------

An RDF statement. In this implementation, a statement is not itself a resource. If you want to use a a statement as subject or object of other statements, you have to reify it first.

<BR><BR>History:<UL> <LI>05-30-2003 : Changed function compare(), added statementsorter($a,$b).</LI> <LI>02-21-2003 : getLabelSubject(), getLabelPredicate(), getLabelObject(), toStringSubject(), toStringPredicate(), toStringObject() added.</LI> <LI>09-10-2002 : First version of this class.</LI>

AuthorChris Bizer
Properties implemented by Statement
private method obj

Object of the statement

private method pred

Predicate of the statement

private method subj

Subject of the statement

Methods implemented by Statement
public method compare

PHPboolean compare(unknown $that)

Compares two statements and returns integer less than, equal to, or greater than zero. Can be used for writing sorting function for models or with the PHP function usort().

Arguments

public method equals

PHPboolean equals(unknown $that)

Checks if two statements are equal. Two statements are considered to be equal if they have the same subject, predicate and object. A statement can only be equal to another statement object.

Arguments

public method getLabelObject

PHPstring getLabelObject()

Reurns the URI, text or bNode identifier of the statements's object.

public method getLabelPredicate

PHPstring getLabelPredicate()

Returns the URI of the statements's predicate.

public method getLabelSubject

PHPstring getLabelSubject()

Returns the URI or bNode identifier of the statements's subject.

public method getObject

PHPobject getObject()

Returns the object of the triple.

Return

node

public method getPredicate

PHPobject getPredicate()

Returns the predicate of the triple.

Return

node

public method getSubject

PHPobject getSubject()

Returns the subject of the triple.

Return

node

public method hashCode

PHPstring hashCode()

Retruns the hash code of the triple.

public method object

PHPobject object()

Alias for getObject()

Return

node

public method predicate

PHPobject predicate()

Alias for getPredicate()

Return

node

public method reify

PHPobject reify(unknown $model_or_bNodeID)

Reifies a statement. Returns a new MemModel that is the reification of the statement. For naming the statement's bNode a Model or bNodeID must be passed to the method.

Arguments

Return

model

constructor Statement

PHPStatement(unknown $subj, unknown $pred, unknown $obj)

The parameters to constructor are instances of classes and not just strings

Arguments

public method subject

PHPobject subject()

Alias for getSubject()

Return

node

public method toString

PHPstring toString()

Dumps the triple.

public method toStringObject

PHPstring toStringObject()

Reurns a toString() serialization of the statements's object.

public method toStringPredicate

PHPstring toStringPredicate()

Returns a toString() serialization of the statements's predicate.

public method toStringSubject

PHPstring toStringSubject()

Returns a toString() serialization of the statements's subject.

Generated by PHPEdit - Copyright © 1999-2004 - Sébastien Hordeaux - WaterProof SARL