RDF::T...e::LDF(3pm)

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

πŸ’– 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 new RDF::Trine::Store object that's gonna act as a proxy for the Linked Data Fragment endpoint you can reach via the $url you 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 new RDF::Trine::Store object, configured by a hashref. the url is 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 be undef and 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 be undef to 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