Class: Cocina::Models::Mapping::Normalizers::Mods::SubjectNormalizer
- Inherits:
-
Object
- Object
- Cocina::Models::Mapping::Normalizers::Mods::SubjectNormalizer
- Defined in:
- lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb
Overview
Normalizes a Fedora MODS document for subject elements.
Class Method Summary collapse
-
.normalize(mods_ng_xml:) ⇒ Nokogiri::Document
Normalized MODS.
Instance Method Summary collapse
-
#initialize(mods_ng_xml:) ⇒ SubjectNormalizer
constructor
A new instance of SubjectNormalizer.
- #normalize ⇒ Object
Constructor Details
#initialize(mods_ng_xml:) ⇒ SubjectNormalizer
Returns a new instance of SubjectNormalizer.
16 17 18 19 |
# File 'lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb', line 16 def initialize(mods_ng_xml:) @ng_xml = mods_ng_xml.dup @ng_xml.encoding = 'UTF-8' end |
Class Method Details
.normalize(mods_ng_xml:) ⇒ Nokogiri::Document
Returns normalized MODS.
12 13 14 |
# File 'lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb', line 12 def self.normalize(mods_ng_xml:) new(mods_ng_xml: mods_ng_xml).normalize end |
Instance Method Details
#normalize ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cocina/models/mapping/normalizers/mods/subject_normalizer.rb', line 21 def normalize normalize_xlink_href normalize_empty_geographic normalize_marcgac normalize_empty_temporal normalize_subject normalize_subject_children normalize_coordinates # Must be before normalize_subject_cartographics normalize_subject_cartographics normalize_subject_lang_and_script ng_xml end |