---
name: "RDF::Trine::Store::LDF"
section: "3pm"
platform: "linux"
package: "librdf-ldf-perl"
version: "0.25.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/RDF::Trine::Store::LDF"
---

# RDF::Trine::Store::LDF(3pm)

RDF Store proxy for a Linked Data Fragment endpoint

## NAME

RDF::Trine::Store::LDF - RDF Store proxy for a Linked Data Fragment endpoint

## SYNOPSIS

```
    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

RDF::Trine::Store::LDF provides a RDF::Trine::Store API to interact with a remote  Linked Data Fragment endpoint. For details see: \<http://linkeddatafragments.org/\>.

## METHODS

Beyond the methods documented below, this class inherits methods from the RDF::Trine::Store class.

- new({ url =\> url })

  Returns a new RDF::Trine::Store object that will act as a proxy for the Linked Data Fragment endpoint accessible via the supplied `$url`.

  Expertimental: more than one url as an ARRAY reference can be provided for an federated  query over many LDF endpoints.

- new\_with\_config( $hashref )

  Returns a new RDF::Trine::Store object configured by a hashref with the url as required key.

- get\_statements( $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.

- get\_pattern( $bgp )

  Returns an iterator object of all bindings matching the specified graph pattern.

- 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 specified subject, predicate and object.  Any of the arguments may be undef to match any value.

- size

  Returns the number of statements in the store.

- supports ( \[ $feature \] )

  Not supported.

## AUTHOR

Patrick Hochstenbach, `"patrick.hochstenbach at ugent.be"`

## CONTRIBUTORS

Gregory Todd Williams, `"greg@evilfunhouse.com"`

## 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.
