.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Attean::TripleModel 3pm" .TH Attean::TripleModel 3pm "2022-10-06" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Attean::TripleModel \- RDF model backed by a set of triple\-stores .SH "VERSION" .IX Header "VERSION" This document describes Attean::TripleModel version 0.033 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 6 \& use v5.14; \& use Attean; \& my $model = Attean::TripleModel\->new( stores => { \& \*(Aqhttp://example.org/graph1\*(Aq => $store1, \& \*(Aqhttp://example.org/graph2\*(Aq => $store2, \& } ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Attean::TripleModel class represents a model that is backed by a set of Attean::API::TripleStore objects, identified by an \s-1IRI\s0 string. It conforms to the Attean::API::Model role. .PP The Attean::TripleModel constructor requires one named argument: .IP "stores" 4 .IX Item "stores" A hash mapping graph \s-1IRI\s0 values to Attean::API::TripleStore objects representing the backing triple-store for that graph. .SH "METHODS" .IX Header "METHODS" .ie n .IP """size""" 4 .el .IP "\f(CWsize\fR" 4 .IX Item "size" .PD 0 .ie n .IP """count_quads""" 4 .el .IP "\f(CWcount_quads\fR" 4 .IX Item "count_quads" .ie n .IP """count_quads_estimate""" 4 .el .IP "\f(CWcount_quads_estimate\fR" 4 .IX Item "count_quads_estimate" .ie n .IP """holds""" 4 .el .IP "\f(CWholds\fR" 4 .IX Item "holds" .ie n .IP """get_graphs""" 4 .el .IP "\f(CWget_graphs\fR" 4 .IX Item "get_graphs" .ie n .IP """get_quads ( $subject, $predicate, $object, $graph )""" 4 .el .IP "\f(CWget_quads ( $subject, $predicate, $object, $graph )\fR" 4 .IX Item "get_quads ( $subject, $predicate, $object, $graph )" .PD Returns an Attean::API::Iterator for quads in the model that match the supplied \f(CW$subject\fR, \f(CW$predicate\fR, \f(CW$object\fR, and \f(CW$graph\fR. Any of these terms may be undefined or a Attean::API::Variable object, in which case that term will be considered as a wildcard for the purposes of matching. .Sp The returned iterator conforms to both Attean::API::Iterator and Attean::API::QuadIterator. .ie n .IP """plans_for_algebra( $algebra, $planner, $active_graphs, $default_graphs )""" 4 .el .IP "\f(CWplans_for_algebra( $algebra, $planner, $active_graphs, $default_graphs )\fR" 4 .IX Item "plans_for_algebra( $algebra, $planner, $active_graphs, $default_graphs )" Delegates to an underlying store if the active graph is bound to the store, and the store consumes Attean::API::CostPlanner. .ie n .IP """cost_for_plan( $plan )""" 4 .el .IP "\f(CWcost_for_plan( $plan )\fR" 4 .IX Item "cost_for_plan( $plan )" Attempts to delegate to all the underlying stores if that store consumes Attean::API::CostPlanner. .ie n .IP """add_store( $graph => $store )""" 4 .el .IP "\f(CWadd_store( $graph => $store )\fR" 4 .IX Item "add_store( $graph => $store )" Add the Attean::TripleStore \f(CW$store\fR object to the model using the \&\s-1IRI\s0 string value \f(CW$graph\fR as the graph name. .ie n .IP """create_graph( $graph )""" 4 .el .IP "\f(CWcreate_graph( $graph )\fR" 4 .IX Item "create_graph( $graph )" Create a new Attean::TripleStore and add it to the model using the Attean::API::IRI \f(CW$graph\fR as the graph name. .Sp The store is constructed by using this object's \f(CW\*(C`store_constructor\*(C'\fR attribute: .Sp .Vb 1 \& my $store = $self\->store_constructor\->($graph); .Ve .ie n .IP """drop_graph( $graph )""" 4 .el .IP "\f(CWdrop_graph( $graph )\fR" 4 .IX Item "drop_graph( $graph )" Removes the store associated with the given \f(CW$graph\fR. .ie n .IP """add_quad ( $quad )""" 4 .el .IP "\f(CWadd_quad ( $quad )\fR" 4 .IX Item "add_quad ( $quad )" Adds the specified \f(CW$quad\fR to the underlying model. .ie n .IP """remove_quad ( $quad )""" 4 .el .IP "\f(CWremove_quad ( $quad )\fR" 4 .IX Item "remove_quad ( $quad )" Removes the specified \f(CW$quad\fR from the underlying store. .ie n .IP """drop_graph( $graph )""" 4 .el .IP "\f(CWdrop_graph( $graph )\fR" 4 .IX Item "drop_graph( $graph )" Removes the store associated with the given \f(CW$graph\fR. .ie n .IP """clear_graph( $graph )""" 4 .el .IP "\f(CWclear_graph( $graph )\fR" 4 .IX Item "clear_graph( $graph )" Removes all quads with the given \f(CW$graph\fR. .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to through the GitHub web interface at . .SH "SEE ALSO" .IX Header "SEE ALSO" .SH "AUTHOR" .IX Header "AUTHOR" Gregory Todd Williams \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2014\-\-2022 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.