Class: Relaton::Bsi::ItemData
- Inherits:
-
Iso::ItemData
- Object
- Relaton::Bib::ItemData
- Iso::ItemData
- Relaton::Bsi::ItemData
- Defined in:
- lib/relaton/bsi/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
Instance Method Summary collapse
Methods inherited from Relaton::Bib::ItemData
#abstract, #create_relation, #deep_clone, #delete_title_part!, #ext_remove_date, #ext_to_all_parts!, #initialize, #relation, #schema, #source, #title, #title_update_main, #to_all_parts, #to_asciibib, #to_bibtex, #to_h, #to_json, #to_most_recent_reference, #to_relation_item, #to_rfcxml, #to_xml, #to_yaml
Methods included from Relaton::Bib::NamespaceHelper
Methods included from Core::ArrayWrapper
Constructor Details
This class inherits a constructor from Relaton::Bib::ItemData
Instance Method Details
#create_id(without_date: false) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/relaton/bsi/item_data.rb', line 4 def create_id(without_date: false) docid = docidentifier.find(&:primary) || docidentifier.first return unless docid id_content = without_date ? docid.content.sub(/:\d{4}$/, "") : docid.content self.id = id_content.gsub(/\W+/, "") end |