---
name: "RDF::Query::ServiceDescription"
section: "3pm"
platform: "linux"
package: "librdf-query-perl"
version: "2.919-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/RDF::Query::ServiceDescription"
---

# RDF::Query::ServiceDescription(3pm)

Class for describing federated query data sources.

## NAME

RDF::Query::ServiceDescription - Class for describing federated query data sources.

## VERSION

This document describes RDF::Query::ServiceDescription version 2.919.

## METHODS

- "new ( $service\_uri, %data )"

  - "new\_from\_uri ( $url )"

  Creates a new service description object using the DARQ-style service description data located at `$url`.

- "new\_with\_model ( $model )"

  Creates a new service description object using the DARQ-style service description data loaded in the supplied `$model` object.

- "url"

  Returns the endpoint URL of the service.

- "size"

  Returns the number of triples the service claims to have.

- "label"

  Returns the label of the service.

- "definitive"

  Returns true if the endpoint claims to have definitive information.

- "capabilities"

  Returns an ARRAY reference of capabilities (as HASH references) of the service. Each capability will contain information on size, selectivity, any subject-object filter, and required predicate, with the following classes:

  ```
    $capability->{object_selectivity} # RDF::Trine::Node::Literal xsd:double
    $capability->{sofilter} # RDF::Query::Expression
    $capability->{size} # RDF::Trine::Node::Literal xsd:integer
    $capability->{pred} # RDF::Trine::Node::Resource
  ```

- "patterns"

  Returns an ARRAY reference of RDF::Query::Algebra::BasicGraphPattern objects representing common patterns used by the endpoint.

- "computed\_statement\_generator"

  Returns a closure appropriate for passing to `"RDF::Query->add_computed_statement_generator"` to generate statement iterators for the remote service.

  This closure takes `"($query, $bridge, \%bound, $subj, $pred, $obj [, $context ] )"` as arguments and returns either `"undef"` if no statements can be generated given the arguments, or a `"RDF::Trine::Iterator::Graph"` iterator containing statements matching `"$subj, $pred, $obj [, $context ]"`.

- "answers\_triple\_pattern ( $triple )"

  Returns true if the service described by this object can answer queries comprised of the supplied triple pattern.

## AUTHOR

```
 Gregory Todd Williams <gwilliams@cpan.org>
```
