Class: Relaton::Bipm::ItemData

Inherits:
Relaton::Bib::ItemData show all
Defined in:
lib/relaton/bipm/item_data.rb

Constant Summary

Constants inherited from Relaton::Bib::ItemData

Relaton::Bib::ItemData::ATTRIBUTES, Relaton::Bib::ItemData::COLLECTION_ATTRBUTES, Relaton::Bib::ItemData::COLLECTION_WRITE_ONLY_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from Relaton::Bib::ItemData

#docidentifier, #id

Instance Method Summary collapse

Methods inherited from Relaton::Bib::ItemData

#abstract, #create_id, #create_relation, #delete_title_part!, #ext_remove_date, #ext_to_all_parts!, #initialize, #relation, #schema, #source, #title, #title_update_main, #to_all_parts, #to_bibtex, #to_h, #to_most_recent_reference, #to_relation_item, #to_rfcxml

Methods included from Relaton::Bib::NamespaceHelper

included

Methods included from Core::ArrayWrapper

#array

Constructor Details

This class inherits a constructor from Relaton::Bib::ItemData

Instance Method Details

#deep_cloneObject



6
7
8
# File 'lib/relaton/bipm/item_data.rb', line 6

def deep_clone
  Item.from_yaml Item.to_yaml(self)
end

#to_asciibibObject



32
33
34
# File 'lib/relaton/bipm/item_data.rb', line 32

def to_asciibib
  Converter::Asciibib.from_item(self)
end

#to_json(**opts) ⇒ Object



26
27
28
29
30
# File 'lib/relaton/bipm/item_data.rb', line 26

def to_json(**opts)
  add_notes opts[:note] do
    Item.to_json(self)
  end
end

#to_xml(bibdata: false, **opts) ⇒ Object

def create_relation(**args) Relation.new(**args) end



14
15
16
17
18
# File 'lib/relaton/bipm/item_data.rb', line 14

def to_xml(bibdata: false, **opts)
  add_notes opts[:note] do
    bibdata ? Bibdata.to_xml(self) : Bibitem.to_xml(self)
  end
end

#to_yaml(**opts) ⇒ Object



20
21
22
23
24
# File 'lib/relaton/bipm/item_data.rb', line 20

def to_yaml(**opts)
  add_notes opts[:note] do
    Item.to_yaml(self)
  end
end