Sha256: 327afec3f3692e131b1cb49bedf78552a2c520e848068f289ace2fe972df026a

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

# frozen_string_literal: true

require 'logger'
require 'rexml/formatters/transitive' # unaccountably, xml/mapping doesn't do this
require 'xml/mapping_extensions'

# Module for working with the [DataCite metadata schema](https://schema.datacite.org/)
module Datacite
  # Maps DataCite XML to Ruby objects
  module Mapping

    DATACITE_3_NAMESPACE = XML::MappingExtensions::Namespace.new(
      uri: 'http://datacite.org/schema/kernel-3',
      schema_location: 'http://schema.datacite.org/meta/kernel-3/metadata.xsd'
    )

    DATACITE_4_NAMESPACE = XML::MappingExtensions::Namespace.new(
      uri: 'http://datacite.org/schema/kernel-4',
      schema_location: 'http://schema.datacite.org/meta/kernel-4/metadata.xsd'
    )

    Dir.glob(File.expand_path('../mapping/*.rb', __FILE__)).sort.each(&method(:require))

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datacite-mapping-0.3.0 lib/datacite/mapping.rb