NAME
RDF::Query::Model::RDFTrine - An RDF::Query::Model backend for interfacing with an RDF::Trine model.
VERSION
This document describes RDF::Query::Model::RDFTrine version 2.201, released 30 January 2010.
METHODS
new ( $model )
-
Returns a new bridge object for the specified
$model
. meta ()
-
Returns a hash reference with information (class names) about the underlying backend. The keys of this hash are 'class', 'model', 'statement', 'node', 'resource', 'literal', and 'blank'.
'class' is the name of the bridge class. All other keys refer to backend classes. For example, 'node' is the backend superclass of all node objects (literals, resources and blanks).
model ()
-
Returns the underlying model 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, $format )
-
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. add_string ( $data, $base_uri, $named )
-
Adds the contents of
$data
to the model. If$named
is true, the data is added to the model using$base_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.
_get_named_statements ( $subject, $predicate, $object, $context )
-
Returns a stream object of all statements matching the specified subject, predicate, object and context. Any of the arguments may be undef to match any value.
_get_basic_graph_pattern ( @triples )
-
Returns a stream object of all variable bindings matching the specified RDF::Trine::Statement objects.
add_statement ( $statement )
-
Adds the specified
$statement
to the underlying model. remove_statement ( $statement )
-
Removes the specified
$statement
from the underlying model. count_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.
node_count ( $subj, $pred, $obj )
-
Returns a number representing the frequency of statements in the model matching the given triple. This number is used in cost analysis for query optimization, and has a range of [0, 1] where zero represents no matching triples in the model and one represents matching all triples in the model.
supports ($feature)
-
Returns true if the underlying model supports the named
$feature
. Possible features include:* basic_graph_pattern * named_graph * node_counts * temp_model * xml
fixup ( $pattern, $query, $base, \%namespaces )
-
Called prior to query execution, if the underlying model can optimize the execution of
$pattern
, this method returns a optimized RDF::Query::Algebra object to replace$pattern
. Otherwise, returnsundef
and thefixup
method of$pattern
will be used instead. cost_naive ( $bgp, $context )
cardinality_naive ( $bgp, $context )
generate_plans ( $algebra, $context )