Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused type maps and update remaining configs #711

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion lib/translation_maps/has_type_from_contributor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# type values from contributor mapped to cho_has_type
abbey churches: Structures
adornment: Adornments
adze: Tools & Equipment
Expand Down Expand Up @@ -33,6 +34,7 @@ applique: Other Objects
aquamaniles: Containers
archaeological sites: Archaeological Sites
archer's ring: Armaments
architectural: Structures
architectural relief: Structures
architecture: Structures
archival file: Other Texts
Expand Down Expand Up @@ -313,6 +315,7 @@ cosmetic spatula: Other Objects
cosmetic spoon: Other Objects
costume: Adornments
costume ornaments: Adornments
costumes: Adornments
cover: Other Objects
coverlet: Other Objects
covers: Other Objects
Expand Down Expand Up @@ -419,12 +422,14 @@ egg shell: Other Objects
elephant tusks: Other Objects
embroidery: Other Objects
envelope: Other Objects
equestrian figurine: Other Objects
equestrian: Other Objects
equestrian figurine: Sculptures
'equipment for personal use: smoking and tobacco use': Other Objects
ewers: Other Objects
ewers (vessels): Containers
eye bead: Other Objects
eye-idol: Other Objects
faience: Other Objects
falcon: Other Objects
fals: Coins
false door: Other Objects
Expand Down Expand Up @@ -531,6 +536,7 @@ gold, silver & jewelry: Other Objects
gourd: Other Objects
gown: Adornments
grain: Other Objects
graphics:
grave marker: Funerary Objects
grinder: Tools & Equipment
grinding stone: Tools & Equipment
Expand Down Expand Up @@ -603,6 +609,7 @@ illustration: Drawings
illustrations (layout features): Drawings
implement: Tools & Equipment
implement fragment: Tools & Equipment
implements: Tools & Equipment
impression:
incense: Other Objects
incense burner: Other Objects
Expand All @@ -614,6 +621,7 @@ inlay: Other Objects
inlay (uncertain): Other Objects
inlay fragment: Other Objects
inlays: Other Objects
inscribed: Inscriptions
inscription: Inscriptions
intaglio: Other Objects
intaglios: Other Objects
Expand All @@ -624,6 +632,7 @@ ivories: Other Objects
ivory: Other Objects
ivory & bone: Other Objects
ivory fragment: Other Objects
ivory/bone: Other Objects
jambiya: Armaments
jar: Containers
jar (uncertain): Other Objects
Expand Down Expand Up @@ -848,6 +857,7 @@ panels: Other Objects
panels (surface components): Other Objects
panpipes: Musical Instruments
pantaloons: Adornments
paper:
papyri: Other Texts
parchisi: Recreational Artifacts
patch box: Containers
Expand Down Expand Up @@ -879,6 +889,7 @@ periodical: Serials
periodicals: Serials
pestle: Other Objects
pestle (uncertain): Other Objects
pewter: Other Objects
phalium shell: Other Objects
phallus: Other Objects
photo, print, drawing: Photographs
Expand Down Expand Up @@ -922,6 +933,7 @@ plate: Other Objects
plater: Other Objects
plates: Other Objects
plates (dishes): Other Objects
plaster: Other Objects
platter: Other Objects
platter (uncertain): Other Objects
playing cards: Recreational Artifacts
Expand Down Expand Up @@ -1058,12 +1070,16 @@ sculpture: Sculptures
sculpture (visual works): Sculptures
scupture: Sculptures
seal: Seals
seal (cylinder): Seals
seal (object): Seals
seal (stamp): Seals
seal (uncertain): Other Objects
seal cap: Seals
seal impression: Seals
seal impressions: Seals
seal ring: Seals
sealing: Seals
sealings: Seals
seals (artifacts): Seals
seals (cylinder): Seals
seals (stamp): Seals
Expand Down Expand Up @@ -1212,6 +1228,7 @@ strap fragment: Other Objects
string of beads: Other Objects
strt-convex scraper: Tools & Equipment
structures furnishings: Furniture
stucco: Other Objects
stud: Other Objects
stud (uncertain): Other Objects
studs: Other Objects
Expand Down Expand Up @@ -1377,6 +1394,7 @@ wood: Other Objects
wood fragment: Other Objects
woodwork: Other Objects
wool comb: Other Objects
woven: Other Objects
wrap: Other Objects
wreath: Other Objects
writing & printing: Writing Accessories
Expand Down
30 changes: 0 additions & 30 deletions lib/translation_maps/norm_has_type_to_ar.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions lib/translation_maps/norm_types_to_ar.yaml

