Class: Relaton::Oasis::Processor
- Inherits:
-
Core::Processor
- Object
- Core::Processor
- Relaton::Oasis::Processor
- Defined in:
- lib/relaton/oasis/processor.rb
Instance Method Summary collapse
-
#fetch_data(_source, opts) ⇒ Object
Fetch all the documents from www.oasis-open.org/standards/.
- #from_xml(xml) ⇒ Relaton::Oasis::Item
- #from_yaml(yaml) ⇒ Relaton::Oasis::Item
- #get(code, date, opts) ⇒ Relaton::Oasis::Item
-
#grammar_hash ⇒ String
Returns hash of XML grammar.
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
-
#remove_index_file ⇒ Object
Remove index file.
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
8 9 10 11 12 13 14 |
# File 'lib/relaton/oasis/processor.rb', line 8 def initialize # rubocop:disable Lint/MissingSuper @short = :relaton_oasis @prefix = "OASIS" @defaultprefix = %r{^OASIS\s} @idtype = "OASIS" @datasets = %w[oasis-open] end |
Instance Method Details
#fetch_data(_source, opts) ⇒ Object
Fetch all the documents from www.oasis-open.org/standards/
33 34 35 36 |
# File 'lib/relaton/oasis/processor.rb', line 33 def fetch_data(_source, opts) require_relative "data_fetcher" DataFetcher.fetch(**opts) end |
#from_xml(xml) ⇒ Relaton::Oasis::Item
40 41 42 43 |
# File 'lib/relaton/oasis/processor.rb', line 40 def from_xml(xml) require_relative "../oasis" Item.from_xml(xml) end |
#from_yaml(yaml) ⇒ Relaton::Oasis::Item
47 48 49 50 |
# File 'lib/relaton/oasis/processor.rb', line 47 def from_yaml(yaml) require_relative "../oasis" Item.from_yaml(yaml) end |
#get(code, date, opts) ⇒ Relaton::Oasis::Item
20 21 22 23 |
# File 'lib/relaton/oasis/processor.rb', line 20 def get(code, date, opts) require_relative "../oasis" Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
Returns hash of XML grammar
54 55 56 57 |
# File 'lib/relaton/oasis/processor.rb', line 54 def grammar_hash require_relative "../oasis" @grammar_hash ||= Relaton::Oasis.grammar_hash end |