1RDF::Trine::Store(3)  User Contributed Perl Documentation RDF::Trine::Store(3)
2
3
4

NAME

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

VERSION

9       This document describes RDF::Trine::Store version 1.019
10

DESCRIPTION

12       RDF::Trine::Store provides a base class and common API for
13       implementations of triple/quadstores for use with the RDF::Trine
14       framework. In general, it should be used only be people implementing
15       new stores. For interacting with stores (e.g. to read, insert, and
16       delete triples) the RDF::Trine::Model interface should be used (using
17       the model as an intermediary between the client/user and the underlying
18       store).
19
20       To be used by the RDF::Trine framework, store implementations must
21       implement a set of required functionality:
22
23       ·   "new"
24
25       ·   "get_statements"
26
27       ·   "get_contexts"
28
29       ·   "add_statement"
30
31       ·   "remove_statement"
32
33       ·   "count_statements"
34
35       ·   "supports"
36
37       Implementations may also provide the following methods if a native
38       implementation would be more efficient than the default provided by
39       RDF::Trine::Store:
40
41       ·   "get_pattern"
42
43       ·   "get_sparql"
44
45       ·   "remove_statements"
46
47       ·   "size"
48
49       ·   "nuke"
50
51       ·   "_begin_bulk_ops"
52
53       ·   "_end_bulk_ops"
54

METHODS

56       "new ( $data )"
57           Returns a new RDF::Trine::Store object based on the supplied data
58           value.  This constructor delegates to one of the following methods
59           depending on the value of $data:
60
61           * "new_with_string" if $data is not a reference
62
63           * "new_with_config" if $data is a HASH reference
64
65           * "new_with_object" if $data is a blessed object
66
67       "new_with_string ( $config )"
68           Returns a new RDF::Trine::Store object based on the supplied
69           configuration string. The format of the string specifies the Store
70           subclass to be instantiated as well as any required constructor
71           arguments. These are separated by a semicolon. An example
72           configuration string for the DBI store would be:
73
74            DBI;mymodel;DBI:mysql:database=rdf;user;password
75
76           The format of the constructor arguments (everything after the first
77           ';') is specific to the Store subclass.
78
79       "new_with_config ( \%config )"
80           Returns a new RDF::Trine::Store object based on the supplied
81           configuration hashref. This requires the the Store subclass to be
82           supplied with a "storetype" key, while other keys are required by
83           the Store subclasses, please refer to each subclass for specific
84           documentation.
85
86           An example invocation for the DBI store may be:
87
88             my $store = RDF::Trine::Store->new_with_config({
89                           storetype => 'DBI',
90                           name      => 'mymodel',
91                           dsn       => 'DBI:mysql:database=rdf',
92                           username  => 'dahut',
93                           password  => 'Str0ngPa55w0RD'
94                         });
95
96       "new_with_object ( $object )"
97           Returns a new RDF::Trine::Store object based on the supplied opaque
98           $object.  If the $object is recognized by an available backend as
99           being sufficient to construct a store object, the store object will
100           be returned. Otherwise undef will be returned.
101
102       "nuke"
103           Permanently removes the store and its data.
104
105       "class_by_name ( $name )"
106           Returns the class of the storage implementation with the given
107           name.  For example, 'Memory' would return
108           'RDF::Trine::Store::Memory'.
109
110       "temporary_store"
111           Returns a new temporary triplestore (using appropriate default
112           values).
113
114       "get_statements ($subject, $predicate, $object [, $context] )"
115           Returns a stream object of all statements matching the specified
116           subject, predicate and objects. Any of the arguments may be undef
117           to match any value.
118
119       "get_contexts"
120           Returns an RDF::Trine::Iterator over the RDF::Trine::Node objects
121           comprising the set of contexts of the stored quads.
122
123       "add_statement ( $statement [, $context] )"
124           Adds the specified $statement to the underlying model.
125
126       "remove_statement ( $statement [, $context])"
127           Removes the specified $statement from the underlying model.
128
129       "remove_statements ( $subject, $predicate, $object [, $context])"
130           Removes the specified $statement from the underlying model.
131
132       "count_statements ($subject, $predicate, $object)"
133           Returns a count of all the statements matching the specified
134           subject, predicate and objects. Any of the arguments may be undef
135           to match any value.
136
137       "size"
138           Returns the number of statements in the store.
139
140       "etag"
141           If the store has the capability and knowledge to support caching,
142           returns a persistent token that will remain consistent as long as
143           the store's data doesn't change. This token is acceptable for use
144           as an HTTP ETag.
145
146       "supports ( [ $feature ] )"
147           If $feature is specified, returns true if the feature is supported
148           by the store, false otherwise. If $feature is not specified,
149           returns a list of supported features.
150

BUGS

152       Please report any bugs or feature requests to through the GitHub web
153       interface at <https://github.com/kasei/perlrdf/issues>.
154

AUTHOR

156       Gregory Todd Williams  "<gwilliams@cpan.org>"
157
159       Copyright (c) 2006-2012 Gregory Todd Williams. This program is free
160       software; you can redistribute it and/or modify it under the same terms
161       as Perl itself.
162
163
164
165perl v5.32.0                      2020-07-28              RDF::Trine::Store(3)
Impressum