Class: BibliographicalImporter::BibTex::Record_Wos

Inherits:
Record
  • Object
show all
Defined in:
lib/bibliographical_importer/bibtex.rb

Constant Summary

Constants inherited from Record

BibliographicalImporter::BibTex::Record::COMMON_FIELDS

Instance Attribute Summary

Attributes inherited from Record

#bv

Attributes included from CommonRecordAttributes

#abstract, #affiliation, #author, #authors, #cited, #doi, #id_scopus, #id_wos, #journal, #journal_abbr, #keywords, #keywords_plus, #language, #pages, #references_crossref, #references_scopus, #references_wos, #title, #uid, #url, #volume, #year

Instance Method Summary collapse

Methods inherited from Record

#authors, #check_title, create, determine_type, #initialize, #strip_lines

Constructor Details

This class inherits a constructor from BibliographicalImporter::BibTex::Record

Instance Method Details

#cited_referencesObject



149
150
151
# File 'lib/bibliographical_importer/bibtex.rb', line 149

def cited_references
  @references_wos
end

#parse_commonObject



130
131
132
133
134
# File 'lib/bibliographical_importer/bibtex.rb', line 130

def parse_common
  COMMON_FIELDS.each do |t|
    send("#{t}=", quitar_llaves(strip_lines(@bv[t].to_s)))
  end
end

#parse_specificObject



136
137
138
139
140
141
142
143
# File 'lib/bibliographical_importer/bibtex.rb', line 136

def parse_specific

  @references_wos= quitar_llaves(@bv["cited-references"].to_s).split(".\n   ") unless @bv['cited-references'].nil?
  @journal_abbr=quitar_llaves(@bv["journal-iso"].to_s)
  @keywords_plus=quitar_llaves(strip_lines(@bv["keywords-plus"].to_s)).split("; ")
  @keywords=quitar_llaves(strip_lines(@bv[:keywords])).split("; ")
  @uid=quitar_llaves(@bv['unique-id'])
end

#quitar_llaves(x) ⇒ Object



126
127
128
# File 'lib/bibliographical_importer/bibtex.rb', line 126

def quitar_llaves(x)
  x.gsub(/^\{(.+)\}$/, "\\1")
end

#typeObject



145
146
147
# File 'lib/bibliographical_importer/bibtex.rb', line 145

def type
  :wos
end