AtteanX-Store-LDF
view release on metacpan or search on metacpan
lib/AtteanX/Store/LDF.pm view on Meta::CPAN
=head1 NAME
AtteanX::Store::LDF - Linked Data Fragment RDF store
=begin markdown
# STATUS
[](https://travis-ci.org/phochste/AtteanX-Store-LDF)
[](https://coveralls.io/r/phochste/AtteanX-Store-LDF)
[](http://cpants.cpanauthors.org/dist/AtteanX-Store-LDF)
=end markdown
=head1 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 .
" .";
}
=head1 DESCRIPTION
AtteanX::Store::LDF provides a triple-store connected to a Linked Data Fragment server.
For more information on Triple Pattern Fragments consult L<http://linkeddatafragments.org/>
=cut
use v5.14;
use warnings;
package AtteanX::Store::LDF;
our $AUTHORITY = 'cpan:KJETILK';
our $VERSION = '0.04';
use Moo;
use Attean;
use Type::Tiny::Role;
use Types::URI -all;
use RDF::LDF;
use namespace::clean;
use Carp;
with 'Attean::API::TripleStore', 'Attean::API::CostPlanner', 'MooX::Log::Any';
=head1 METHODS
Beyond the methods documented below, this class inherits methods from the
L<Attean::API::TripleStore> class.
=over 4
=item new( start_url => $start_url )
Returns a new LDF-backed storage object. The required C<start_url>
( run in 0.659 second using v1.01-cache-2.11-cpan-744e820c463 )