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

authority_config[R]

Public Class Methods

new(auth_name) click to toggle source
Calls superclass method
# File lib/qa/authorities/linked_data/generic_authority.rb, line 22
def initialize(auth_name)
  super()
  @authority_config = Qa::Authorities::LinkedData::Config.new(auth_name)
end

Public Instance Methods

authorities_service() click to toggle source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 31
def authorities_service
  @authorities_service ||= Qa::LinkedData::AuthorityService
end
item_service() click to toggle source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 39
def item_service
  @item_service ||= Qa::Authorities::LinkedData::FindTerm.new(term_config)
end
reload_authorities() click to toggle source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 27
def reload_authorities
  @authorities_service.load_authorities
end
search_service() click to toggle source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 35
def search_service
  @search_service ||= Qa::Authorities::LinkedData::SearchQuery.new(search_config)
end

Private Instance Methods

search_config() click to toggle source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 49
def search_config
  authority_config.search
end
term_config() click to toggle source
# File lib/qa/authorities/linked_data/generic_authority.rb, line 53
def term_config
  authority_config.term
end