Class: RelatonOmg::Processor

Inherits:
Relaton::Processor
  • Object
show all
Defined in:
lib/relaton_omg/processor.rb

Instance Method Summary collapse

Constructor Details

#initializeProcessor



6
7
8
9
10
11
# File 'lib/relaton_omg/processor.rb', line 6

def initialize
  @short = :relaton_omg
  @prefix = "OMG"
  @defaultprefix = /^OMG /
  @idtype = "OMG"
end

Instance Method Details

#from_xml(xml) ⇒ RelatonOmg::OmgBibliographicItem



23
24
25
# File 'lib/relaton_omg/processor.rb', line 23

def from_xml(xml)
  ::RelatonOmg::XMLParser.from_xml xml
end

#get(code, date, opts) ⇒ RelatonOmg::OmgBibliographicItem



17
18
19
# File 'lib/relaton_omg/processor.rb', line 17

def get(code, date, opts)
  ::RelatonOmg::OmgBibliography.get(code, date, opts)
end

#grammar_hashString

Returns hash of XML grammar



36
37
38
# File 'lib/relaton_omg/processor.rb', line 36

def grammar_hash
  @grammar_hash ||= ::RelatonOmg.grammar_hash
end

#hash_to_bib(hash) ⇒ RelatonOmg::OmgBibliographicItem



29
30
31
32
# File 'lib/relaton_omg/processor.rb', line 29

def hash_to_bib(hash)
  # item_hash = ::RelatonOmg::HashConverter.hash_to_bib(hash)
  ::RelatonOmg::OmgBibliographicItem.from_hash hash
end