Sha256: 3eeb8ea47e3811f92e4c6d8822b02b7f38829baf89964d55c55ec7fa2033081a

Contents?: true

Size: 995 Bytes

Versions: 3

Compression:

Stored size: 995 Bytes

Contents

# frozen_string_literal: true

require_relative "base_mapper"

require_relative "cartographic_extension"

module LocMods
  class Cartographics < BaseMapper
    attribute :authority, Shale::Type::String
    attribute :authority_uri, Shale::Type::Value
    attribute :value_uri, Shale::Type::Value
    attribute :scale, Shale::Type::String
    attribute :projection, Shale::Type::String
    attribute :coordinates, Shale::Type::String, collection: true
    attribute :cartographic_extension, CartographicExtension, collection: true

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

      map_attribute "authority", to: :authority
      map_attribute "authorityURI", to: :authority_uri
      map_attribute "valueURI", to: :value_uri
      map_element "scale", to: :scale
      map_element "projection", to: :projection
      map_element "coordinates", to: :coordinates
      map_element "cartographicExtension", to: :cartographic_extension
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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