Class: Qa::LDF::LCNames

Inherits:
Authority
  • Object
show all
Defined in:
lib/qa/ldf/authorities/lc_names.rb

Overview

Note:

This uses the search logic from the basic Loc authority that ships with QA: Qa::Authorities::Loc::GenericAuthority.

A caching LCSH authority.

See Also:

  • LinkedDataFragments::CacheServer

Defined Under Namespace

Classes: SearchService

Constant Summary collapse

DEFAULT_DATASET_NAME =
:lcnames
NAMESPACE =
'http://id.loc.gov/authorities/names/'.freeze

Constants inherited from Authority

Authority::DEFAULT_CLIENT, Authority::DEFAULT_MAPPER, Authority::DEFAULT_SEARCH_SERVICE

Instance Attribute Summary

Attributes inherited from Authority

#client, #dataset, #mapper

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Authority

#all, #find, for, #graph, #initialize, namespaces, register_namespace, reset_namespaces, #search

Constructor Details

This class inherits a constructor from Qa::LDF::Authority

Class Method Details

.namespaceString

Returns the URI namespace associated with this authority.

Returns:

  • (String)

    the URI namespace associated with this authority



36
37
38
# File 'lib/qa/ldf/authorities/lc_names.rb', line 36

def self.namespace
  NAMESPACE
end

Instance Method Details

#search_serviceObject

Uses the LC names subauthority as the search provider



42
43
44
45
46
47
48
# File 'lib/qa/ldf/authorities/lc_names.rb', line 42

def search_service
  @search_service ||= SearchService.new do |service|
    service.namespace      = NAMESPACE
    service.parent_service =
      Qa::Authorities::Loc.subauthority_for('names')
  end
end