module Qa::Authorities::LocSubauthority

Public Instance Methods

authorities() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 10
def authorities
  [
    "subjects",
    "names",
    "classification",
    "childrensSubjects",
    "genreForms",
    "performanceMediums"
  ]
end
datatypes() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 39
def datatypes
  ["edtf"]
end
get_url_for_authority(authority) click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 2
def get_url_for_authority(authority)
  if authorities.include?(authority) then authority_base_url
  elsif vocabularies.include?(authority) then vocab_base_url
  elsif datatypes.include?(authority)    then datatype_base_url
  elsif preservation.include?(authority) then vocab_preservation_base_url
  end
end
preservation() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 43
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
vocabularies() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 21
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

authority_base_url() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 76
def authority_base_url
  "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fauthorities%2F"
end
datatype_base_url() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 80
def datatype_base_url
  "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fdatatypes%2F"
end
vocab_base_url() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 72
def vocab_base_url
  "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fvocabulary%2F"
end
vocab_preservation_base_url() click to toggle source
# File lib/qa/authorities/loc_subauthority.rb, line 84
def vocab_preservation_base_url
  "cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fvocabulary%2Fpreservation%2F"
end