Project

uwdc

0.0
No commit activity in last 3 years
No release in over 3 years
Gem for the University of Wisconsin Digital Collections
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.2.13
~> 2.3.3
~> 1.8.0
~> 1.5.2
 Project Readme

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.metadata
# => {:titles=>["A life idyl"], :names=>[], :dates=>["1869"], :forms=>["text"], ...}

UWDC METS will contain:

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

Display

Obtain display methods for the UWDC object.

  • Images
  • Audio
  • Video (todo)
  • Downloads (todo)
mets.display.images
# => {"x1711-dl_U4QQPS4KWQSUA8A"=>[#<UWDC::FileAsset", @mimetype="image/jpeg", @use="thumb", @href="http://url.edu">, ...]}

The display class will be extended considerably in future releases of this gem.

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

UWDC Origin/PREMIS

Obtain the preservation metadata for a UWDC object.

mets.origin.submitters
# => ["Louisiana State University Libraries, Special Collections, Louisiana and Lower Mississippi Valley Collections."]

RELS-EXT

Obtain the object-to-object relationship metadata for a UWDC object.

mets.rels_ext.models
# => {"x1711-dl_33QOBSVPJLWEM8S-RELS-EXT"=>["info:fedora/1711.dl:CModelUWDCObject", ... }

Structural Map

Obtain the hierarchical structural map of a UWDC object.

mets.struct_map.structure
# => [#<UWDC::Div @node=#<Nokogiri::XML::Element name="div" attributes=[...]

Changelog

Nothing to mention yet.

Contributors

Eric Larson

Copyright

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