Class: Relaton::Ogc::Processor
Instance Attribute Summary
#datasets, #defaultprefix, #idtype, #prefix, #short
Instance Method Summary
collapse
#threads
Constructor Details
rubocop:disable Lint/MissingSuper
6
7
8
9
10
11
12
|
# File 'lib/relaton/ogc/processor.rb', line 6
def initialize @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
|
32
33
34
35
|
# File 'lib/relaton/ogc/processor.rb', line 32
def from_xml(xml)
require_relative "../ogc"
Item.from_xml xml
end
|
39
40
41
42
|
# File 'lib/relaton/ogc/processor.rb', line 39
def from_yaml(yaml)
require_relative "../ogc"
Item.from_yaml yaml
end
|
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
|
#remove_index_file ⇒ Object
50
51
52
53
54
55
|
# File 'lib/relaton/ogc/processor.rb', line 50
def remove_index_file
require_relative "../ogc"
Relaton::Index.find_or_create(
:ogc, url: true, file: "#{INDEXFILE}.yaml",
).remove_file
end
|