This file was deleted.

75 changes: 0 additions & 75 deletions lib/translation_maps/types.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions traject_configs/met_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
require 'macros/dlme'
require 'macros/each_record'
require 'macros/met'
require 'macros/normalize_type'
require 'macros/path_to_file'
require 'macros/string_helper'
require 'macros/timestamp'
Expand All @@ -19,6 +20,7 @@
extend Macros::DLME
extend Macros::EachRecord
extend Macros::Met
extend Macros::NormalizeType
extend Macros::PathToFile
extend Macros::StringHelper
extend Macros::Timestamp
Expand Down Expand Up @@ -58,11 +60,11 @@
to_field 'cho_date_range_norm', csv_or_json_date_range('objectBeginDate', 'objectEndDate')
to_field 'cho_dc_rights', public_domain, lang('en')
to_field 'cho_dc_rights', extract_json('.rightsAndReproduction'), transform(&:presence), lang('en')
to_field 'cho_edm_type', literal('Object'), lang('en')
to_field 'cho_edm_type', literal('Object'), translation_map('norm_types_to_ar'), lang('ar-Arab')
to_field 'cho_edm_type', extract_json('.classification'), split('-'), normalize_has_type, normalize_edm_type, lang('en')
to_field 'cho_edm_type', extract_json('.classification'), split('-'), normalize_has_type, normalize_edm_type, translation_map('edm_type_ar_from_en'), lang('ar-Arab')
to_field 'cho_extent', extract_json('.dimensions'), lang('en')
to_field 'cho_has_type', literal('Other Objects'), lang('en')
to_field 'cho_has_type', literal('Other Objects'), translation_map('norm_has_type_to_ar'), lang('ar-Arab')
to_field 'cho_has_type', extract_json('.classification'), split('-'), normalize_has_type, lang('en')
to_field 'cho_has_type', extract_json('.classification'), split('-'), normalize_has_type, translation_map('has_type_ar_from_en'), lang('ar-Arab')
to_field 'cho_identifier', extract_json('.accessionNumber')
to_field 'cho_medium', extract_json('.medium'), lang('en')
to_field 'cho_spatial', extract_json('.city'), transform(&:presence), lang('en')
Expand Down
8 changes: 4 additions & 4 deletions traject_configs/yale_babylonian_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
to_field 'cho_aat_material', column('era'), split(':'), strip, transform(&:downcase), translation_map('getty_aat_materials'), translation_map('getty_aat_materials_to_ar'), lang('ar-Arab')
to_field 'cho_dc_rights', literal('http://creativecommons.org/publicdomain/zero/1.0/'), lang('en')
to_field 'cho_description', column('type'), lang('en')
to_field 'cho_edm_type', literal('Object'), lang('en')
to_field 'cho_edm_type', literal('Object'), lang('ar-Arab')
to_field 'cho_edm_type', column('format'), split(';'), normalize_has_type, normalize_edm_type, lang('en')
to_field 'cho_edm_type', column('format'), split(';'), normalize_has_type, normalize_edm_type, translation_map('edm_type_ar_from_en'), lang('ar-Arab')
to_field 'cho_format', column('format'), lang('en')
to_field 'cho_has_type', column('format'), split(';'), strip, translation_map('object_has_types'), lang('en')
to_field 'cho_has_type', column('format'), split(';'), strip, translation_map('object_has_types'), translation_map('norm_types_to_ar'), lang('ar-Arab')
to_field 'cho_has_type', column('format'), split(';'), normalize_has_type, lang('en')
to_field 'cho_has_type', column('format'), split(';'), normalize_has_type, translation_map('has_type_ar_from_en'), lang('ar-Arab')
to_field 'cho_identifier', column('callnumber'), prepend('Catalog Number: ')
to_field 'cho_identifier', column('type'), split(';'), last, gsub(' original catalog number ', ''), prepend('Original Number: ')
to_field 'cho_medium', column('era'), lang('en')
Expand Down