RDF::T...e::LDF(3pm)
π RDF::Trine::Store::LDF π
okay bestie, so this is a page from the User Contributed Perl Documentation, section 3pm (that's the Perl module manpages, iykyk). It's all about RDF::Trine::Store::LDF β a lil RDF Store proxy that lets you vibe with a remote Linked Data Fragment endpoint. β¨
π¦ NAME π¦
RDF::Trine::Store::LDF β it's an RDF Store proxy, but make it a Linked Data Fragment endpoint. no cap. π
β¨ SYNOPSIS β¨
like, here's the whole vibe in code, bestie:
use RDF::Trine::Store::LDF;
use RDF::Trine::Store;
my $store = RDF::Trine::Store->new_with_config({
storetype => 'LDF',
url => $url
});
my $it = $store->get_statements();
while (my $st = $it->next) {
# $st is a RDF::Trine::Statement
print "$st\n";
}
# Or query the store with SPAQRL
use RDF::Query;
my $model = RDF::Trine::Model->new($store);
my $rdf_query = RDF::Query->new(<<EOF);
.
.
SPARQL
.
.
EOF
my $iter = $rdf_query->execute($model);
while (my $s = $iter->next) {
# $s is a RDF::Trine::VariableBinding
print $s->value . "\n";
}
πΈ DESCRIPTION πΈ
So RDF::Trine::Store::LDF hands you an RDF::Trine::Store API so you can chat with a remote Linked Data Fragment endpoint. it's giving long-distance relationship but with RDF π«Ά
For the deets, go look at: <http://linkeddatafragments.org/> β it's literally right there.
π METHODS π
Beyond the methods we're about to spill the tea on below, this class inherits a whole bunch of methods from the RDF::Trine::Store class. iconic behaviour honestly. π
new({ url => url })β Returns a newRDF::Trine::Storeobject that's gonna act as a proxy for the Linked Data Fragment endpoint you can reach via the$urlyou passed in.
β οΈ Expertimental (that's a typo in the original and I'm keeping it FR FR, do not @ me): you can actually pass more than one url as an ARRAY reference, and then it does a federated query over a whole bunch of LDF endpoints. main character energy, honestly.
new_with_config( $hashref )β Returns a newRDF::Trine::Storeobject, configured by a hashref. theurlis the required key β don't forget it bestie, it's required. π¨get_statements( $subject, $predicate, $object )β Returns a stream object of all the statements matching the subject, predicate and objects you asked for. Any of the args can beundefand that means "match literally anything". wildcard queen. πget_pattern( $bgp )β Returns an iterator object of all the bindings matching the graph pattern you specified. β¨get_contextsβ Not supported. πadd_statement ( $statement [, $context] )β Not supported. πremove_statement ( $statement [, $context])β Not supported. πremove_statements ( $subject, $predicate, $object [, $context])β Not supported. πcount_statements ( $subject, $predicate, $object )β Returns a count of all the statements matching the subject, predicate and object you specified. Any of the args can beundefto match any value. (same wildcard rules as above, slay) πsizeβ Returns the number of statements in the store. the literal headcount. π’supports ( [ $feature ] )β Not supported. π
π AUTHOR π
Patrick Hochstenbach, "patrick.hochstenbach at ugent.be" β the icon who made this happen. π«Ά
π CONTRIBUTORS π
Gregory Todd Williams, "greg@evilfunhouse.com" β shoutout to the co-star. β
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See <http://dev.perl.org/licenses/> for more information.
and that's the whole page, bestie π this one's perl v5.36.0, dated 2023-07-03. go forth and proxy those Linked Data Fragments, you absolute legend πΈβ¨π
π¦ where this page comes from
- debian trixie: librdf-ldf-perl 0.25.1-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: librdf-ldf-perl 0.25.1-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: librdf-ldf-perl 0.25.1-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: librdf-ldf-perl 0.25.1-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms