NAME

Attean::DatasetModel - RDF model that restricts the dataset of a sub-model

VERSION

This document describes Attean::DatasetModel version 0.041

SYNOPSIS

use v5.14;
use Attean;
my $model = Attean::DatasetModel->new( model => $model, graphs => \@named_graphs );

DESCRIPTION

The Attean::DatasetModel class represents a model that is backed by a sub-model. It restricts the available named graphs of the sub-model to only those configured during construction.

This class conforms to the Attean::API::Model role.

The Attean::DatasetModel constructor requires two named arguments:

model

A Attean::API::Model object representing the sub-model.

graphs

An array reference of Attean::API::IRI objects, enumerating the acceptable named graphs that can be queried.

ATTRIBUTES

dataset_graphs

A hash mapping the string value of each Attean::API::IRI graph name in the dataset to that IRI object.

METHODS

get_quads ( $subject, $predicate, $object, $graph )

Returns an Attean::API::Iterator for quads in the model that match the supplied $subject, $predicate, $object, and $graph. Any of these terms may be undefined or a Attean::API::Variable object, in which case that term will be considered as a wildcard for the purposes of matching.

The returned iterator conforms to both Attean::API::Iterator and Attean::API::QuadIterator.

count_quads ( $s, $p, $o, $g )

Returns the count of quads matching the supplied pattern.

count_quads_estimate ( $s, $p, $o, $g )

Returns an estimated count of the quads matching the supplied pattern.

get_graphs

Returns an Attean::API::Iterator of Attean::API::Term objects for all the graphs defined in the dataset.

size

Returns the number of quads in the dataset.

BUGS

Please report any bugs or feature requests to through the GitHub web interface at https://github.com/kasei/attean/issues.

SEE ALSO

AUTHOR

Gregory Todd Williams <gwilliams@cpan.org>

COPYRIGHT

Copyright (c) 2014--2026 Gregory Todd Williams. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.