Class: RDF::Dataset

Inherits:
Object
  • Object
show all
Includes:
Countable, Durable, Enumerable, Queryable
Defined in:
lib/rdf/model/dataset.rb

Overview

An RDF Dataset

Datasets are immutable by default. Repository provides an interface for mutable Datasets.

Direct Known Subclasses

Repository

Constant Summary collapse

ISOLATION_LEVELS =
[ :read_uncommitted, 
:read_committed, 
:repeatable_read, 
:snapshot, 
:serializable].freeze

Instance Method Summary collapse

Methods included from Queryable

#enum_for, #first, #first_literal, #first_object, #first_predicate, #first_subject, #first_value, #query

Methods included from Durable

#durable?, #nondurable?

Methods included from Util::Aliasing::LateBound

#alias_method

Methods included from Enumerable

#dump, #each_graph, #each_object, #each_predicate, #each_quad, #each_statement, #each_subject, #each_term, #each_triple, #enum_for, #enum_graph, #enum_object, #enum_predicate, #enum_quad, #enum_statement, #enum_subject, #enum_term, #enum_triple, #graph_names, #has_graph?, #has_object?, #has_predicate?, #has_quad?, #has_statement?, #has_subject?, #has_term?, #has_triple?, #invalid?, #method_missing, #objects, #predicates, #project_graph, #quads, #respond_to_missing?, #statements, #subjects, #supports?, #terms, #to_a, #to_hash, #to_set, #triples, #valid?, #validate!

Methods included from Countable

#count, #empty?, #enum_for

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RDF::Enumerable

Instance Method Details

#inspectString

Returns a developer-friendly representation of this object.

Returns:

  • (String)


26
27
28
# File 'lib/rdf/model/dataset.rb', line 26

def inspect
  sprintf("#<%s:%#0x(%s)>", self.class.name, __id__, uri.to_s)
end

#inspect!void

This method returns an undefined value.

Outputs a developer-friendly representation of this object to ‘stderr`.



35
36
37
38
# File 'lib/rdf/model/dataset.rb', line 35

def inspect!
  each_statement { |statement| statement.inspect! }
  nil
end

#isolation_levelSymbol

‘:snapshot`, or `:serializable`.

Returns:

  • (Symbol)

    a representation of the isolation level for reads of this Dataset. One of ‘:read_uncommitted`, `:read_committed`, `:repeatable_read`,



44
45
46
# File 'lib/rdf/model/dataset.rb', line 44

def isolation_level
  :read_committed
end