RDF::LDF(3pm)

πŸ“¦
version 0.25.1 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 every RDF::Trine::Statement served 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 🫢


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