class Qa::Authorities::LinkedData::GenericAuthority
A wrapper around configured linked data authorities for use with questioning_authority. The search and find methods can be called directly from an instance of this class. The Qa::LinkedDataTermsController uses these methods to provide a URL based API for searching and term retrieval.
@see Qa::Authorities::LinkedData::SearchQuery#search
@see Qa::Authorities::LinkedData::FindTerm#find
@see Qa::LinkedDataTermsController#search @see Qa::LinkedDataTermsController#show @see Qa::Authorities::LinkedData::Config
Attributes
Public Class Methods
Source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 24 def initialize(auth_name) super() @authority_config = Qa::Authorities::LinkedData::Config.new(auth_name) end
Calls superclass method
Public Instance Methods
Source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 41 def item_service @item_service ||= Qa::Authorities::LinkedData::FindTerm.new(term_config) end
Source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 37 def search_service @search_service ||= Qa::Authorities::LinkedData::SearchQuery.new(search_config) end
Private Instance Methods
Source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 51 def search_config authority_config.search end
Source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 55 def term_config authority_config.term end