Sha256: 1b06139a04f6e294e2428a3c6243cb5b4093bffee921317b7102c54f0bf6d137

Contents?: true

Size: 758 Bytes

Versions: 3

Compression:

Stored size: 758 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

module LocMods
  class Identifier < BaseMapper
    attribute :content, Shale::Type::String
    attribute :display_label, Shale::Type::String
    attribute :type, Shale::Type::String
    attribute :type_uri, Shale::Type::Value
    attribute :invalid, Shale::Type::Value
    attribute :alt_rep_group, Shale::Type::String

    xml do
      root "nameIdentifier"
      namespace "http://www.loc.gov/mods/v3", nil

      map_content to: :content
      map_attribute "displayLabel", to: :display_label
      map_attribute "type", to: :type
      map_attribute "typeURI", to: :type_uri
      map_attribute "invalid", to: :invalid
      map_attribute "altRepGroup", to: :alt_rep_group
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loc_mods-0.2.4 lib/loc_mods/identifier.rb
loc_mods-0.2.3 lib/loc_mods/identifier.rb
loc_mods-0.2.2 lib/loc_mods/identifier.rb