Class: Relaton::Ogc::Processor
- Inherits:
-
Core::Processor
- Object
- Core::Processor
- Relaton::Ogc::Processor
- Defined in:
- lib/relaton/ogc/processor.rb
Instance Method Summary collapse
- #fetch_data(_source, opts) ⇒ Object
- #from_xml(xml) ⇒ Relaton::Ogc::ItemData
- #from_yaml(yaml) ⇒ Relaton::Ogc::ItemData
- #get(code, date, opts) ⇒ Relaton::Ogc::ItemData
- #grammar_hash ⇒ String
-
#initialize ⇒ Processor
constructor
rubocop:disable Lint/MissingSuper.
- #remove_index_file ⇒ Object
Constructor Details
#initialize ⇒ Processor
rubocop:disable Lint/MissingSuper
6 7 8 9 10 11 12 |
# File 'lib/relaton/ogc/processor.rb', line 6 def initialize # rubocop:disable Lint/MissingSuper @short = :relaton_ogc @prefix = "OGC" @defaultprefix = %r{^OGC\s} @idtype = "OGC" @datasets = %w[ogc-naming-authority] end |
Instance Method Details
#fetch_data(_source, opts) ⇒ Object
25 26 27 28 |
# File 'lib/relaton/ogc/processor.rb', line 25 def fetch_data(_source, opts) require_relative "data_fetcher" DataFetcher.fetch(**opts) end |
#from_xml(xml) ⇒ Relaton::Ogc::ItemData
32 33 34 35 |
# File 'lib/relaton/ogc/processor.rb', line 32 def from_xml(xml) require_relative "../ogc" Item.from_xml xml end |
#from_yaml(yaml) ⇒ Relaton::Ogc::ItemData
39 40 41 42 |
# File 'lib/relaton/ogc/processor.rb', line 39 def from_yaml(yaml) require_relative "../ogc" Item.from_yaml yaml end |
#get(code, date, opts) ⇒ Relaton::Ogc::ItemData
18 19 20 21 |
# File 'lib/relaton/ogc/processor.rb', line 18 def get(code, date, opts) require_relative "../ogc" Bibliography.get(code, date, opts) end |
#grammar_hash ⇒ String
45 46 47 48 |
# File 'lib/relaton/ogc/processor.rb', line 45 def grammar_hash require_relative "../ogc" @grammar_hash ||= Relaton::Ogc.grammar_hash end |