| RDF-Trine documentation | view source | Contained in the RDF-Trine distribution. |
new ()new_with_config ( $hashref )store ( $filename )load ( $filename )temporary_storeget_statements ($subject, $predicate, $object [, $context] )get_pattern ( $bgp [, $context] )supports ( [ $feature ] )get_contextsadd_statement ( $statement [, $context] )remove_statement ( $statement [, $context])remove_statements ( $subject, $predicate, $object [, $context])count_statements ($subject, $predicate, $object)
RDF::Trine::Store::Hexastore - RDF store implemented with the hexastore index
This document describes RDF::Trine::Store::Hexastore version 0.135
use RDF::Trine::Store::Hexastore;
RDF::Trine::Store::Hexastore provides an in-memory triple-store based on six-way indexing as popularized by Hexastore.
Beyond the methods documented below, this class inherits methods from the RDF::Trine::Store class.
new ()Returns a new storage object using the supplied arguments to construct a DBI object for the underlying database.
new_with_config ( $hashref )Returns a new storage object configured with a hashref with certain keys as arguments.
The storetype key must be Hexastore for this backend.
This module also supports initializing the store from a file or URL,
in which case, a sources key may be used. This holds an arrayref of
hashrefs. To load a file, you may give the file name with a file
key in the hashref, and to load a URL, use url. See example
below. Furthermore, the following keys may be used:
syntaxThe syntax of the parsed file or URL.
base_uriThe base URI to be used for a parsed file.
The following example initializes a Hexastore store based on a local file and a remote URL:
my $store = RDF::Trine::Store->new_with_config(
{storetype => 'Hexastore',
sources => [
{
file => 'test-23.ttl',
syntax => 'turtle',
},
{
url => 'http://www.kjetil.kjernsmo.net/foaf',
syntax => 'rdfxml',
}
]});
store ( $filename )Write the triples data to a file specified by $filename.
This data may be read back in with the load method.
load ( $filename )Returns a new Hexastore object with triples data from the specified file.
temporary_storeReturns a temporary (empty) triple store.
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_pattern ( $bgp [, $context] )Returns a stream object of all bindings matching the specified graph pattern.
supports ( [ $feature ] )If $feature is specified, returns true if the feature is supported by the
store, false otherwise. If $feature is not specified, returns a list of
supported features.
get_contextsadd_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.
Please report any bugs or feature requests to
<gwilliams@cpan.org>.
Gregory Todd Williams <gwilliams@cpan.org>
Copyright (c) 2006-2010 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| RDF-Trine documentation | view source | Contained in the RDF-Trine distribution. |