1Attean::TripleModel(3)User Contributed Perl DocumentationAttean::TripleModel(3)
2
3
4
6 Attean::TripleModel - RDF model backed by a set of triple-stores
7
9 This document describes Attean::TripleModel version 0.030
10
12 use v5.14;
13 use Attean;
14 my $model = Attean::TripleModel->new( stores => {
15 'http://example.org/graph1' => $store1,
16 'http://example.org/graph2' => $store2,
17 } );
18
20 The Attean::TripleModel class represents a model that is backed by a
21 set of Attean::API::TripleStore objects, identified by an IRI string.
22 It conforms to the Attean::API::Model role.
23
24 The Attean::TripleModel constructor requires one named argument:
25
26 stores
27 A hash mapping graph IRI values to Attean::API::TripleStore objects
28 representing the backing triple-store for that graph.
29
31 "size"
32 "count_quads"
33 "count_quads_estimate"
34 "holds"
35 "get_graphs"
36 "get_quads ( $subject, $predicate, $object, $graph )"
37 Returns an Attean::API::Iterator for quads in the model that match
38 the supplied $subject, $predicate, $object, and $graph. Any of
39 these terms may be undefined or a Attean::API::Variable object, in
40 which case that term will be considered as a wildcard for the
41 purposes of matching.
42
43 The returned iterator conforms to both Attean::API::Iterator and
44 Attean::API::QuadIterator.
45
46 "plans_for_algebra( $algebra, $planner, $active_graphs, $default_graphs
47 )"
48 Delegates to an underlying store if the active graph is bound to
49 the store, and the store consumes Attean::API::CostPlanner.
50
51 "cost_for_plan( $plan )"
52 Attempts to delegate to all the underlying stores if that store
53 consumes Attean::API::CostPlanner.
54
55 "add_store( $graph => $store )"
56 Add the Attean::TripleStore $store object to the model using the
57 IRI string value $graph as the graph name.
58
59 "create_graph( $graph )"
60 Create a new Attean::TripleStore and add it to the model using the
61 Attean::API::IRI $graph as the graph name.
62
63 The store is constructed by using this object's "store_constructor"
64 attribute:
65
66 my $store = $self->store_constructor->($graph);
67
68 "drop_graph( $graph )"
69 Removes the store associated with the given $graph.
70
71 "add_quad ( $quad )"
72 Adds the specified $quad to the underlying model.
73
74 "remove_quad ( $quad )"
75 Removes the specified $quad from the underlying store.
76
77 "drop_graph( $graph )"
78 Removes the store associated with the given $graph.
79
80 "clear_graph( $graph )"
81 Removes all quads with the given $graph.
82
84 Please report any bugs or feature requests to through the GitHub web
85 interface at <https://github.com/kasei/attean/issues>.
86
89 Gregory Todd Williams "<gwilliams@cpan.org>"
90
92 Copyright (c) 2014--2020 Gregory Todd Williams. This program is free
93 software; you can redistribute it and/or modify it under the same terms
94 as Perl itself.
95
96
97
98perl v5.32.1 2021-02-08 Attean::TripleModel(3)