Class: Cocina::Models::Mapping::Normalizers::Mods::GeoExtensionNormalizer
- Inherits:
-
Object
- Object
- Cocina::Models::Mapping::Normalizers::Mods::GeoExtensionNormalizer
- Defined in:
- lib/cocina/models/mapping/normalizers/mods/geo_extension_normalizer.rb
Overview
Normalizes a Fedora MODS document for geo extension elements.
Class Method Summary collapse
-
.normalize(mods_ng_xml:, druid:) ⇒ Nokogiri::Document
Normalized MODS.
Instance Method Summary collapse
-
#initialize(mods_ng_xml:, druid:) ⇒ GeoExtensionNormalizer
constructor
A new instance of GeoExtensionNormalizer.
- #normalize ⇒ Object
Constructor Details
#initialize(mods_ng_xml:, druid:) ⇒ GeoExtensionNormalizer
Returns a new instance of GeoExtensionNormalizer.
17 18 19 20 21 |
# File 'lib/cocina/models/mapping/normalizers/mods/geo_extension_normalizer.rb', line 17 def initialize(mods_ng_xml:, druid:) @ng_xml = mods_ng_xml.dup @ng_xml.encoding = 'UTF-8' @druid = druid end |
Class Method Details
.normalize(mods_ng_xml:, druid:) ⇒ Nokogiri::Document
Returns normalized MODS.
13 14 15 |
# File 'lib/cocina/models/mapping/normalizers/mods/geo_extension_normalizer.rb', line 13 def self.normalize(mods_ng_xml:, druid:) new(mods_ng_xml: mods_ng_xml, druid: druid).normalize end |
Instance Method Details
#normalize ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/cocina/models/mapping/normalizers/mods/geo_extension_normalizer.rb', line 23 def normalize normalize_geo_purl normalize_dc_image normalize_gml_id normalize_empty_resource ng_xml end |