NAME

RDF::Trine::Store - RDF triplestore base class

VERSION

This document describes RDF::Trine::Store version 0.125_01

METHODS

new_with_string ( $config )

Returns a new RDF::Trine::Store object based on the supplied configuration string. The format of the string specifies the Store subclass to be instantiated as well as any required constructor arguments. These are separated by a semicolon. An example configuration string for the DBI store would be:

DBI;mymodel;DBI:mysql:database=rdf;user;password

The format of the constructor arguments (everything after the first ';') is specific to the Store subclass.

new_with_config ( $hashref )

Returns a new RDF::Trine::Store object based on the supplied configuration hashref. This requires the the Store subclass to be supplied with a storetype key, while other keys are required by the Store subclasses, please refer to each subclass for specific documentation.

An example invocation for the DBI store may be:

my $store = RDF::Trine::Store->new_with_config({
                                                storetype => 'DBI',
                                                name      => 'mymodel',
                                                dsn       => 'DBI:mysql:database=rdf',
                                                username  => 'dahut',
                                                password  => 'Str0ngPa55w0RD'
                                               });
new_with_object ( $object )

Returns a new RDF::Trine::Store object based on the supplied opaque $object. If the $object is recognized by an available backend as being sufficient to construct a store object, the store object will be returned. Otherwise undef will be returned.

temporary_store

Returns a new temporary triplestore (using appropriate default values).

get_pattern ( $bgp [, $context] )

Returns a stream object of all bindings matching the specified graph pattern.

get_statements ($subject, $predicate, $object [, $context] )

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_contexts

Returns an RDF::Trine::Iterator over the RDF::Trine::Node objects comprising the set of contexts of the stored quads.

add_statement ( $statement [, $context] )

Adds the specified $statement to the underlying model.

remove_statement ( $statement [, $context])

Removes the specified $statement from the underlying model.

remove_statements ( $subject, $predicate, $object [, $context])

Removes the specified $statement from the underlying model.

count_statements ($subject, $predicate, $object)

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

size

Returns the number of statements in the store.

AUTHOR

Gregory Todd Williams <gwilliams@cpan.org>

COPYRIGHT

Copyright (c) 2006-2010 Gregory Todd Williams. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.