METHODS

new ( $model )

Returns a new bridge object for the specified $model.

model ()

Returns the underlying model object.

new_resource ( $uri )

Returns a new resource object.

new_literal ( $string, $language, $datatype )

Returns a new literal object.

new_blank ( $identifier )

Returns a new blank node object.

new_statement ( $s, $p, $o )

Returns a new statement object.

is_node ( $node )
isa_node ( $node )

Returns true if $node is a node object for the current model.

is_resource ( $node )
isa_resource ( $node )

Returns true if $node is a resource object for the current model.

is_literal ( $node )
isa_literal ( $node )

Returns true if $node is a literal object for the current model.

is_blank ( $node )
isa_blank ( $node )

Returns true if $node is a blank node object for the current model.

equals ( $node_a, $node_b )

Returns true if $node_a and $node_b are equal

as_string ( $node )

Returns a string version of the node object.

literal_value ( $node )

Returns the string value of the literal object.

literal_datatype ( $node )

Returns the datatype of the literal object.

literal_value_language ( $node )

Returns the language of the literal object.

uri_value ( $node )

Returns the URI string of the resource object.

blank_identifier ( $node )

Returns the identifier for the blank node object.

add_uri ( $uri, $named )

Addsd the contents of the specified $uri to the model. If $named is true, the data is added to the model using $uri as the named context.

statement_method_map ()

Returns an ordered list of method names that when called against a statement object will return the subject, predicate, and object objects, respectively.

subject ( $statement )

Returns the subject node of the specified $statement.

predicate ( $statement )

Returns the predicate node of the specified $statement.

object ( $statement )

Returns the object node of the specified $statement.

get_statements ($subject, $predicate, $object)

Returns a stream object of all statements matching the specified subject, predicate and objects. Any of the arguments may be undef to match any value.

add_statement ( $statement )

Adds the specified $statement to the underlying model.

remove_statement ( $statement )

Removes the specified $statement from the underlying model.

get_context ($stream)

Returns the context node of the last statement retrieved from the specified $stream. The stream object, in turn, calls the closure (that was passed to the stream constructor in get_statements) with the argument 'context'.

supports ($feature)

Returns true if the underlying model supports the named $feature. Possible features include:

* named_graph
as_xml ($stream)

Returns an RDF/XML serialization of the results graph.