UWDC

Gem Version Build Status Dependency Status Code Climate

Synopsis

Gem for accessing University of Wisconsin Digital Collection items from our Fedora Commons repository.

Install

gem install uwdc

Usage

METS

Obtain the METS metadata for a UWDC object.

require 'uwdc'
mets = UWDC::Mets.new('33QOBSVPJLWEM8S')
mets.mods
mets.mods.titles
# => ["A life idyl"]

mets.mods.
# => {:titles=>["A life idyl"], :names=>[], :dates=>["1869"], :forms=>["text"], ...}

UWDC METS will contain:

  • MODS
  • Origin (PREMIS)
  • RELS-EXT
  • FileSec
  • StructMap

MODS

Obtain the MODS metadata for a UWDC object.

mods = UWDC::Mods.new('33QOBSVPJLWEM8S')
mods.titles

MODS top-level elements are boiled in Ruby to something more dot-syntax friendly.

UWDC::Mods method MODS Element Example output
mods.titles titleInfo ["A life idyl", ...]
mods.names name [OpenStruct.new(:name, :role), ...]
mods.dates originInfo ["1869"]
mods.forms physicalDescription ["text"]
mods.abstracts abstract ["Green leather with gold stamping...", ...]
mods.subjects subject ["Bookbinding--Techniques--Gold stamping", ...]
mods.access_conditions accessCondition [OpenStruct.new(:rights, :reuse), ...]
mods.related_items relatedItem [OpenStruct.new(:label, :name), ...]

Transform via to_* calls. Supports JSON, Ruby and XML

mods.to_json
mods.to_ruby
mods.to_xml

Changelog

Nothing to mention yet.

Contributors

Eric Larson

UWDC © 2013 Board of Regents - University of Wisconsin System. UWDC is licensed under the MIT license. Please see the LICENSE for more information.