Module: RDF::Normalize
- Included in:
- Canonicalize
- Defined in:
- lib/rdf/normalize.rb,
lib/rdf/normalize/base.rb,
lib/rdf/normalize/format.rb,
lib/rdf/normalize/rdfc10.rb,
lib/rdf/normalize/writer.rb,
lib/rdf/normalize/urgna2012.rb,
lib/rdf/normalize/carroll2001.rb
Overview
RDF::Normalize
is an RDF Graph canonicalization plugin for RDF.rb.
Defined Under Namespace
Modules: VERSION Classes: Base, Carroll2001, Format, MaxCallsExceeded, RDFC10, URGNA2012, UnknownHashAlgorithm, Writer
Constant Summary collapse
- ALGORITHMS =
{ carroll2001: :Carroll2001, urgna2012: :URGNA2012, rdfc10: :RDFC10 }.freeze
Instance Attribute Summary collapse
-
#dataset ⇒ RDF::Enumerable
Enumerable to normalize.
Class Method Summary collapse
-
.new(enumerable, **options) ⇒ RDF::Normalize::Base
Creates a new normalizer instance using either the specified or default normalizer algorithm.
Instance Attribute Details
#dataset ⇒ RDF::Enumerable
Enumerable to normalize
41 42 43 |
# File 'lib/rdf/normalize.rb', line 41 def dataset @dataset end |
Class Method Details
.new(enumerable, **options) ⇒ RDF::Normalize::Base
Creates a new normalizer instance using either the specified or default normalizer algorithm
61 62 63 64 65 66 |
# File 'lib/rdf/normalize.rb', line 61 def new(enumerable, **) algorithm = .fetch(:algorithm, :rdfc10) raise ArgumentError, "No algoritm defined for #{algorithm.to_sym}" unless ALGORITHMS.has_key?(algorithm) algorithm_class = const_get(ALGORITHMS[algorithm]) algorithm_class.new(enumerable, **) end |