Class: Median::Primo::Record
- Inherits:
-
Object
- Object
- Median::Primo::Record
- Includes:
- XmlSupport
- Defined in:
- lib/median/primo/record.rb
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#links ⇒ Object
readonly
Returns the value of attribute links.
Instance Method Summary collapse
- #dedub? ⇒ Boolean
-
#initialize(xml) ⇒ Record
constructor
A new instance of Record.
- #local_resource? ⇒ Boolean
- #online_resource? ⇒ Boolean
- #series? ⇒ Boolean
- #versions? ⇒ Boolean
Constructor Details
Instance Attribute Details
#links ⇒ Object (readonly)
Returns the value of attribute links.
30 31 32 |
# File 'lib/median/primo/record.rb', line 30 def links @links end |
Instance Method Details
#dedub? ⇒ Boolean
37 38 39 |
# File 'lib/median/primo/record.rb', line 37 def dedub? self.id.present? ? self.id.downcase.start_with?('dedupmrg') : false end |
#local_resource? ⇒ Boolean
41 42 43 |
# File 'lib/median/primo/record.rb', line 41 def local_resource? !online_resource? end |
#online_resource? ⇒ Boolean
45 46 47 48 |
# File 'lib/median/primo/record.rb', line 45 def online_resource? online_resource_categories = ['online_resource', 'online resource', 'remote search resource', 'sfx resource'] online_resource_categories.include?(self.delivery_category) end |
#series? ⇒ Boolean
54 55 56 |
# File 'lib/median/primo/record.rb', line 54 def series? type.try(:downcase) == 'serie' or delivery_category == 'structural metadata' end |
#versions? ⇒ Boolean
50 51 52 |
# File 'lib/median/primo/record.rb', line 50 def versions? versions > 1 end |