Perl Linked Data Fragments client
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Patrick Hochstenbach d829e39952 0.251
2020-11-30 10:26:51 +01:00
bin Adding caching to the command line client 2016-03-16 11:41:46 +01:00
demo Fixing direct non-zero results bug. Adding more examples 2015-02-23 16:36:46 +01:00
lib/RDF 0.251 2020-11-30 10:26:51 +01:00
t Fixing update page predicates to latest Hydra spec #18 2016-03-31 20:44:55 +02:00
.gitignore Adding not needed dist.ini 2015-07-03 17:04:32 +02:00
.travis.yml Travis-ci: added support for ppc64le 2020-11-19 12:02:14 +00:00
Build.PL Adding missing dependencies 2020-11-30 09:44:09 +01:00
Changes 0.251 2020-11-30 10:26:51 +01:00
cpanfile Fixing dependencies 2020-11-30 10:26:00 +01:00
dist.ini fix author in META.json 2015-05-21 10:03:07 +02:00
LICENSE Fixing bad upload 2016-04-04 10:52:26 +02:00
MANIFEST.SKIP Adding not needed dist.ini 2015-07-03 17:04:32 +02:00
META.json Fixing dependencies 2020-11-30 10:26:00 +01:00
README.md Adding missing dependencies 2020-11-30 09:44:09 +01:00

NAME

RDF::LDF - Linked Data Fragments client

STATUS

Build Status Coverage Status Kwalitee Score

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
}

DESCRIPTION

RDF::LDF implements a basic Linked Data Fragment client.

This a low level module to implement the Linked Data Fragment protocol. You probably want to use RDF::Trine::Store::LDF.

CONFIGURATION

  • url

    URL to retrieve RDF from.

    Experimental: more than one URL can be provided for federated search over many LDF endpoints.

      my $store = RDF::Trine::Store->new_with_config({
              storetype => 'LDF',
              url => [ $url1, $url2, $url3 ]
      });
    
      # or
    
      my $client = RDF::LDF->new(url => [ $url1, $url2, $url3 ]);
    

METHODS

  • get_statements( $subject, $predicate, $object )

    Return an iterator for every RDF::Trine::Statement served by the LDF server.

  • get_pattern( $bgp );

    Returns a stream object of all bindings matching the specified graph pattern.

CONTRIBUTORS

Patrick Hochstenbach, patrick.hochstenbach at ugent.be

Gregory Todd Williams, [email protected]

Jacob Voss, [email protected]

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.