Sha256: 8981fa57c6696ba94a57df1e1bf8762b9a003cb3ed23dea9599a0c33abe2e6e7

Contents?: true

Size: 1.14 KB

Versions: 3

Compression:

Stored size: 1.14 KB

Contents

# frozen_string_literal: true

require_relative "base_mapper"

require_relative "enumeration_and_chronology"
require_relative "form"
require_relative "item_identifier"
require_relative "note"

module LocMods
  class CopyInformation < BaseMapper
    attribute :form, Form
    attribute :sub_location, Shale::Type::String, collection: true
    attribute :shelf_locator, Shale::Type::String, collection: true
    attribute :electronic_locator, Shale::Type::String, collection: true
    attribute :note, Note, collection: true
    attribute :enumeration_and_chronology, EnumerationAndChronology,
              collection: true
    attribute :item_identifier, ItemIdentifier, collection: true

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

      map_element "form", to: :form
      map_element "subLocation", to: :sub_location
      map_element "shelfLocator", to: :shelf_locator
      map_element "electronicLocator", to: :electronic_locator
      map_element "note", to: :note
      map_element "enumerationAndChronology", to: :enumeration_and_chronology
      map_element "itemIdentifier", to: :item_identifier
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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