Method: Qa::Services::RDFAuthorityParser.import_rdf
- Defined in:
- lib/qa/services/rdf_authority_parser.rb
.import_rdf(name, sources, opts = {}) ⇒ Object
import the rdf from the sources and store them as entries for the named LocalAuthority
defaults to :ntripples
defaults to http://www.w3.org/2004/02/skos/core#prefLabel
29 30 31 32 33 34 35 36 |
# File 'lib/qa/services/rdf_authority_parser.rb', line 29 def import_rdf(name, sources, opts = {}) = Qa::LocalAuthority.find_or_create_by(name: name) format = opts.fetch(:format, :ntriples) predicate = opts.fetch(:predicate, ::RDF::Vocab::SKOS.prefLabel) sources.each do |uri| import_source(, format, predicate, uri) end end |