class Ddr::Structures::FLocat
Wraps a Nokogiri (XML) 'FLocat' node
Public Class Methods
build(args)
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 43 def self.build(args) node = Nokogiri::XML::Node.new('FLocat', args[:document]) node['ID'] = args[:id] if args[:id] node['LOCTYPE'] = args[:loctype] if args[:loctype] node['OTHERLOCTYPE'] = args[:otherloctype] if args[:otherloctype] node['USE'] = args[:use] if args[:use] node['xlink:href'] = args[:href] if args[:href] node end
Public Instance Methods
ark()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 31 def ark href if ark? end
ark?()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 27 def ark? loctype == 'ARK' end
effective_use()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 35 def effective_use use ? use : File.new(parent).effective_use end
href()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 23 def href self['xlink:href'] end
id()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 7 def id self['ID'] end
loctype()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 11 def loctype self['LOCTYPE'] end
otherloctype()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 15 def otherloctype self['OTHERLOCTYPE'] end
repo_id()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 39 def repo_id SolrDocument.find_by_permanent_id(ark).id if ark? end
use()
click to toggle source
# File lib/ddr/structures/f_locat.rb, line 19 def use self['USE'] end