model
[ class tree: model ] [ index: model ] [ all elements ]

Class: RDF_Statement

Source Location: /RDF-0.2.0/RDF/Statement.php

Class Overview

RDF_Object
   |
   --RDF_Statement

An RDF statement.


Author(s):

Version:

  • V0.7

Variables

Methods


Inherited Variables

Inherited Methods

Class: RDF_Object

RDF_Object::factory()
RDF_Object::toString()
Serializes a object into a string

Class Details

[line 15]
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.



[ Top ]


Class Variables

$obj =

[line 39]

Object of the statement
  • Access: protected

Type:   object node


[ Top ]

$pred =

[line 31]

Predicate of the statement
  • Access: protected

Type:   object resource


[ Top ]

$subj =

[line 23]

Subject of the statement
  • Access: protected

Type:   object resource


[ Top ]



Method Detail

compare   [line 295]

boolean compare( object statement &$compare_with)

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().

  • Access: public

Parameters:

object statement   &$compare_with   — 

[ Top ]

equals   [line 249]

boolean equals( object statement $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.

  • Access: public

Parameters:

object statement   $that   — 

[ Top ]

factory   [line 49]

void factory( object node $subj, object node $pred, object node $obj)

The parameters are instances of classes and not just strings
  • Throws: PhpError

Overrides RDF_Object::factory() (parent method not documented)

Parameters:

object node   $subj   — 
object node   $pred   — 
object node   $obj   — 

[ Top ]

getLabelObject   [line 234]

string getLabelObject( )

Reurns the URI, text or bNode identifier of the statements's object.
  • Access: public

[ Top ]

getLabelPredicate   [line 223]

string getLabelPredicate( )

Returns the URI of the statements's predicate.
  • Access: public

[ Top ]

getLabelSubject   [line 212]

string getLabelSubject( )

Returns the URI or bNode identifier of the statements's subject.
  • Access: public

[ Top ]

getObject   [line 145]

object node getObject( )

Returns the object of the triple.
  • Access: public

[ Top ]

getPredicate   [line 118]

object node getPredicate( )

Returns the predicate of the triple.
  • Access: public

[ Top ]

getSubject   [line 91]

object node getSubject( )

Returns the subject of the triple.
  • Access: public

[ Top ]

hashCode   [line 156]

string hashCode( )

Retruns the hash code of the triple.
  • Access: public

[ Top ]

reify   [line 310]

object model &reify( mixed &$model_or_bNodeID)

Reifies a statement.

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

  • Access: public

Parameters:

mixed   &$model_or_bNodeID   — 

[ Top ]

setObject   [line 129]

object node setObject( $obj)

Set the object of the triple.
  • Access: public

Parameters:

   $obj   — 

[ Top ]

setPredicate   [line 102]

object node setPredicate( $pred)

Set the predicate of the triple.
  • Access: public

Parameters:

   $pred   — 

[ Top ]

setSubject   [line 75]

object node setSubject( $subj)

Set the subject of the triple.
  • Access: public

Parameters:

   $subj   — 

[ Top ]

toString   [line 168]

string toString( )

Dumps the triple.
  • Access: public

Overrides RDF_Object::toString() (Serializes a object into a string)
[ Top ]

toStringObject   [line 201]

string toStringObject( )

Reurns a toString() serialization of the statements's object.
  • Access: public

[ Top ]

toStringPredicate   [line 190]

string toStringPredicate( )

Returns a toString() serialization of the statements's predicate.
  • Access: public

[ Top ]

toStringSubject   [line 179]

string toStringSubject( )

Returns a toString() serialization of the statements's subject.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.