module Qa::Authorities::LocSubauthority
Public Instance Methods
Source
# File lib/qa/authorities/loc_subauthority.rb, line 57 def datatypes ["edtf"] end
Source
# File lib/qa/authorities/loc_subauthority.rb, line 61 def preservation # rubocop:disable Metrics/MethodLength [ "contentLocationType", "copyrightStatus", "cryptographicHashFunctions", "environmentCharacteristic", "environmentPurpose", "eventRelatedAgentRole", "eventRelatedObjectRole", "eventType", "formatRegistryRole", "hardwareType", "inhibitorTarget", "inhibitorType", "objectCategory", "preservationLevelRole", "relationshipSubType", "relationshipType", "rightsBasis", "rightsRelatedAgentRole", "signatureEncoding", "signatureMethod", "softwareType", "storageMedium" ] end
Source
# File lib/qa/authorities/loc_subauthority.rb, line 20 def root_fetch_slug_for(authority) validate_subauthority!(authority) return "authorities" if authorities.include?(authority) return "vocabulary" if vocabularies.include?(authority) return "datatype" if datatypes.include?(authority) return "vocabulary/preservation" if preservation.include?(authority) end
@note The returned value is the root directory of the URL. The graphicMaterials sub-authority
has a "type" of vocabulary. https://id.loc.gov/vocabulary/graphicMaterials/tgm008083.html In some cases, this is plural and in others this is singular.
@param authority [String] the LOC authority that matches one of the types @return [String]
@note there is a relationship between the returned value and the encoded URLs returned by
{#get_url_for_authority}.
Source
# File lib/qa/authorities/loc_subauthority.rb, line 39 def vocabularies # rubocop:disable Metrics/MethodLength [ "graphicMaterials", "organizations", "relators", "countries", "ethnographicTerms", "geographicAreas", "languages", "iso639-1", "iso639-2", "iso639-5", "preservation", "actionsGranted", "agentType" ] end
Private Instance Methods
Source
# File lib/qa/authorities/loc_subauthority.rb, line 98 def datatype_base_url "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fdatatypes%2F" end
Source
# File lib/qa/authorities/loc_subauthority.rb, line 90 def vocab_base_url "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fvocabulary%2F" end
Source
# File lib/qa/authorities/loc_subauthority.rb, line 102 def vocab_preservation_base_url "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fvocabulary%2Fpreservation%2F" end