Skip to content

Commit

Permalink
Merge pull request #92 from LD4P/loc-updates
Browse files Browse the repository at this point in the history
Add connector for LOC geographic locations (#397)
  • Loading branch information
Baroquem authored Mar 26, 2024
2 parents 2c64e74 + 3c37745 commit 6a9e0bf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/qa/authorities/loc_subauthority.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

module Qa::Authorities::LocSubauthority # rubocop:disable Metrics/ModuleLength
def get_url_for_authority(authority)
if authorities.include?(authority) then authority_base_url
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
elsif geography.include?(authority) then vocab_geographic_areas_base_url
end
end

Expand Down Expand Up @@ -105,6 +106,10 @@ def datatypes
["edtf"]
end

def geography
['geographicAreas']
end

def preservation # rubocop:disable Metrics/MethodLength
[
"contentLocationType",
Expand Down Expand Up @@ -159,4 +164,8 @@ def datatype_base_url
def vocab_preservation_base_url
"cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fvocabulary%2Fpreservation%2F"
end

def vocab_geographic_areas_base_url
"cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fvocabulary%2FgeographicAreas%2F"
end
end

0 comments on commit 6a9e0bf

Please sign in to comment.