module Exlibris::Primo::Pnx::Links
Handle links in links tags.
Public Instance Methods
fulltexts()
click to toggle source
Parse linktorsrc tags to find full text links
# File lib/exlibris/primo/pnx/links.rb, line 11 def fulltexts @fulltexts ||= links("linktorsrc").collect { |link_attributes| Exlibris::Primo::Fulltext.new link_attributes } end
tables_of_contents()
click to toggle source
Parse linktotoc tags to find table of contents links
# File lib/exlibris/primo/pnx/links.rb, line 29 def tables_of_contents @tables_of_contents ||= links("linktotoc").collect { |link_attributes| Exlibris::Primo::TableOfContents.new link_attributes } end
Private Instance Methods
links(link)
click to toggle source
Parse links tags
# File lib/exlibris/primo/pnx/links.rb, line 38 def links(link) xml.root.xpath("links/#{link}").collect do |link| subfields = parse_subfields link.inner_text # Get original id for dealing w/ dedup merger records original_id = (subfields["O"]) ? subfields["O"] : recordid # We're not interested if we don't have a URL next if subfields["U"].nil? { :institution => subfields["I"], :record_id => recordid, :original_id => original_id, :url => subfields["U"], :display => subfields["D"], :display_code => subfields['E'] } end end