class RDF::Dataset

An RDF Dataset

Datasets are immutable by default. {RDF::Repository} provides an interface for mutable Datasets.

A Dataset functions as an a set of named RDF graphs with a default graph. It implements {RDF::Enumerable} and {RDF::Queryable} over the whole set; if no specific graph name is queried, enumerating and querying takes place over the intersection of all the graphs in the Dataset.

The default graph is named with a constant ‘DEFAULT_GRAPH`.

@example initializing an RDF::Dataset with existing data

statements = [RDF::Statement.new(RDF::URI(:s), RDF::URI(:p), :o)]
dataset    = RDF::Dataset.new(statements: statements)
dataset.count # => 1

@see www.w3.org/TR/rdf11-concepts/#section-dataset @see www.w3.org/TR/rdf11-datasets/