logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

AtteanX::Store::LDF - Linked Data Fragment RDF store

Author

       Patrick Hochstenbach  "<patrick.hochstenbach@ugent.be>" Kjetil Kjernsmo <kjetilk@cpan.org>.

Bugs

       Please  report  any   bugs   or   feature   requests   to   through   the   GitHub   web   interface   at
       <https://github.com/phochste/AtteanX-Store-LDF>.

Description

       AtteanX::Store::LDF provides a triple-store connected to a Linked Data Fragment server.  For more
       information on Triple Pattern Fragments consult <http://linkeddatafragments.org/>

Methods

       Beyond the methods documented below, this class inherits methods from the Attean::API::TripleStore class.

       new( start_url => $start_url )
           Returns  a  new LDF-backed storage object. The required "start_url" argument is a URL pointing at any
           Linked Data Fragment. The attribure will be coerced, so it can be a string, a URI object, etc.

       count_triples_estimate( $subject, $predicate, $object )
           Return the count of triples matching the specified subject, predicate and objects.

       get_triples( $subject, $predicate, $object)
           Returns a stream object of all statements matching the specified subject, predicate and objects.  Any
           of the arguments may be undef to match any value.

       cost_for_plan($plan)
           Returns  an  cost  estimation  for  a  single  LDF triple based on estimates. The cost will be in the
           interval 10-1000 if the supplied argument is a AtteanX::Plan::LDF::Triple, undef otherwise.

       plans_for_algebra($algebra)
           Returns an empty plan since access_plans generates the needed plans.

Name

       AtteanX::Store::LDF - Linked Data Fragment RDF store

See Also

       Attean , Attean::API::TripleStore

Synopsis

           use v5.14;
           use Attean;
           use Attean::RDF qw(iri blank literal);
           use AtteanX::Store::LDF;

           my $uri   = 'http://fragments.dbpedia.org/2014/en';
           my $store = Attean->get_store('LDF')->new(start_url => $uri);

           my $iter = $store->get_triples(undef,undef,literal("Albert Einstein"));

           while (my $triple = $iter->next) {
            say $triple->subject->ntriples_string .
              " " .
              $triple->predicate->ntriples_string .
              " " .
              $triple->object->ntriples_string  .
              " .";
           }

See Also