Class: Qa::Authorities::LinkedData::GenericAuthority
- Defined in:
- lib/qa/authorities/linked_data/generic_authority.rb
Overview
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.
Instance Method Summary collapse
- #authorities_service ⇒ Object
-
#initialize(auth_name) ⇒ GenericAuthority
constructor
A new instance of GenericAuthority.
- #item_service ⇒ Object
- #reload_authorities ⇒ Object
- #search_service ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(auth_name) ⇒ GenericAuthority
Returns a new instance of GenericAuthority.
24 25 26 27 |
# 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 |
Instance Method Details
#authorities_service ⇒ Object
33 34 35 |
# File 'lib/qa/authorities/linked_data/generic_authority.rb', line 33 def @authorities_service ||= Qa::LinkedData::AuthorityService end |
#item_service ⇒ Object
41 42 43 |
# File 'lib/qa/authorities/linked_data/generic_authority.rb', line 41 def item_service @item_service ||= Qa::Authorities::LinkedData::FindTerm.new(term_config) end |
#reload_authorities ⇒ Object
29 30 31 |
# File 'lib/qa/authorities/linked_data/generic_authority.rb', line 29 def @authorities_service. end |
#search_service ⇒ Object
37 38 39 |
# File 'lib/qa/authorities/linked_data/generic_authority.rb', line 37 def search_service @search_service ||= Qa::Authorities::LinkedData::SearchQuery.new(search_config) end |