Debian Codegraph @

README

raw
1 NAME
2
3 RDF::LDF - Linked Data Fragments client
4
5 SYNOPSIS
6
7 use RDF::Trine::Store::LDF;
8 use RDF::Trine::Store;
9
10 # To use a HTTP cache:
11 use LWP::UserAgent::CHICaching;
12 my $cache = CHI->new( driver => 'Memory', global => 1 );
13 my $ua = LWP::UserAgent::CHICaching->new(cache => $cache);
14 RDF::Trine->default_useragent($ua);
15
16 my $store = RDF::Trine::Store->new_with_config({
17 storetype => 'LDF',
18 url => $url
19 });
20
21 my $it = $store->get_statements();
22
23 while (my $st = $it->next) {
24 # $st is a RDF::Trine::Statement
25 print "$st\n";
26 }
27
28 # Or the low level modules themselves
29
30 use RDF::LDF;
31
32 my $client = RDF::LDF->new(url => 'http://fragments.dbpedia.org/2014/en');
33
34 my $iterator = $client->get_statements($subject, $predicate, $object);
35
36 while (my $statement = $iterator->()) {
37 # $model is a RDF::Trine::Statement
38 }
39
40 DESCRIPTION
41
42 RDF::LDF implements a basic Linked Data Fragment
43 <http://linkeddatafragments.org/> client.
44
45 This a low level module to implement the Linked Data Fragment protocol.
46 You probably want to use RDF::Trine::Store::LDF.
47
48 CONFIGURATION
49
50 url
51
52 URL to retrieve RDF from.
53
54 Experimental: more than one URL can be provided for federated search
55 over many LDF endpoints.
56
57 my $store = RDF::Trine::Store->new_with_config({
58 storetype => 'LDF',
59 url => [ $url1, $url2, $url3 ]
60 });
61
62 # or
63
64 my $client = RDF::LDF->new(url => [ $url1, $url2, $url3 ]);
65
66 METHODS
67
68 get_statements( $subject, $predicate, $object )
69
70 Return an iterator for every RDF::Trine::Statement served by the LDF
71 server.
72
73 get_pattern( $bgp );
74
75 Returns a stream object of all bindings matching the specified graph
76 pattern.
77
78 CONTRIBUTORS
79
80 Patrick Hochstenbach, patrick.hochstenbach at ugent.be
81
82 Gregory Todd Williams, [email protected]
83
84 Jacob Voss, [email protected]
85
86 COPYRIGHT AND LICENSE
87
88 This software is copyright (c) 2015 by Patrick Hochstenbach.
89
90 This is free software; you can redistribute it and/or modify it under
91 the same terms as the Perl 5 programming language system itself.
92