Module: RDF::Normalize
- Defined in:
- lib/rdf/normalize.rb,
lib/rdf/normalize/base.rb,
lib/rdf/normalize/utils.rb,
lib/rdf/normalize/format.rb,
lib/rdf/normalize/writer.rb,
lib/rdf/normalize/urdna2015.rb,
lib/rdf/normalize/urgna2012.rb,
lib/rdf/normalize/carroll2001.rb
Overview
**‘RDF::Normalize`** is an RDF Graph normalization plugin for RDF.rb.
Defined Under Namespace
Modules: Base, Utils Classes: Carroll2001, Format, URDNA2015, URGNA2012, Writer
Constant Summary collapse
- ALGORITHMS =
{ carroll2001: :Carroll2001, urgna2012: :URGNA2012, urdna2015: :URDNA2015 }.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
57 58 59 60 61 62 |
# File 'lib/rdf/normalize.rb', line 57 def new(enumerable, = {}) algorithm = .fetch(:algorithm, :urdna2015) 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 |