RDF::LDF(3pm)
π RDF::LDF π
okay bestie, so this is RDF::LDF β Linked Data Fragments client β and it's filed under User Contributed Perl Documentation, and it's about to be your new fave, no cap π¦
β¨ NAME β¨
RDF::LDF β Linked Data Fragments client π
π SYNOPSIS π
use RDF::Trine::Store::LDF;
use RDF::Trine::Store;
# To use a HTTP cache:
use LWP::UserAgent::CHICaching;
my $cache = CHI->new( driver => 'Memory', global => 1 );
my $ua = LWP::UserAgent::CHICaching->new(cache => $cache);
RDF::Trine->default_useragent($ua);
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 the low level modules themselves
use RDF::LDF;
my $client = RDF::LDF->new(url => 'http://fragments.dbpedia.org/2014/en');
my $iterator = $client->get_statements($subject, $predicate, $object);
while (my $statement = $iterator->()) {
# $model is a RDF::Trine::Statement
}
like, literally just plug in a URL and go π
πΈ DESCRIPTION πΈ
RDF::LDF implements a basic Linked Data Fragment client β the whole spec lives at <http://linkeddatafragments.org/> if you wanna vibe check it π
so real talk: this is a low level module that implements the Linked Data Fragment protocol. it's giving "I do the work behind the scenes" energy. you probably want to use RDF::Trine::Store::LDF instead β it's the one holding the main character energy while this one's backstage π¬
π«Ά CONFIGURATION π«Ά
urlβ the URL to retrieve RDF from, bestie π
Experimental: not me telling you that more than one URL can be provided for federated search over many LDF endpoints π like, yes, you can query a whole girl gang of endpoints at once:
my $store = RDF::Trine::Store->new_with_config({
storetype => 'LDF',
url => [ $url1, $url2, $url3 ]
});
# or
my $client = RDF::LDF->new(url => [ $url1, $url2, $url3 ]);
iconic behavior honestly π
π METHODS π
get_statements( $subject, $predicate, $object )β returns an iterator for everyRDF::Trine::Statementserved by the LDF server π like, hand it a subject, predicate and object and it hands you back the receipts πget_pattern( $bgp );β returns a stream object of all bindings matching the specified graph pattern π₯ (yes the semicolon is in the original, we keep it, we don't fix it, that's just how she's written π)
π§ CONTRIBUTORS π§
- Patrick Hochstenbach,
patrick.hochstenbach at ugent.be - Gregory Todd Williams,
greg@evilfunhouse.com - Jacob Voss,
voss@gbv.de
the group chat that made this happen π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2015 by Patrick Hochstenbach.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so go off, remix it, redistribute it, slay π β¨
and that's the whole page bestie!! this one's perl v5.36.0, dated 2023-07-03, and yes the manual page title is RDF::LDF(3pm) in case you forgot where you were π bye pookie, go fetch some linked data πΈπ¦
π¦ 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