From 918b9f952abbf80d20ae8695c020c0ad38f726cc Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 14:56:05 -0400 Subject: [PATCH 01/19] set up stuff for work on benchmarking --- collectionspace-mapper.gemspec | 2 + spec/benchmarking.rb | 59 +- .../core_6-1-0_collectionobject.json | 4634 +++++++++++++++++ .../core_collectionobjects_10.json | 22 + .../core_collectionobjects_100.json | 15 + .../core_collectionobjects_101.json | 15 + .../core_collectionobjects_102.json | 3 + .../core_collectionobjects_11.json | 22 + .../core_collectionobjects_12.json | 21 + .../core_collectionobjects_13.json | 20 + .../core_collectionobjects_14.json | 18 + .../core_collectionobjects_15.json | 19 + .../core_collectionobjects_16.json | 13 + .../core_collectionobjects_17.json | 13 + .../core_collectionobjects_18.json | 19 + .../core_collectionobjects_19.json | 18 + .../data_hashes/core_collectionobjects_2.json | 177 + .../core_collectionobjects_20.json | 16 + .../core_collectionobjects_21.json | 17 + .../core_collectionobjects_22.json | 18 + .../core_collectionobjects_23.json | 19 + .../core_collectionobjects_24.json | 17 + .../core_collectionobjects_25.json | 18 + .../core_collectionobjects_26.json | 18 + .../core_collectionobjects_27.json | 16 + .../core_collectionobjects_28.json | 18 + .../core_collectionobjects_29.json | 18 + .../data_hashes/core_collectionobjects_3.json | 23 + .../core_collectionobjects_30.json | 18 + .../core_collectionobjects_31.json | 17 + .../core_collectionobjects_32.json | 11 + .../core_collectionobjects_33.json | 14 + .../core_collectionobjects_34.json | 13 + .../core_collectionobjects_35.json | 13 + .../core_collectionobjects_36.json | 14 + .../core_collectionobjects_37.json | 18 + .../core_collectionobjects_38.json | 16 + .../core_collectionobjects_39.json | 16 + .../data_hashes/core_collectionobjects_4.json | 22 + .../core_collectionobjects_40.json | 16 + .../core_collectionobjects_41.json | 16 + .../core_collectionobjects_42.json | 17 + .../core_collectionobjects_43.json | 17 + .../core_collectionobjects_44.json | 16 + .../core_collectionobjects_45.json | 16 + .../core_collectionobjects_46.json | 16 + .../core_collectionobjects_47.json | 17 + .../core_collectionobjects_48.json | 17 + .../core_collectionobjects_49.json | 17 + .../data_hashes/core_collectionobjects_5.json | 22 + .../core_collectionobjects_50.json | 17 + .../core_collectionobjects_51.json | 16 + .../core_collectionobjects_52.json | 16 + .../core_collectionobjects_53.json | 16 + .../core_collectionobjects_54.json | 14 + .../core_collectionobjects_55.json | 16 + .../core_collectionobjects_56.json | 16 + .../core_collectionobjects_57.json | 16 + .../core_collectionobjects_58.json | 16 + .../core_collectionobjects_59.json | 16 + .../data_hashes/core_collectionobjects_6.json | 22 + .../core_collectionobjects_60.json | 16 + .../core_collectionobjects_61.json | 17 + .../core_collectionobjects_62.json | 18 + .../core_collectionobjects_63.json | 14 + .../core_collectionobjects_64.json | 14 + .../core_collectionobjects_65.json | 16 + .../core_collectionobjects_66.json | 18 + .../core_collectionobjects_67.json | 14 + .../core_collectionobjects_68.json | 18 + .../core_collectionobjects_69.json | 18 + .../data_hashes/core_collectionobjects_7.json | 22 + .../core_collectionobjects_70.json | 18 + .../core_collectionobjects_71.json | 18 + .../core_collectionobjects_72.json | 18 + .../core_collectionobjects_73.json | 18 + .../core_collectionobjects_74.json | 17 + .../core_collectionobjects_75.json | 18 + .../core_collectionobjects_76.json | 18 + .../core_collectionobjects_77.json | 18 + .../core_collectionobjects_78.json | 16 + .../core_collectionobjects_79.json | 16 + .../data_hashes/core_collectionobjects_8.json | 22 + .../core_collectionobjects_80.json | 18 + .../core_collectionobjects_81.json | 18 + .../core_collectionobjects_82.json | 18 + .../core_collectionobjects_83.json | 18 + .../core_collectionobjects_84.json | 18 + .../core_collectionobjects_85.json | 18 + .../core_collectionobjects_86.json | 18 + .../core_collectionobjects_87.json | 15 + .../core_collectionobjects_88.json | 11 + .../core_collectionobjects_89.json | 14 + .../data_hashes/core_collectionobjects_9.json | 22 + .../core_collectionobjects_90.json | 16 + .../core_collectionobjects_91.json | 15 + .../core_collectionobjects_92.json | 16 + .../core_collectionobjects_93.json | 15 + .../core_collectionobjects_94.json | 15 + .../core_collectionobjects_95.json | 16 + .../core_collectionobjects_96.json | 11 + .../core_collectionobjects_97.json | 10 + .../core_collectionobjects_98.json | 16 + .../core_collectionobjects_99.json | 11 + utils/benchmarking/handler_with_cache.rb | 58 + utils/core_collectionobjects.csv | 102 + 106 files changed, 6682 insertions(+), 17 deletions(-) create mode 100644 utils/benchmarking/fixtures/core_collectionobject/core_6-1-0_collectionobject.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_10.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_100.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_101.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_102.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_11.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_12.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_13.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_14.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_15.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_16.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_17.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_18.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_19.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_2.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_20.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_21.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_22.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_23.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_24.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_25.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_26.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_27.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_28.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_29.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_3.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_30.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_31.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_32.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_33.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_34.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_35.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_36.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_37.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_38.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_39.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_4.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_40.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_41.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_42.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_43.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_44.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_45.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_46.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_47.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_48.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_49.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_5.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_50.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_51.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_52.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_53.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_54.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_55.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_56.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_57.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_58.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_59.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_6.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_60.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_61.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_62.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_63.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_64.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_65.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_66.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_67.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_68.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_69.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_7.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_70.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_71.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_72.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_73.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_74.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_75.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_76.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_77.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_78.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_79.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_8.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_80.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_81.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_82.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_83.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_84.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_85.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_86.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_87.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_88.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_89.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_9.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_90.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_91.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_92.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_93.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_94.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_95.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_96.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_97.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_98.json create mode 100644 utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_99.json create mode 100644 utils/benchmarking/handler_with_cache.rb create mode 100644 utils/core_collectionobjects.csv diff --git a/collectionspace-mapper.gemspec b/collectionspace-mapper.gemspec index 5efa5a6e..14bdaa7a 100644 --- a/collectionspace-mapper.gemspec +++ b/collectionspace-mapper.gemspec @@ -46,4 +46,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rake', '>= 13.0.1' spec.add_development_dependency 'rspec', '~> 3.0' + spec.add_development_dependency 'ruby-prof', '~> 1.4.3' + spec.add_development_dependency 'time_up', '~> 0.0.7' end diff --git a/spec/benchmarking.rb b/spec/benchmarking.rb index f87dd18d..906e74aa 100644 --- a/spec/benchmarking.rb +++ b/spec/benchmarking.rb @@ -1,33 +1,58 @@ # frozen_string_literal: true require 'bundler/setup' -require 'benchmark' +require 'time_up' +require 'pry' + require 'collectionspace/mapper' require 'facets/array/before' require_relative './helpers' -config = {} -rm_anthro_co = Helpers.get_json_record_mapper('spec/fixtures/files/mappers/anthro_4_0_0-collectionobject.json') -dh = DataHandler.new(record_mapper: rm_anthro_co, cache: Helpers.anthro_cache, client: Helpers.anthro_client, config: config) +config = {delimiter: ';'} +mapper_path = File.join('fixtures', 'benchmarking', 'core_collectionobject', 'core_6-1-0_collectionobject.json') +rec_mapper = Helpers.get_json_record_mapper(mapper_path) +client = Helpers.core_client -fixture = 'anthro/collectionobject1.xml' -fdoc = Helpers.get_xml_fixture(fixture) +cache_config = { + domain: 'core.collectionspace.org', + search_enabled: false, + search_identifiers: false +} -n = 10000 +cache = CollectionSpace::RefCache.new(config: cache_config, client: client) +popcache = CollectionSpace::RefCache.new(config: cache_config, client: client) +Helpers.populate_core(popcache) -xpaths = Helpers.test_xpaths(fdoc, dh.mapper.mappings) +def handler_reusing_cache(mapper, cache, client, config) + TimeUp.start(:hdlr_chc_reuse) do + h = handler(mapper, cache, client, config) + c = h.mapper.termcache + end +end -Benchmark.bm do |benchmark| - benchmark.report('ext') do - n.times do - Helpers.field_value_xpaths(xpaths) - end +def handler_reusing_popcache(mapper, cache, client, config) + TimeUp.start(:hdlr_popchc_reuse) do + h = handler(mapper, cache, client, config) + c = h.mapper.termcache end - benchmark.report('new') do - n.times do - Helpers.field_value_xpaths_new(xpaths) - end +end + +def handler_new_cache(mapper, client, config) + TimeUp.start(:hdlr_chc_new) do + h = handler(mapper, nil, client, config) + c = h.mapper.termcache end end +def handler(mapper, cache, client, config) + CS::Mapper::DataHandler.new(record_mapper: mapper, cache: cache, client: client, config: config) +end + +5.times do + handler_reusing_popcache(rec_mapper, popcache, client, config) + handler_new_cache(rec_mapper, client, config) + handler_reusing_cache(rec_mapper, cache, client, config) +end + +TimeUp.print_detailed_summary diff --git a/utils/benchmarking/fixtures/core_collectionobject/core_6-1-0_collectionobject.json b/utils/benchmarking/fixtures/core_collectionobject/core_6-1-0_collectionobject.json new file mode 100644 index 00000000..b858c8a7 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/core_6-1-0_collectionobject.json @@ -0,0 +1,4634 @@ +{ + "config": { + "profile_basename": "core", + "version": "6-1-0", + "recordtype": "collectionobject", + "document_name": "collectionobjects", + "service_name": "CollectionObjects", + "service_path": "collectionobjects", + "service_type": "object", + "object_name": "CollectionObject", + "ns_uri": { + "collectionobjects_common": "http://collectionspace.org/services/collectionobject" + }, + "identifier_field": "objectNumber", + "search_field": "objectNumber" + }, + "docstructure": { + "collectionobjects_common": { + "otherNumberList": { + "otherNumber": { + } + }, + "responsibleDepartments": { + }, + "namedCollections": { + }, + "publishToList": { + }, + "inventoryStatusList": { + }, + "briefDescriptions": { + }, + "comments": { + }, + "titleGroupList": { + "titleGroup": { + "titleTranslationSubGroupList": { + "titleTranslationSubGroup": { + } + } + } + }, + "objectNameList": { + "objectNameGroup": { + } + }, + "objectStatusList": { + }, + "forms": { + }, + "styles": { + }, + "colors": { + }, + "materialGroupList": { + "materialGroup": { + } + }, + "objectComponentGroupList": { + "objectComponentGroup": { + } + }, + "technicalAttributeGroupList": { + "technicalAttributeGroup": { + } + }, + "measuredPartGroupList": { + "measuredPartGroup": { + "dimensionSubGroupList": { + "dimensionSubGroup": { + } + } + } + }, + "contentLanguages": { + }, + "contentActivities": { + }, + "contentConcepts": { + }, + "contentPositions": { + }, + "contentObjectGroupList": { + "contentObjectGroup": { + } + }, + "contentPeoples": { + }, + "contentPersons": { + }, + "contentPlaces": { + }, + "contentScripts": { + }, + "contentOrganizations": { + }, + "contentEventNameGroupList": { + "contentEventNameGroup": { + } + }, + "contentOtherGroupList": { + "contentOtherGroup": { + } + }, + "textualInscriptionGroupList": { + "textualInscriptionGroup": { + } + }, + "nonTextualInscriptionGroupList": { + "nonTextualInscriptionGroup": { + } + }, + "objectProductionDateGroupList": { + }, + "techniqueGroupList": { + "techniqueGroup": { + } + }, + "objectProductionPlaceGroupList": { + "objectProductionPlaceGroup": { + } + }, + "objectProductionReasons": { + }, + "objectProductionPeopleGroupList": { + "objectProductionPeopleGroup": { + } + }, + "objectProductionPersonGroupList": { + "objectProductionPersonGroup": { + } + }, + "objectProductionOrganizationGroupList": { + "objectProductionOrganizationGroup": { + } + }, + "assocActivityGroupList": { + "assocActivityGroup": { + } + }, + "assocObjectGroupList": { + "assocObjectGroup": { + } + }, + "assocConceptGroupList": { + "assocConceptGroup": { + } + }, + "assocCulturalContextGroupList": { + "assocCulturalContextGroup": { + } + }, + "assocOrganizationGroupList": { + "assocOrganizationGroup": { + } + }, + "assocPeopleGroupList": { + "assocPeopleGroup": { + } + }, + "assocPersonGroupList": { + "assocPersonGroup": { + } + }, + "assocPlaceGroupList": { + "assocPlaceGroup": { + } + }, + "assocEventOrganizations": { + }, + "assocEventPeoples": { + }, + "assocEventPersons": { + }, + "assocEventPlaces": { + }, + "assocDateGroupList": { + "assocDateGroup": { + } + }, + "usageGroupList": { + "usageGroup": { + } + }, + "owners": { + }, + "ownershipDateGroupList": { + }, + "ownersReferences": { + }, + "viewersReferences": { + }, + "referenceGroupList": { + "referenceGroup": { + } + }, + "fieldCollectionMethods": { + }, + "fieldCollectionSources": { + }, + "fieldCollectors": { + }, + "fieldColEventNames": { + } + } + }, + "mappings": [ + { + "fieldname": "objectNumber", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "objectNumber", + "required": "y" + }, + { + "fieldname": "numberOfObjects", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "integer", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "numberOfObjects", + "required": "n" + }, + { + "fieldname": "numberValue", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "otherNumberList", + "otherNumber" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "numberValue", + "required": "n" + }, + { + "fieldname": "numberType", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "numberTypes", + "namespace": "collectionobjects_common", + "xpath": [ + "otherNumberList", + "otherNumber" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "lender", + "obsolete", + "previous", + "serial", + "unknown" + ], + "datacolumn": "numberType", + "required": "n" + }, + { + "fieldname": "responsibleDepartment", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "departments", + "namespace": "collectionobjects_common", + "xpath": [ + "responsibleDepartments" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + "antiquities", + "architecture-design", + "decorative-arts", + "ethnography", + "herpetology", + "media-performance-art", + "paintings-sculpture", + "paleobotany", + "photographs", + "prints-drawings" + ], + "datacolumn": "responsibleDepartment", + "required": "n" + }, + { + "fieldname": "collection", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "collections", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "library-collection", + "permanent-collection", + "study-collection", + "teaching-collection" + ], + "datacolumn": "collection", + "required": "n" + }, + { + "fieldname": "namedCollection", + "transforms": { + "authority": [ + "workauthorities", + "work" + ] + }, + "source_type": "authority", + "source_name": "work/local", + "namespace": "collectionobjects_common", + "xpath": [ + "namedCollections" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "namedCollection", + "required": "n" + }, + { + "fieldname": "namedCollection", + "transforms": { + }, + "source_type": "authority", + "source_name": "work/local", + "namespace": "collectionobjects_common", + "xpath": [ + "namedCollections" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "namedCollectionRefname", + "required": "n" + }, + { + "fieldname": "recordStatus", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "recordStatuses", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "approved", + "in-process", + "new", + "temporary" + ], + "datacolumn": "recordStatus", + "required": "n" + }, + { + "fieldname": "publishTo", + "transforms": { + "vocabulary": "publishto" + }, + "source_type": "vocabulary", + "source_name": "publishto", + "namespace": "collectionobjects_common", + "xpath": [ + "publishToList" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "publishTo", + "required": "n" + }, + { + "fieldname": "publishTo", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "publishto", + "namespace": "collectionobjects_common", + "xpath": [ + "publishToList" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "publishToRefname", + "required": "n" + }, + { + "fieldname": "inventoryStatus", + "transforms": { + "vocabulary": "inventorystatus" + }, + "source_type": "vocabulary", + "source_name": "inventorystatus", + "namespace": "collectionobjects_common", + "xpath": [ + "inventoryStatusList" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "inventoryStatus", + "required": "n" + }, + { + "fieldname": "inventoryStatus", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "inventorystatus", + "namespace": "collectionobjects_common", + "xpath": [ + "inventoryStatusList" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "inventoryStatusRefname", + "required": "n" + }, + { + "fieldname": "briefDescription", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "briefDescriptions" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "briefDescription", + "required": "n" + }, + { + "fieldname": "distinguishingFeatures", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "distinguishingFeatures", + "required": "n" + }, + { + "fieldname": "comment", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "comments" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "comment", + "required": "n" + }, + { + "fieldname": "title", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "title", + "required": "n" + }, + { + "fieldname": "titleLanguage", + "transforms": { + "vocabulary": "languages" + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "titleLanguage", + "required": "n" + }, + { + "fieldname": "titleLanguage", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "titleLanguageRefname", + "required": "n" + }, + { + "fieldname": "titleType", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "titleTypes", + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "assigned-by-artist", + "collection", + "generic", + "popular", + "series", + "trade" + ], + "datacolumn": "titleType", + "required": "n" + }, + { + "fieldname": "titleTranslation", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup", + "titleTranslationSubGroupList", + "titleTranslationSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "titleTranslation", + "required": "n" + }, + { + "fieldname": "titleTranslationLanguage", + "transforms": { + "vocabulary": "languages" + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup", + "titleTranslationSubGroupList", + "titleTranslationSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "titleTranslationLanguage", + "required": "n" + }, + { + "fieldname": "titleTranslationLanguage", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "titleGroupList", + "titleGroup", + "titleTranslationSubGroupList", + "titleTranslationSubGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "titleTranslationLanguageRefname", + "required": "n" + }, + { + "fieldname": "objectName", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectName", + "required": "n" + }, + { + "fieldname": "objectNameCurrency", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "nameCurrencies", + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "archaic", + "current" + ], + "datacolumn": "objectNameCurrency", + "required": "n" + }, + { + "fieldname": "objectNameLevel", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "nameLevels", + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "group", + "subgroup" + ], + "datacolumn": "objectNameLevel", + "required": "n" + }, + { + "fieldname": "objectNameSystem", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "nameSystems", + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "art-and-architecture-thesaurus", + "nomenclature" + ], + "datacolumn": "objectNameSystem", + "required": "n" + }, + { + "fieldname": "objectNameType", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "nameTypes", + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "classified", + "denomination", + "simple", + "taxonomic", + "typological" + ], + "datacolumn": "objectNameType", + "required": "n" + }, + { + "fieldname": "objectNameLanguage", + "transforms": { + "vocabulary": "languages" + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectNameLanguage", + "required": "n" + }, + { + "fieldname": "objectNameLanguage", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectNameLanguageRefname", + "required": "n" + }, + { + "fieldname": "objectNameNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectNameList", + "objectNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectNameNote", + "required": "n" + }, + { + "fieldname": "copyNumber", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "copyNumber", + "required": "n" + }, + { + "fieldname": "objectStatus", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "objectStatuses", + "namespace": "collectionobjects_common", + "xpath": [ + "objectStatusList" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + "copy", + "forgery", + "holotype", + "paralectotype", + "paratype", + "type" + ], + "datacolumn": "objectStatus", + "required": "n" + }, + { + "fieldname": "sex", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "sexes", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "female", + "male" + ], + "datacolumn": "sex", + "required": "n" + }, + { + "fieldname": "phase", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "phases", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "adult", + "imago", + "larva", + "nymph", + "pupa" + ], + "datacolumn": "phase", + "required": "n" + }, + { + "fieldname": "form", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "forms", + "namespace": "collectionobjects_common", + "xpath": [ + "forms" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + "dry", + "pinned", + "thin-section", + "wet" + ], + "datacolumn": "form", + "required": "n" + }, + { + "fieldname": "editionNumber", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "editionNumber", + "required": "n" + }, + { + "fieldname": "ageQualifier", + "transforms": { + "vocabulary": "agequalifier" + }, + "source_type": "vocabulary", + "source_name": "agequalifier", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ageQualifier", + "required": "n" + }, + { + "fieldname": "ageQualifier", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "agequalifier", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ageQualifierRefname", + "required": "n" + }, + { + "fieldname": "age", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "integer", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "age", + "required": "n" + }, + { + "fieldname": "ageUnit", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "ageUnits", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "days", + "months", + "weeks", + "years" + ], + "datacolumn": "ageUnit", + "required": "n" + }, + { + "fieldname": "style", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "styles" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "style", + "required": "n" + }, + { + "fieldname": "color", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "colors" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "color", + "required": "n" + }, + { + "fieldname": "material", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "materialGroupList", + "materialGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "material", + "required": "n" + }, + { + "fieldname": "materialComponent", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "materialGroupList", + "materialGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "materialComponent", + "required": "n" + }, + { + "fieldname": "materialComponentNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "materialGroupList", + "materialGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "materialComponentNote", + "required": "n" + }, + { + "fieldname": "materialName", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "materialGroupList", + "materialGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "materialName", + "required": "n" + }, + { + "fieldname": "materialSource", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "materialGroupList", + "materialGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "materialSource", + "required": "n" + }, + { + "fieldname": "physicalDescription", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "physicalDescription", + "required": "n" + }, + { + "fieldname": "objectComponentName", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "objectComponentNames", + "namespace": "collectionobjects_common", + "xpath": [ + "objectComponentGroupList", + "objectComponentGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "blade", + "buttonhole", + "handle", + "sleeve" + ], + "datacolumn": "objectComponentName", + "required": "n" + }, + { + "fieldname": "objectComponentInformation", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectComponentGroupList", + "objectComponentGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectComponentInformation", + "required": "n" + }, + { + "fieldname": "technicalAttribute", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "technicalAttributes", + "namespace": "collectionobjects_common", + "xpath": [ + "technicalAttributeGroupList", + "technicalAttributeGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "magnetic-tape-type", + "record-speed" + ], + "datacolumn": "technicalAttribute", + "required": "n" + }, + { + "fieldname": "technicalAttributeMeasurement", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "technicalAttributeMeasurements", + "namespace": "collectionobjects_common", + "xpath": [ + "technicalAttributeGroupList", + "technicalAttributeGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "78", + "metal" + ], + "datacolumn": "technicalAttributeMeasurement", + "required": "n" + }, + { + "fieldname": "technicalAttributeMeasurementUnit", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "technicalAttributeMeasurementUnits", + "namespace": "collectionobjects_common", + "xpath": [ + "technicalAttributeGroupList", + "technicalAttributeGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "rpm" + ], + "datacolumn": "technicalAttributeMeasurementUnit", + "required": "n" + }, + { + "fieldname": "measuredPart", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "measuredParts", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "base", + "frame", + "framed", + "image-size", + "mount", + "paper-size", + "plate-size", + "unframed" + ], + "datacolumn": "measuredPart", + "required": "n" + }, + { + "fieldname": "dimensionSummary", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "dimensionSummary", + "required": "n" + }, + { + "fieldname": "dimension", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "dimensions", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "area", + "base", + "circumference", + "count", + "depth", + "diameter", + "height", + "length", + "running-time", + "target", + "volume", + "weight", + "width" + ], + "datacolumn": "dimension", + "required": "n" + }, + { + "fieldname": "measuredBy", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "measuredByPersonLocal", + "required": "n" + }, + { + "fieldname": "measuredBy", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "measuredByOrganizationLocal", + "required": "n" + }, + { + "fieldname": "measuredBy", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local; organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "measuredByRefname", + "required": "n" + }, + { + "fieldname": "measurementMethod", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "measurementMethods", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "balance_beam_scale", + "electronic_distance_measurement", + "goniometer", + "hydraulic_or_pneumatic_scale", + "measuring_tape_cloth", + "measuring_tape_metal", + "microscopy_reticule", + "odometer", + "optical_range_finder", + "osteometric_board", + "pacing_pedometer", + "protractor", + "ruler", + "sliding_calipers", + "spreading_calipers", + "spring_scale", + "stadia_transit", + "standard_mesh_screen", + "taping_chaining", + "theodolite_total_station" + ], + "datacolumn": "measurementMethod", + "required": "n" + }, + { + "fieldname": "value", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "float", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "value", + "required": "n" + }, + { + "fieldname": "measurementUnit", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "measurementUnits", + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "carats", + "centimeters", + "cubic-centimeters", + "feet", + "inches", + "kilograms", + "liters", + "meters", + "millimeters", + "minutes", + "ounces", + "pixels", + "pounds", + "square-feet", + "stories", + "tons" + ], + "datacolumn": "measurementUnit", + "required": "n" + }, + { + "fieldname": "valueQualifier", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "valueQualifier", + "required": "n" + }, + { + "fieldname": "valueDate", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "measuredPartGroupList", + "measuredPartGroup", + "dimensionSubGroupList", + "dimensionSubGroup" + ], + "data_type": "date", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "valueDate", + "required": "n" + }, + { + "fieldname": "contentDescription", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "contentDescription", + "required": "n" + }, + { + "fieldname": "contentLanguage", + "transforms": { + "vocabulary": "languages" + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "contentLanguages" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentLanguage", + "required": "n" + }, + { + "fieldname": "contentLanguage", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "contentLanguages" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentLanguageRefname", + "required": "n" + }, + { + "fieldname": "contentActivity", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentActivities" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentActivity", + "required": "n" + }, + { + "fieldname": "contentConcept", + "transforms": { + "authority": [ + "conceptauthorities", + "concept" + ] + }, + "source_type": "authority", + "source_name": "concept/associated", + "namespace": "collectionobjects_common", + "xpath": [ + "contentConcepts" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentConceptConceptAssociated", + "required": "n" + }, + { + "fieldname": "contentConcept", + "transforms": { + "authority": [ + "conceptauthorities", + "material_ca" + ] + }, + "source_type": "authority", + "source_name": "concept/material", + "namespace": "collectionobjects_common", + "xpath": [ + "contentConcepts" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentConceptConceptMaterial", + "required": "n" + }, + { + "fieldname": "contentConcept", + "transforms": { + }, + "source_type": "authority", + "source_name": "concept/associated; concept/material", + "namespace": "collectionobjects_common", + "xpath": [ + "contentConcepts" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentConceptRefname", + "required": "n" + }, + { + "fieldname": "contentDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "structured date group", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "contentDateGroup", + "required": "n" + }, + { + "fieldname": "contentPosition", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "positions", + "namespace": "collectionobjects_common", + "xpath": [ + "contentPositions" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + "back", + "base", + "bottom", + "front", + "inside", + "left", + "outside", + "recto", + "right", + "rim", + "top", + "verso" + ], + "datacolumn": "contentPosition", + "required": "n" + }, + { + "fieldname": "contentObject", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentObjectGroupList", + "contentObjectGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "contentObject", + "required": "n" + }, + { + "fieldname": "contentObjectType", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "contentObjectTypes", + "namespace": "collectionobjects_common", + "xpath": [ + "contentObjectGroupList", + "contentObjectGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "food", + "furniture" + ], + "datacolumn": "contentObjectType", + "required": "n" + }, + { + "fieldname": "contentPeople", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentPeoples" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentPeople", + "required": "n" + }, + { + "fieldname": "contentPerson", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "contentPersons" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentPersonPersonLocal", + "required": "n" + }, + { + "fieldname": "contentPerson", + "transforms": { + "authority": [ + "personauthorities", + "ulan_pa" + ] + }, + "source_type": "authority", + "source_name": "person/ulan", + "namespace": "collectionobjects_common", + "xpath": [ + "contentPersons" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentPersonPersonUlan", + "required": "n" + }, + { + "fieldname": "contentPerson", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local; person/ulan", + "namespace": "collectionobjects_common", + "xpath": [ + "contentPersons" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentPersonRefname", + "required": "n" + }, + { + "fieldname": "contentPlace", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentPlaces" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentPlace", + "required": "n" + }, + { + "fieldname": "contentScript", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "scripts", + "namespace": "collectionobjects_common", + "xpath": [ + "contentScripts" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + "carolingian-miniscule", + "gothic-script", + "palmer-method", + "roman-cursive", + "rustic-capitals", + "spencerian-method", + "square-capitals" + ], + "datacolumn": "contentScript", + "required": "n" + }, + { + "fieldname": "contentOrganization", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "contentOrganizations" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentOrganizationOrganizationLocal", + "required": "n" + }, + { + "fieldname": "contentOrganization", + "transforms": { + "authority": [ + "orgauthorities", + "ulan_oa" + ] + }, + "source_type": "authority", + "source_name": "organization/ulan", + "namespace": "collectionobjects_common", + "xpath": [ + "contentOrganizations" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentOrganizationOrganizationUlan", + "required": "n" + }, + { + "fieldname": "contentOrganization", + "transforms": { + }, + "source_type": "authority", + "source_name": "organization/local; organization/ulan", + "namespace": "collectionobjects_common", + "xpath": [ + "contentOrganizations" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "contentOrganizationRefname", + "required": "n" + }, + { + "fieldname": "contentEventName", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentEventNameGroupList", + "contentEventNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "contentEventName", + "required": "n" + }, + { + "fieldname": "contentEventNameType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentEventNameGroupList", + "contentEventNameGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "contentEventNameType", + "required": "n" + }, + { + "fieldname": "contentOther", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentOtherGroupList", + "contentOtherGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "contentOther", + "required": "n" + }, + { + "fieldname": "contentOtherType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "contentOtherGroupList", + "contentOtherGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "contentOtherType", + "required": "n" + }, + { + "fieldname": "contentNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "contentNote", + "required": "n" + }, + { + "fieldname": "inscriptionContent", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContent", + "required": "n" + }, + { + "fieldname": "inscriptionContentInscriber", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentInscriberPersonLocal", + "required": "n" + }, + { + "fieldname": "inscriptionContentInscriber", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentInscriberOrganizationLocal", + "required": "n" + }, + { + "fieldname": "inscriptionContentInscriber", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local; organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentInscriberRefname", + "required": "n" + }, + { + "fieldname": "inscriptionContentLanguage", + "transforms": { + "vocabulary": "languages" + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentLanguage", + "required": "n" + }, + { + "fieldname": "inscriptionContentLanguage", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "languages", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentLanguageRefname", + "required": "n" + }, + { + "fieldname": "inscriptionContentDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "structured date group", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentDateGroup", + "required": "n" + }, + { + "fieldname": "inscriptionContentPosition", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "positions", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "back", + "base", + "bottom", + "front", + "inside", + "left", + "outside", + "recto", + "right", + "rim", + "top", + "verso" + ], + "datacolumn": "inscriptionContentPosition", + "required": "n" + }, + { + "fieldname": "inscriptionContentScript", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "scripts", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "carolingian-miniscule", + "gothic-script", + "palmer-method", + "roman-cursive", + "rustic-capitals", + "spencerian-method", + "square-capitals" + ], + "datacolumn": "inscriptionContentScript", + "required": "n" + }, + { + "fieldname": "inscriptionContentType", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "inscriptionTypes", + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "brand", + "decoration", + "estate-stamp", + "graffiti", + "label", + "maker's-mark" + ], + "datacolumn": "inscriptionContentType", + "required": "n" + }, + { + "fieldname": "inscriptionContentMethod", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentMethod", + "required": "n" + }, + { + "fieldname": "inscriptionContentInterpretation", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentInterpretation", + "required": "n" + }, + { + "fieldname": "inscriptionContentTranslation", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentTranslation", + "required": "n" + }, + { + "fieldname": "inscriptionContentTransliteration", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "textualInscriptionGroupList", + "textualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionContentTransliteration", + "required": "n" + }, + { + "fieldname": "inscriptionDescription", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescription", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionInscriber", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescriptionInscriberPersonLocal", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionInscriber", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescriptionInscriberOrganizationLocal", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionInscriber", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local; organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescriptionInscriberRefname", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "structured date group", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescriptionDateGroup", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionPosition", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "positions", + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "back", + "base", + "bottom", + "front", + "inside", + "left", + "outside", + "recto", + "right", + "rim", + "top", + "verso" + ], + "datacolumn": "inscriptionDescriptionPosition", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionType", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "inscriptionTypes", + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + "brand", + "decoration", + "estate-stamp", + "graffiti", + "label", + "maker's-mark" + ], + "datacolumn": "inscriptionDescriptionType", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionMethod", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescriptionMethod", + "required": "n" + }, + { + "fieldname": "inscriptionDescriptionInterpretation", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "nonTextualInscriptionGroupList", + "nonTextualInscriptionGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "inscriptionDescriptionInterpretation", + "required": "n" + }, + { + "fieldname": "objectProductionDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionDateGroupList" + ], + "data_type": "structured date group", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionDateGroup", + "required": "n" + }, + { + "fieldname": "technique", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "techniqueGroupList", + "techniqueGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "technique", + "required": "n" + }, + { + "fieldname": "techniqueType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "techniqueGroupList", + "techniqueGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "techniqueType", + "required": "n" + }, + { + "fieldname": "objectProductionPlace", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPlaceGroupList", + "objectProductionPlaceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPlace", + "required": "n" + }, + { + "fieldname": "objectProductionPlaceRole", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPlaceGroupList", + "objectProductionPlaceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPlaceRole", + "required": "n" + }, + { + "fieldname": "objectProductionReason", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionReasons" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionReason", + "required": "n" + }, + { + "fieldname": "objectProductionPeople", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPeopleGroupList", + "objectProductionPeopleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPeople", + "required": "n" + }, + { + "fieldname": "objectProductionPeopleRole", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPeopleGroupList", + "objectProductionPeopleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPeopleRole", + "required": "n" + }, + { + "fieldname": "objectProductionPerson", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPersonGroupList", + "objectProductionPersonGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPerson", + "required": "n" + }, + { + "fieldname": "objectProductionPerson", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPersonGroupList", + "objectProductionPersonGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPersonRefname", + "required": "n" + }, + { + "fieldname": "objectProductionPersonRole", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionPersonGroupList", + "objectProductionPersonGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionPersonRole", + "required": "n" + }, + { + "fieldname": "objectProductionOrganization", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionOrganizationGroupList", + "objectProductionOrganizationGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionOrganization", + "required": "n" + }, + { + "fieldname": "objectProductionOrganization", + "transforms": { + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionOrganizationGroupList", + "objectProductionOrganizationGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionOrganizationRefname", + "required": "n" + }, + { + "fieldname": "objectProductionOrganizationRole", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "objectProductionOrganizationGroupList", + "objectProductionOrganizationGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionOrganizationRole", + "required": "n" + }, + { + "fieldname": "objectProductionNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "objectProductionNote", + "required": "n" + }, + { + "fieldname": "assocActivity", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocActivityGroupList", + "assocActivityGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocActivity", + "required": "n" + }, + { + "fieldname": "assocActivityType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocActivityGroupList", + "assocActivityGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocActivityType", + "required": "n" + }, + { + "fieldname": "assocActivityNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocActivityGroupList", + "assocActivityGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocActivityNote", + "required": "n" + }, + { + "fieldname": "assocObject", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocObjectGroupList", + "assocObjectGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocObject", + "required": "n" + }, + { + "fieldname": "assocObjectType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocObjectGroupList", + "assocObjectGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocObjectType", + "required": "n" + }, + { + "fieldname": "assocObjectNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocObjectGroupList", + "assocObjectGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocObjectNote", + "required": "n" + }, + { + "fieldname": "assocConcept", + "transforms": { + "authority": [ + "conceptauthorities", + "concept" + ] + }, + "source_type": "authority", + "source_name": "concept/associated", + "namespace": "collectionobjects_common", + "xpath": [ + "assocConceptGroupList", + "assocConceptGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocConcept", + "required": "n" + }, + { + "fieldname": "assocConcept", + "transforms": { + }, + "source_type": "authority", + "source_name": "concept/associated", + "namespace": "collectionobjects_common", + "xpath": [ + "assocConceptGroupList", + "assocConceptGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocConceptRefname", + "required": "n" + }, + { + "fieldname": "assocConceptType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocConceptGroupList", + "assocConceptGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocConceptType", + "required": "n" + }, + { + "fieldname": "assocConceptNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocConceptGroupList", + "assocConceptGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocConceptNote", + "required": "n" + }, + { + "fieldname": "assocCulturalContext", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocCulturalContextGroupList", + "assocCulturalContextGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocCulturalContext", + "required": "n" + }, + { + "fieldname": "assocCulturalContextType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocCulturalContextGroupList", + "assocCulturalContextGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocCulturalContextType", + "required": "n" + }, + { + "fieldname": "assocCulturalContextNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocCulturalContextGroupList", + "assocCulturalContextGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocCulturalContextNote", + "required": "n" + }, + { + "fieldname": "assocOrganization", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocOrganizationGroupList", + "assocOrganizationGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocOrganization", + "required": "n" + }, + { + "fieldname": "assocOrganization", + "transforms": { + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocOrganizationGroupList", + "assocOrganizationGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocOrganizationRefname", + "required": "n" + }, + { + "fieldname": "assocOrganizationType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocOrganizationGroupList", + "assocOrganizationGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocOrganizationType", + "required": "n" + }, + { + "fieldname": "assocOrganizationNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocOrganizationGroupList", + "assocOrganizationGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocOrganizationNote", + "required": "n" + }, + { + "fieldname": "assocPeople", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPeopleGroupList", + "assocPeopleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPeople", + "required": "n" + }, + { + "fieldname": "assocPeopleType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPeopleGroupList", + "assocPeopleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPeopleType", + "required": "n" + }, + { + "fieldname": "assocPeopleNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPeopleGroupList", + "assocPeopleGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPeopleNote", + "required": "n" + }, + { + "fieldname": "assocPerson", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocPersonGroupList", + "assocPersonGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPerson", + "required": "n" + }, + { + "fieldname": "assocPerson", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocPersonGroupList", + "assocPersonGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPersonRefname", + "required": "n" + }, + { + "fieldname": "assocPersonType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPersonGroupList", + "assocPersonGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPersonType", + "required": "n" + }, + { + "fieldname": "assocPersonNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPersonGroupList", + "assocPersonGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPersonNote", + "required": "n" + }, + { + "fieldname": "assocPlace", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPlaceGroupList", + "assocPlaceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPlace", + "required": "n" + }, + { + "fieldname": "assocPlaceType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPlaceGroupList", + "assocPlaceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPlaceType", + "required": "n" + }, + { + "fieldname": "assocPlaceNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocPlaceGroupList", + "assocPlaceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocPlaceNote", + "required": "n" + }, + { + "fieldname": "assocEventName", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "assocEventName", + "required": "n" + }, + { + "fieldname": "assocEventNameType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "assocEventNameType", + "required": "n" + }, + { + "fieldname": "assocEventOrganization", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocEventOrganizations" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "assocEventOrganization", + "required": "n" + }, + { + "fieldname": "assocEventOrganization", + "transforms": { + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocEventOrganizations" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "assocEventOrganizationRefname", + "required": "n" + }, + { + "fieldname": "assocEventPeople", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocEventPeoples" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "assocEventPeople", + "required": "n" + }, + { + "fieldname": "assocEventPerson", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocEventPersons" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "assocEventPerson", + "required": "n" + }, + { + "fieldname": "assocEventPerson", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "assocEventPersons" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "assocEventPersonRefname", + "required": "n" + }, + { + "fieldname": "assocEventPlace", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocEventPlaces" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "assocEventPlace", + "required": "n" + }, + { + "fieldname": "assocEventNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "assocEventNote", + "required": "n" + }, + { + "fieldname": "assocStructuredDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocDateGroupList", + "assocDateGroup" + ], + "data_type": "structured date group", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocStructuredDateGroup", + "required": "n" + }, + { + "fieldname": "assocDateType", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocDateGroupList", + "assocDateGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocDateType", + "required": "n" + }, + { + "fieldname": "assocDateNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "assocDateGroupList", + "assocDateGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "assocDateNote", + "required": "n" + }, + { + "fieldname": "objectHistoryNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "objectHistoryNote", + "required": "n" + }, + { + "fieldname": "usage", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "usageGroupList", + "usageGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "usage", + "required": "n" + }, + { + "fieldname": "usageNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "usageGroupList", + "usageGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "usageNote", + "required": "n" + }, + { + "fieldname": "owner", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "owners" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "ownerPersonLocal", + "required": "n" + }, + { + "fieldname": "owner", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "owners" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "ownerOrganizationLocal", + "required": "n" + }, + { + "fieldname": "owner", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local; organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "owners" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "ownerRefname", + "required": "n" + }, + { + "fieldname": "ownershipDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "ownershipDateGroupList" + ], + "data_type": "structured date group", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "ownershipDateGroup", + "required": "n" + }, + { + "fieldname": "ownershipAccess", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "ownershipAccessLevels", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "limited", + "open", + "restricted" + ], + "datacolumn": "ownershipAccess", + "required": "n" + }, + { + "fieldname": "ownershipCategory", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "ownershipCategories", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "company", + "private", + "public" + ], + "datacolumn": "ownershipCategory", + "required": "n" + }, + { + "fieldname": "ownershipPlace", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownershipPlace", + "required": "n" + }, + { + "fieldname": "ownershipExchangeMethod", + "transforms": { + }, + "source_type": "optionlist", + "source_name": "ownershipExchangeMethods", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + "bequest", + "exchange", + "gift", + "purchase", + "transfer", + "treasure" + ], + "datacolumn": "ownershipExchangeMethod", + "required": "n" + }, + { + "fieldname": "ownershipExchangeNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownershipExchangeNote", + "required": "n" + }, + { + "fieldname": "ownershipExchangePriceCurrency", + "transforms": { + "vocabulary": "currency" + }, + "source_type": "vocabulary", + "source_name": "currency", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownershipExchangePriceCurrency", + "required": "n" + }, + { + "fieldname": "ownershipExchangePriceCurrency", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "currency", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownershipExchangePriceCurrencyRefname", + "required": "n" + }, + { + "fieldname": "ownershipExchangePriceValue", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "float", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownershipExchangePriceValue", + "required": "n" + }, + { + "fieldname": "ownersPersonalExperience", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownersPersonalExperience", + "required": "n" + }, + { + "fieldname": "ownersPersonalResponse", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownersPersonalResponse", + "required": "n" + }, + { + "fieldname": "ownersReference", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "ownersReferences" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "ownersReference", + "required": "n" + }, + { + "fieldname": "ownersContributionNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "ownersContributionNote", + "required": "n" + }, + { + "fieldname": "viewersRole", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "viewersRole", + "required": "n" + }, + { + "fieldname": "viewersPersonalExperience", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "viewersPersonalExperience", + "required": "n" + }, + { + "fieldname": "viewersPersonalResponse", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "viewersPersonalResponse", + "required": "n" + }, + { + "fieldname": "viewersReference", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "viewersReferences" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "viewersReference", + "required": "n" + }, + { + "fieldname": "viewersContributionNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "viewersContributionNote", + "required": "n" + }, + { + "fieldname": "reference", + "transforms": { + "authority": [ + "citationauthorities", + "citation" + ] + }, + "source_type": "authority", + "source_name": "citation/local", + "namespace": "collectionobjects_common", + "xpath": [ + "referenceGroupList", + "referenceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "referenceCitationLocal", + "required": "n" + }, + { + "fieldname": "reference", + "transforms": { + "authority": [ + "citationauthorities", + "worldcat" + ] + }, + "source_type": "authority", + "source_name": "citation/worldcat", + "namespace": "collectionobjects_common", + "xpath": [ + "referenceGroupList", + "referenceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "referenceCitationWorldcat", + "required": "n" + }, + { + "fieldname": "reference", + "transforms": { + }, + "source_type": "authority", + "source_name": "citation/local; citation/worldcat", + "namespace": "collectionobjects_common", + "xpath": [ + "referenceGroupList", + "referenceGroup" + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "referenceRefname", + "required": "n" + }, + { + "fieldname": "referenceNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "referenceGroupList", + "referenceGroup" + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "y", + "opt_list_values": [ + + ], + "datacolumn": "referenceNote", + "required": "n" + }, + { + "fieldname": "fieldCollectionDateGroup", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "structured date group", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionDateGroup", + "required": "n" + }, + { + "fieldname": "fieldCollectionMethod", + "transforms": { + "vocabulary": "collectionmethod" + }, + "source_type": "vocabulary", + "source_name": "collectionmethod", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectionMethods" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionMethod", + "required": "n" + }, + { + "fieldname": "fieldCollectionMethod", + "transforms": { + }, + "source_type": "vocabulary", + "source_name": "collectionmethod", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectionMethods" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionMethodRefname", + "required": "n" + }, + { + "fieldname": "fieldCollectionPlace", + "transforms": { + "authority": [ + "placeauthorities", + "place" + ] + }, + "source_type": "authority", + "source_name": "place/local", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionPlacePlaceLocal", + "required": "n" + }, + { + "fieldname": "fieldCollectionPlace", + "transforms": { + "authority": [ + "placeauthorities", + "tgn_place" + ] + }, + "source_type": "authority", + "source_name": "place/tgn", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionPlacePlaceTgn", + "required": "n" + }, + { + "fieldname": "fieldCollectionPlace", + "transforms": { + }, + "source_type": "authority", + "source_name": "place/local; place/tgn", + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "csrefname", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionPlaceRefname", + "required": "n" + }, + { + "fieldname": "fieldCollectionSource", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectionSources" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionSource", + "required": "n" + }, + { + "fieldname": "fieldCollectionSource", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectionSources" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionSourceRefname", + "required": "n" + }, + { + "fieldname": "fieldCollector", + "transforms": { + "authority": [ + "personauthorities", + "person" + ] + }, + "source_type": "authority", + "source_name": "person/local", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectors" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectorPersonLocal", + "required": "n" + }, + { + "fieldname": "fieldCollector", + "transforms": { + "authority": [ + "orgauthorities", + "organization" + ] + }, + "source_type": "authority", + "source_name": "organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectors" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectorOrganizationLocal", + "required": "n" + }, + { + "fieldname": "fieldCollector", + "transforms": { + }, + "source_type": "authority", + "source_name": "person/local; organization/local", + "namespace": "collectionobjects_common", + "xpath": [ + "fieldCollectors" + ], + "data_type": "csrefname", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectorRefname", + "required": "n" + }, + { + "fieldname": "fieldCollectionNumber", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionNumber", + "required": "n" + }, + { + "fieldname": "fieldColEventName", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + "fieldColEventNames" + ], + "data_type": "string", + "repeats": "y", + "in_repeating_group": "n", + "opt_list_values": [ + + ], + "datacolumn": "fieldColEventName", + "required": "n" + }, + { + "fieldname": "fieldCollectionFeature", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionFeature", + "required": "n" + }, + { + "fieldname": "fieldCollectionNote", + "transforms": { + }, + "source_type": "na", + "source_name": null, + "namespace": "collectionobjects_common", + "xpath": [ + + ], + "data_type": "string", + "repeats": "n", + "in_repeating_group": "n/a", + "opt_list_values": [ + + ], + "datacolumn": "fieldCollectionNote", + "required": "n" + } + ] +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_10.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_10.json new file mode 100644 index 00000000..3f44beaa --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_10.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0009", + "numberOfObjects": "1", + "title": "Cyclone", + "titleLanguage": "English", + "objectName": "drawing", + "responsibleDepartment": "prints-drawings", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Eget nulla facilisi etiam dignissim diam quis enim lobortis scelerisque fermentum dui faucibus in ornare.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "8.5 x 11", + "dimension": "height; width", + "value": "8.5; 11", + "measurementUnit": "inches", + "material": "marker; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_100.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_100.json new file mode 100644 index 00000000..8a38fbed --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_100.json @@ -0,0 +1,15 @@ +{ + "objectNumber": "20CS.202.0017", + "numberOfObjects": "1", + "objectName": "Necklace", + "recordStatus": "approved", + "briefDescription": "necklace; 8 plain silver medallions, 2 tubular silver beads, 2 round silver beads, 1 central silver repousse medallion w/ bird design and 6 rings w/ 3 silver bells suspended from each strung on black cotton cord w/ red and gold thread accents, pink silk floss tassel. Circumference (as worn) approx. 46 cm.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "46", + "dimension": "length", + "value": "46", + "measurementUnit": "cm", + "material": "silk; cotton; gold plate; silver", + "objectProductionPlace": "Udaipur District", + "technique": "strung" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_101.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_101.json new file mode 100644 index 00000000..dfdb3da2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_101.json @@ -0,0 +1,15 @@ +{ + "objectNumber": "20CS.224.0011", + "numberOfObjects": "1", + "objectName": "Offering bowl", + "recordStatus": "approved", + "briefDescription": "Pottery bowl; out turned rim; upper half wall verticle and smooth; lower half rough slanting inward to flat base; undecorated; wheel turned.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "5.5 x 10.7", + "dimension": "height; diameter", + "value": "5.5; 10.7", + "measurementUnit": "cm", + "material": "pottery", + "objectProductionPeople": "Maya civilization", + "objectProductionPlace": "Campeche state" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_102.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_102.json new file mode 100644 index 00000000..ff9b2f0f --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_102.json @@ -0,0 +1,3 @@ +{ + "objectNumber": "20CS.224.0012" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_11.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_11.json new file mode 100644 index 00000000..eb503827 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_11.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0010", + "numberOfObjects": "1", + "title": "Blue Monday", + "titleLanguage": "English", + "objectName": "drawing", + "responsibleDepartment": "prints-drawings", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Non quam lacus suspendisse faucibus interdum posuere lorem ipsum dolor sit amet consectetur adipiscing elit.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "8.5 x 11", + "dimension": "height; width", + "value": "8.5; 11", + "measurementUnit": "inches", + "material": "marker; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_12.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_12.json new file mode 100644 index 00000000..efbac423 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_12.json @@ -0,0 +1,21 @@ +{ + "objectNumber": "20CS.018.1395", + "numberOfObjects": "1", + "title": "Souvenir books. The Wiz Scrapbook.", + "titleLanguage": "English", + "objectName": "Souvenir books", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "11 x 8.5 x .5", + "dimension": "height; width; depth", + "value": "11; 8.5; .5", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1978", + "objectProductionOrganization": "Berkley Publising Group", + "objectProductionOrganizationRole": "publisher", + "objectProductionPerson": "Richard J. Anobile", + "objectProductionPersonRole": "author", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_13.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_13.json new file mode 100644 index 00000000..a2779444 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_13.json @@ -0,0 +1,20 @@ +{ + "objectNumber": "20CS.008.0033a-d", + "numberOfObjects": "1", + "title": "Window cards. Applause.", + "titleLanguage": "English", + "objectName": "Window cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "22 x 14", + "dimension": "height; width", + "value": "22; 14", + "measurementUnit": "inches", + "contentPersonPersonLocal": "Helen Morgan", + "material": "paper", + "objectProductionDateGroup": "1930", + "objectProductionOrganization": "Paramount-Famous Lasky Corporation", + "objectProductionOrganizationRole": "distributor", + "technique": "lithography" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_14.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_14.json new file mode 100644 index 00000000..77258727 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_14.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.075.0084-.0094", + "numberOfObjects": "1", + "title": "Souvenir books. The Big Broadcast.", + "titleLanguage": "English", + "objectName": "Souvenir books", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "9 x 6", + "dimension": "height; width", + "value": "9; 6", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1932", + "objectProductionOrganization": "Paramount Publix Corporation", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_15.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_15.json new file mode 100644 index 00000000..2f8b53ee --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_15.json @@ -0,0 +1,19 @@ +{ + "objectNumber": "20CS.075.0085", + "numberOfObjects": "1", + "title": "Campaign books. The New Show World 1929-1930.", + "titleLanguage": "English", + "objectName": "Campaign books", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12.5 x 9.75", + "dimension": "height; width", + "value": "12.5; 9.75", + "measurementUnit": "inches", + "contentPersonPersonLocal": "Clara Bow; Harold Lloyd", + "material": "paper", + "objectProductionDateGroup": "1929", + "objectProductionOrganization": "Paramount-Famous Lasky Corporation", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_16.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_16.json new file mode 100644 index 00000000..d6d05c43 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_16.json @@ -0,0 +1,13 @@ +{ + "objectNumber": "20CS.034.0001", + "numberOfObjects": "1", + "title": "Jackets. Monsieur Beaucaire.", + "titleLanguage": "English", + "objectName": "Jackets", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "material": "textile", + "objectProductionDateGroup": "1924", + "objectProductionPerson": "Georges Barbier", + "objectProductionPersonRole": "designer" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_17.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_17.json new file mode 100644 index 00000000..bd61eb16 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_17.json @@ -0,0 +1,13 @@ +{ + "objectNumber": "20CS.107.0001", + "numberOfObjects": "1", + "title": "Sheet music. You Brought a New Kind of Love to Me.", + "titleLanguage": "English", + "objectName": "Sheet music", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "material": "paper", + "objectProductionDateGroup": "1930", + "objectProductionOrganization": "Famous Music Corporation", + "objectProductionOrganizationRole": "publisher" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_18.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_18.json new file mode 100644 index 00000000..c99d1197 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_18.json @@ -0,0 +1,19 @@ +{ + "objectNumber": "20CS.067.0001a", + "numberOfObjects": "1", + "title": "Souvenir books. The Smiling Lieutenant.", + "titleLanguage": "English", + "objectName": "Souvenir books", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12 x 8", + "dimension": "height; width", + "value": "12; 8", + "measurementUnit": "inches", + "contentPersonPersonLocal": "Maurice Chevalier", + "material": "paper", + "objectProductionDateGroup": "1931", + "objectProductionOrganization": "Paramount Publix Corporation", + "objectProductionOrganizationRole": "licensor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_19.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_19.json new file mode 100644 index 00000000..798ac70e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_19.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.008.0006a-f", + "numberOfObjects": "1", + "title": "Sheet music. Do Something.", + "titleLanguage": "English", + "objectName": "Sheet music", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12 x 9", + "dimension": "height; width", + "value": "12; 9", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1929", + "objectProductionPerson": "Bud Green", + "objectProductionPersonRole": "author" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_2.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_2.json new file mode 100644 index 00000000..307aa85d --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_2.json @@ -0,0 +1,177 @@ +{ + "objectNumber": "20CS.001.0001", + "numberOfObjects": "1", + "numberValue": "123456;98765", + "numberType": "lender;obsolete", + "title": "A Man; A Woman", + "titleLanguage": "English; English", + "titleType": "collection;generic", + "titleTranslation": "Un Homme^^Hombre; Une Femme^^Fraulein", + "titleTranslationLanguage": "French^^Spanish; French^^German", + "publishTo": "omeka;DPLA", + "inventoryStatus": "accessioned;destroyed", + "objectName": "drawing; Sheet music", + "objectNameCurrency": "current;archaic", + "objectNameLevel": "group;subgroup", + "objectNameSystem": "art-and-architecture-thesaurus; nomenclature", + "objectNameType": "classified;taxonomic", + "objectNameLanguage": "Arabic;English", + "objectNameNote": "Object Name Note text 1;Object Name Note text 2", + "responsibleDepartment": "prints-drawings;decorative-arts", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Ut consequat semper viverra nam libero justo laoreet sit amet cursus sit amet dictum sit.;Gravida cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus mauris vitae.", + "distinguishingFeatures": "Distinguishing features Text", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.; This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed;framed", + "dimensionSummary": "8.5 x 11;11 x 8.5 x .5", + "dimension": "height^^width;height^^width^^depth", + "measuredByPersonLocal": "Patricia Johnson^^Eleanor Brown;Patricia Johnson^^Eleanor Brown", + "measurementMethod": "sliding_calipers^^measuring_tape_cloth;spreading_calipers^^microscopy_reticule^^ruler", + "value": "8.5^^11;11^^8.5^^0.5", + "measurementUnit": "inches^^inches;inches^^inches^^meters", + "valueQualifier": "Qualifier Text 1^^Qualifier Text 2;Qualifier Text 1^^Qualifier Text 2^^Qualifier Text 3", + "valueDate": "2000/02/02^^2000/02/03;2000/02/04^^2000/02/05^^2000/02/06", + "contentPersonPersonLocal": "Inoke Aloha;Eleanor Brown", + "contentPeople": "Content People Text 1;Content People Text 2", + "contentPlace": "Content Place Text 1;Content Place Text 2", + "contentScript": "gothic-script;palmer-method", + "contentOrganizationOrganizationLocal": "Sample Organization; Sample Organization 2", + "contentEventName": "Sample Event 1; Sample Event 2", + "contentEventNameType": "Sample Event type 1; Sample Event type 2", + "contentOther": "Other Name Text 1; Other Name Text 2", + "contentOtherType": "Other Type 1; Other Type 2", + "contentDescription": "Content Description Sample Text.", + "contentLanguage": "Arabic;Chinese", + "contentActivity": "Content Activity Text 1; Content Activity Text 2", + "contentConceptConceptAssociated": "Sample Associated Concept", + "contentConceptConceptMaterial": "Sample Material Concept", + "contentDateGroup": "2015/05/11", + "contentPosition": "back;bottom", + "contentObject": "Content Object name text 1; Content Object name text 2", + "contentObjectType": "furniture;food", + "contentNote": "Content Note Text", + "copyNumber": "One", + "editionNumber": "Two", + "ageQualifier": "older than", + "age": "21", + "ageUnit": "months", + "form": "dry;thin-section", + "inscriptionContent": "Inscription content Text 1;Inscription content Text 2", + "inscriptionContentInscriberPersonLocal": "Patricia Johnson", + "inscriptionContentInscriberOrganizationLocal": ";Inscriber Org", + "inscriptionContentLanguage": "Arabic;Armenian", + "inscriptionContentDateGroup": "2003;2004", + "inscriptionContentPosition": "front;outside", + "inscriptionContentScript": "palmer-method;rustic-capitals", + "inscriptionContentType": "brand;decoration", + "inscriptionContentMethod": "incised;Inscription content Method 2", + "inscriptionContentInterpretation": "Interpretation Text 1;Interpretation Text 2", + "inscriptionContentTranslation": "Inscription content Translation 1;Inscription content Translation 2", + "inscriptionContentTransliteration": "Inscription content Transliteration 1;Inscription content Transliteration 2", + "inscriptionDescription": "Inscription description 1;Inscription description 2", + "inscriptionDescriptionInscriberPersonLocal": "Non Textual Inscriber Person", + "inscriptionDescriptionInscriberOrganizationLocal": "Non Textual Inscriber Organization", + "inscriptionDescriptionDateGroup": "2001;2002", + "inscriptionDescriptionPosition": "verso;base", + "inscriptionDescriptionType": "estate-stamp;maker's-mark", + "inscriptionDescriptionMethod": "Non Textual Inscription Method 1;Non Textual Inscription Method 2", + "inscriptionDescriptionInterpretation": "Non Textual Inscription Interpretation 1;Non Textual Inscription Interpretation 2", + "material": "marker; paper", + "materialComponent": "Material component text 1;Material component text 2", + "materialComponentNote": "Material Component Note 1;Material Component Note 2", + "materialName": "Material Name 1;Material Name 2", + "materialSource": "Material Source 1;Material Source 2", + "physicalDescription": "Physical Description Text", + "objectStatus": "copy;forgery", + "phase": "adult", + "sex": "male", + "style": "fauve;style text", + "color": "red;blue", + "technicalAttribute": "record-speed;magnetic-tape-type", + "technicalAttributeMeasurement": "metal;78", + "technicalAttributeMeasurementUnit": "rpm;rpm", + "objectComponentName": "blade;handle", + "objectComponentInformation": "Object Information Component Information Text 1;Object Information Component Information Text 2", + "objectProductionDateGroup": "2015;2016", + "objectProductionOrganization": "Admiral Corporation;Berkley Publising Group", + "objectProductionOrganizationRole": "distributor;publisher", + "objectProductionPeople": "Sample Culture; Sample Culture 2", + "objectProductionPeopleRole": "Production people role text.;Production people role text2", + "objectProductionPerson": "Eleanor Brown;Richard J. Anobile", + "objectProductionPersonRole": "artist;author", + "objectProductionPlace": "Louisville, KY;Production Place 2", + "objectProductionPlaceRole": "Production Place Role Text 1; Production Place Role Text 2", + "objectProductionReason": "Production Reason 1;Production Reason 2", + "objectProductionNote": "Production note text.", + "assocActivity": "Associated activity 1;Associated activity 2", + "assocActivityType": "Associated activity Type 1; Associated activity Type 2", + "assocActivityNote": "Associated activity Note 1; Associated activity Note 2", + "assocObject": "Associated object 1; Associated object 2", + "assocObjectNote": "Associated object Note 1; Associated object Note 2", + "assocObjectType": "Associated object Type 1; Associated object Type 2", + "assocConcept": "Associated concept 1; Associated concept 2", + "assocConceptNote": "Associated concept Note 1;Associated concept Note 2", + "assocConceptType": "Associated concept Type 1;Associated concept Type 2", + "assocCulturalContext": "Associated cultural affinity 1;Associated cultural affinity 2", + "assocCulturalContextType": "Associated cultural affinity Type 1;Associated cultural affinity Type 2", + "assocCulturalContextNote": "Associated cultural affinity Note 1;Associated cultural affinity Note 2", + "assocOrganization": "Associated organization 1;Associated organization 2", + "assocOrganizationType": "Associated organization Type 1;Associated organization Type 2", + "assocOrganizationNote": "Associated organization Note 1;Associated organization Note 2", + "assocPeople": "Native American;American", + "assocPeopleNote": "Associated people Note 1;Associated people Note 2", + "assocPeopleType": "assocPeopleTypeOne;assocPeopleTypetwo", + "assocPerson": "Associated person 1;Associated person 2", + "assocPersonType": "Associated person type 1;Associated person type 2", + "assocPersonNote": "Associated person Note 1;Associated person Note 2", + "assocPlace": "Associated place 1;Associated place 2", + "assocPlaceType": "Associated place Type 1;Associated place Type 2", + "assocPlaceNote": "Associated place Note 1;Associated place Note 2", + "assocEventName": "Associated event Text", + "assocEventNameType": "Associated event Type Text", + "assocEventOrganization": "Associated event organization 1;Associated event organization 2", + "assocEventPeople": "Associated event people text 1;Associated event people text 2", + "assocEventPerson": "Associated event person 1;Associated event person 2", + "assocEventPlace": "Associated event place Text 1;Associated event place Text 2", + "assocEventNote": "Associated event note Text", + "assocStructuredDateGroup": "2000;2001", + "assocDateType": "Associated date Type 1;Associated date Type 2", + "assocDateNote": "Associated date Note 1;Associated date Note 2", + "objectHistoryNote": "Object History Note Text.", + "usage": "Usage 1; Usage 2", + "usageNote": "Usage Note Text 1; Usage Note Text 2", + "ownerPersonLocal": "Owner Person 1", + "ownerOrganizationLocal": "Owner Organization 1", + "ownershipAccess": "limited", + "ownershipCategory": "company", + "ownershipPlace": "Ownership Place Text", + "ownershipDateGroup": "2015;2016", + "ownershipExchangeMethod": "exchange", + "ownershipExchangeNote": "Ownership Exchange Note Text", + "ownershipExchangePriceCurrency": "Canadian Dollar", + "ownershipExchangePriceValue": "145", + "ownersPersonalExperience": "Owner's personal experience Text.", + "ownersPersonalResponse": "Owner's personal response Text.", + "ownersReference": "Owner's reference Text 1;Owner's reference Text 2", + "ownersContributionNote": "Owner's contribution note Text.", + "viewersRole": "Viewer's role Text", + "viewersPersonalExperience": "Viewer's personal experience Text", + "viewersPersonalResponse": "Viewer's personal response Text", + "viewersReference": "Viewer's reference Text 1;Viewer's reference Text 2", + "viewersContributionNote": "Viewer's contribution note", + "referenceCitationLocal": "Reference Infor Text 1;Reference Infor Text 2", + "referenceNote": "Reference Infor Note 1; Reference Infor Note 2", + "fieldCollectionDateGroup": "2002", + "fieldCollectionMethod": "commissioned;excavation", + "fieldCollectionPlacePlaceLocal": "Field collection place Text", + "fieldCollectionSource": "Field collection source 1;Field collection source 2", + "fieldCollectorPersonLocal": "Field collector Person", + "fieldCollectorOrganizationLocal": "Field collector Organization", + "fieldCollectionNumber": "Field collection number Text", + "technique": "pen and ink;lithography", + "techniqueType": "Technique Type Text 1;Technique Type Text 2", + "fieldColEventName": "Kindergarten;Field collection event name Text 2", + "fieldCollectionNote": "Field collection note text.", + "fieldCollectionFeature": "Field collection feature text." +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_20.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_20.json new file mode 100644 index 00000000..69bc895e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_20.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.017.0004", + "numberOfObjects": "1", + "title": "Sheet music. What Do You Do Sunday, Mary?", + "titleLanguage": "English", + "objectName": "Sheet music", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12 x 9", + "dimension": "height; width", + "value": "12; 9", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1923" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_21.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_21.json new file mode 100644 index 00000000..067487be --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_21.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.031.0001", + "numberOfObjects": "1", + "title": "Sheet music. I'm Getting So Now I Don't Care.", + "titleLanguage": "English", + "objectName": "Sheet music", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12 x 9", + "dimension": "height; width", + "value": "12; 9", + "measurementUnit": "inches", + "contentPersonPersonLocal": "Rudolph Valentino", + "material": "paper", + "objectProductionDateGroup": "1924" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_22.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_22.json new file mode 100644 index 00000000..81dbed6b --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_22.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.003.0006", + "numberOfObjects": "1", + "title": "Sheet music. Alone.", + "titleLanguage": "English", + "objectName": "Sheet music", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12 x 9", + "dimension": "height; width", + "value": "12; 9", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1935", + "objectProductionOrganization": "Robbins Music Corporation", + "objectProductionOrganizationRole": "publisher" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_23.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_23.json new file mode 100644 index 00000000..a3df95b8 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_23.json @@ -0,0 +1,19 @@ +{ + "objectNumber": "20CS.038.0009", + "numberOfObjects": "1", + "title": "Sheet music. Please.", + "titleLanguage": "English", + "objectName": "Sheet music", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "12 x 9", + "dimension": "height; width", + "value": "12; 9", + "measurementUnit": "inches", + "contentPersonPersonLocal": "Bing Crosby", + "material": "paper", + "objectProductionDateGroup": "1932", + "objectProductionOrganization": "Famous Music Corporation", + "objectProductionOrganizationRole": "publisher" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_24.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_24.json new file mode 100644 index 00000000..ffad3be7 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_24.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.075.0360a-e", + "numberOfObjects": "1", + "title": "Window cards. Fast and Loose.", + "titleLanguage": "English", + "objectName": "Window cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "22 x 14", + "dimension": "height; width", + "value": "22; 14", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1930", + "objectProductionOrganization": "Paramount-Famous Lasky Corporation" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_25.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_25.json new file mode 100644 index 00000000..dc0df8a2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_25.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.054.0056", + "numberOfObjects": "1", + "title": "Playsets. Admiral Television Studio.", + "titleLanguage": "English", + "objectName": "Playsets", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "16.5 x 15.25", + "dimension": "height; width", + "value": "16.5; 15.25", + "measurementUnit": "inches", + "material": "plastic", + "objectProductionDateGroup": "1953", + "objectProductionOrganization": "Admiral Corporation", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_26.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_26.json new file mode 100644 index 00000000..f3209ce2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_26.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.080a-d", + "numberOfObjects": "1", + "title": "Lobby cards. Zaza.", + "titleLanguage": "English", + "objectName": "Lobby cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "11 x 14", + "dimension": "height; width", + "value": "11; 14", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1923", + "objectProductionOrganization": "Paramount Pictures", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_27.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_27.json new file mode 100644 index 00000000..0f4578eb --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_27.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.064.0068g", + "numberOfObjects": "1", + "title": "Lobby cards. Her Love Story.", + "titleLanguage": "English", + "objectName": "Lobby cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "11 x 14", + "dimension": "height; width", + "value": "11; 14", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1924" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_28.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_28.json new file mode 100644 index 00000000..de33c2d5 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_28.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.024.0027", + "numberOfObjects": "1", + "title": "Lobby cards. A Sainted Devil.", + "titleLanguage": "English", + "objectName": "Lobby cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "11 x 14", + "dimension": "height; width", + "value": "11; 14", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1924", + "objectProductionOrganization": "Paramount Pictures", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_29.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_29.json new file mode 100644 index 00000000..196b2f42 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_29.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.273", + "numberOfObjects": "1", + "title": "Lobby cards. The Potters.", + "titleLanguage": "English", + "objectName": "Lobby cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "11 x 14", + "dimension": "height; width", + "value": "11; 14", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1927", + "objectProductionOrganization": "Paramount Pictures", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_3.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_3.json new file mode 100644 index 00000000..a36c440d --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_3.json @@ -0,0 +1,23 @@ +{ + "objectNumber": "20CS.001.0002", + "numberOfObjects": "1", + "title": "Rainbow", + "titleLanguage": "English", + "objectName": "drawing", + "responsibleDepartment": "prints-drawings", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Sed cras ornare arcu dui vivamus arcu felis bibendum ut tristique et egestas quis ipsum.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "8.5 x 11", + "dimension": "height; width", + "measuredByOrganizationLocal": "Admiral Corporation", + "value": "8.5; 11", + "measurementUnit": "inches", + "material": "marker; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_30.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_30.json new file mode 100644 index 00000000..75652be9 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_30.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.021.0171", + "numberOfObjects": "1", + "title": "Lobby cards. The Crowded Hour.", + "titleLanguage": "English", + "objectName": "Lobby cards", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "11 x 14", + "dimension": "height; width", + "value": "11; 14", + "measurementUnit": "inches", + "material": "paper", + "objectProductionDateGroup": "1925", + "objectProductionOrganization": "Paramount Pictures", + "objectProductionOrganizationRole": "distributor" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_31.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_31.json new file mode 100644 index 00000000..892c09bd --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_31.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.002.0031", + "numberOfObjects": "1", + "title": "Dresses. Orphans of the Storm.", + "titleLanguage": "English", + "objectName": "Dresses", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "61 x 22.5", + "dimension": "height; width", + "value": "61; 22.5", + "measurementUnit": "inches", + "material": "textile", + "objectProductionDateGroup": "1921", + "objectProductionPerson": "Herman Patrick Tappe", + "objectProductionPersonRole": "designer" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_32.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_32.json new file mode 100644 index 00000000..6335533c --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_32.json @@ -0,0 +1,11 @@ +{ + "objectNumber": "20CS.096.0018", + "numberOfObjects": "1", + "title": "Dresses. When Knighthood Was in Flower.", + "titleLanguage": "English", + "objectName": "Dresses", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "Size 8", + "material": "fur; textile" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_33.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_33.json new file mode 100644 index 00000000..475c5a4d --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_33.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.096.0032", + "numberOfObjects": "1", + "title": "Capes. A Kiss for Cinderella.", + "titleLanguage": "English", + "objectName": "Capes", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "Men's 38", + "material": "textile", + "objectProductionDateGroup": "1925", + "objectProductionOrganization": "Eaves Costume Company", + "objectProductionOrganizationRole": "manufacturer" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_34.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_34.json new file mode 100644 index 00000000..36fc07fd --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_34.json @@ -0,0 +1,13 @@ +{ + "objectNumber": "20CS.096.0044", + "numberOfObjects": "1", + "title": "Jackets. The Scarlet Letter.", + "titleLanguage": "English", + "objectName": "Jackets", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "material": "textile", + "objectProductionDateGroup": "1926", + "objectProductionOrganization": "Eaves Costume Company", + "objectProductionOrganizationRole": "manufacturer" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_35.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_35.json new file mode 100644 index 00000000..243a747e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_35.json @@ -0,0 +1,13 @@ +{ + "objectNumber": "20CS.096.0056", + "numberOfObjects": "1", + "title": "Coats. A Kiss For Cinderella.", + "titleLanguage": "English", + "objectName": "Coats", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "material": "textile", + "objectProductionDateGroup": "1925", + "objectProductionOrganization": "Eaves Costume Company", + "objectProductionOrganizationRole": "manufacturer" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_36.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_36.json new file mode 100644 index 00000000..ba41d6ac --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_36.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.040.0013", + "numberOfObjects": "1", + "title": "Coats. Little Old New York.", + "titleLanguage": "English", + "objectName": "Coats", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "Men's 38", + "material": "textile", + "objectProductionDateGroup": "1923", + "objectProductionOrganization": "Eaves Costume Company", + "objectProductionOrganizationRole": "manufacturer" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_37.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_37.json new file mode 100644 index 00000000..9ead5a50 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_37.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.049.0008", + "numberOfObjects": "1", + "title": "Rampe", + "titleLanguage": "Danish", + "titleTranslation": "Ramp", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "315 x 980 x 150", + "dimension": "height; width; depth", + "value": "315; 980; 150", + "measurementUnit": "cm", + "material": "plaster; glass", + "objectProductionDateGroup": "1973", + "objectProductionPerson": "Nørgaard, Bjørn", + "objectProductionPersonRole": "artist" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_38.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_38.json new file mode 100644 index 00000000..1538899d --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_38.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.019.0160", + "numberOfObjects": "1", + "title": "Gipsobjekt", + "titleLanguage": "Danish", + "titleTranslation": "Plaster Object", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "220 x 315 x 225", + "dimension": "height; width; depth", + "value": "220; 315; 225", + "measurementUnit": "cm", + "material": "plaster; wood; wire", + "objectProductionDateGroup": "1967" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_39.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_39.json new file mode 100644 index 00000000..f7abe4bb --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_39.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.037.0001", + "numberOfObjects": "1", + "title": "I de dage Paven kom til Damaskus", + "titleLanguage": "Danish", + "titleTranslation": "In those Days the Pope Came to Damascus", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "668 x 670 x 15", + "dimension": "height; width; depth", + "value": "668; 670; 15", + "measurementUnit": "cm", + "material": "color intaglio", + "objectProductionDateGroup": "2002" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_4.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_4.json new file mode 100644 index 00000000..45492d69 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_4.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0003", + "numberOfObjects": "1", + "title": "Cloudy Day", + "titleLanguage": "English", + "objectName": "drawing", + "responsibleDepartment": "prints-drawings", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Integer eget aliquet nibh praesent tristique magna sit amet purus gravida quis blandit turpis cursus.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "8.5 x 11", + "dimension": "height; width", + "value": "8.5; 11", + "measurementUnit": "inches", + "material": "marker; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_40.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_40.json new file mode 100644 index 00000000..7c690d86 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_40.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.004.0005-.0007", + "numberOfObjects": "1", + "title": "Skitseblad med udkast til \"Glasmodeller\" m.m.", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with draft \"Glass Models\" etc.", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "245 x 338", + "dimension": "height; width", + "value": "245; 338", + "measurementUnit": "cm", + "material": "pen; black marker pen; blue pen", + "objectProductionDateGroup": "1967" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_41.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_41.json new file mode 100644 index 00000000..ab3b3249 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_41.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.004.0008", + "numberOfObjects": "1", + "title": "Skitseblad med skitser af \"Overhældninger med gibs\"", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with sketches of \"Over Slopes with plaster\"", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "101 x 145", + "dimension": "height; width", + "value": "101; 145", + "measurementUnit": "cm", + "material": "blue pen", + "objectProductionDateGroup": "1967" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_42.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_42.json new file mode 100644 index 00000000..c1d0f13e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_42.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.003.0131", + "numberOfObjects": "1", + "title": "Notatark til Ta's skulpturfestival, Galleri 101, St. Kongengsgade, september", + "titleLanguage": "Danish", + "titleTranslation": "Notepads to Ta's sculpture festival, Gallery 101, St. Kongengsgade, September", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "245 x 171", + "dimension": "height; width", + "value": "245; 171", + "measurementUnit": "cm", + "material": "blue pen", + "objectProductionDateGroup": "1967", + "technique": "On the back of the fragment of printed regnskabsark from Danish mortgages" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_43.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_43.json new file mode 100644 index 00000000..bcb7a4c2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_43.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.003.0132", + "numberOfObjects": "1", + "title": "Skitseblad med plan over Bjørn Nørgaards bidrag til Ta's skulpturfestival, september", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with the level of Bjørn Nørgaard's contribution to Ta's sculpture festival in September", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "174 x 146", + "dimension": "height; width", + "value": "174; 146", + "measurementUnit": "cm", + "material": "blue pen", + "objectProductionDateGroup": "1967", + "technique": "On the back of the fragment of printed regnskabsark from Danish mortgages" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_44.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_44.json new file mode 100644 index 00000000..f3378112 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_44.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.003.0261", + "numberOfObjects": "1", + "title": "Skitseblad med udkast til skulpturelle objekter; ikke udførte", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with draft sculptural objects; not performed", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "218 x 341", + "dimension": "height; width", + "value": "218; 341", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1982" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_45.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_45.json new file mode 100644 index 00000000..c10c3e1b --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_45.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.003.0267", + "numberOfObjects": "1", + "title": "Skitseblad med udkast til opstilling af standere og objekter på en udstilling på Vrå højskole", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with draft layout of the stands and objects on an exhibition at Vraa School", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "175 x 245", + "dimension": "height; width", + "value": "175; 245", + "measurementUnit": "cm", + "material": "blue-black pen", + "objectProductionDateGroup": "1967" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_46.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_46.json new file mode 100644 index 00000000..3383e8c7 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_46.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.024.0010a-b", + "numberOfObjects": "1", + "title": "Skitsebogsblad", + "titleLanguage": "Danish", + "titleTranslation": "Sketch Book Magazine", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "125 x 200", + "dimension": "height; width", + "value": "125; 200", + "measurementUnit": "cm", + "material": "blue pen", + "objectProductionDateGroup": "1967" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_47.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_47.json new file mode 100644 index 00000000..01229bbd --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_47.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.024.0013a-b", + "numberOfObjects": "1", + "title": "Skitseblad med selvportræt, bivouak og skulpturelle objekter", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with self-portrait, bivouak and sculptural objects", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "295 x 209", + "dimension": "height; width", + "value": "295; 209", + "measurementUnit": "cm", + "material": "pen; ink", + "objectProductionDateGroup": "1967", + "technique": "Drawn on the back of duplicated typewritten flyer from \"Anti Drug League / March 1968 \" entitled \"Youth destruction\"" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_48.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_48.json new file mode 100644 index 00000000..906586d2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_48.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.021.0183a", + "numberOfObjects": "1", + "title": "Skitseblad med to udkast til gips- og trådmonument", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with two draft plaster and wire monument", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "248 x 172", + "dimension": "height; width", + "value": "248; 172", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1968", + "technique": "Sign on the back of the fragment of regnskabsark for Danish mortgages" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_49.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_49.json new file mode 100644 index 00000000..1ac6e0f9 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_49.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.024.1135", + "numberOfObjects": "1", + "title": "Forlæg for to billeder til politikens tegneserie \"Livet i skovene\"", + "titleLanguage": "Danish", + "titleTranslation": "Model of two images of the policy cartoon \"Life in the Woods\"", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "160 x 190", + "dimension": "height; width", + "value": "160; 190", + "measurementUnit": "cm", + "material": "pen; ink; blue ink", + "objectProductionDateGroup": "1968", + "technique": "Two images pasted on underlying leaf" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_5.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_5.json new file mode 100644 index 00000000..f329f3b9 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_5.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0004", + "numberOfObjects": "1", + "title": "Dots Dots Dots", + "titleLanguage": "English", + "objectName": "drawing", + "responsibleDepartment": "prints-drawings", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Morbi tincidunt augue interdum velit euismod in pellentesque massa placerat duis ultricies lacus sed turpis.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "8.5 x 11", + "dimension": "height; width", + "value": "8.5; 11", + "measurementUnit": "inches", + "material": "marker; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_50.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_50.json new file mode 100644 index 00000000..baa53e14 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_50.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.024.1136", + "numberOfObjects": "1", + "title": "Forlæg for plakaten \"Øst vest hjemme bedst\", U-2 Festival, Det ny samfund i Hithouse, Kbh. 9.-10.11 1969", + "titleLanguage": "Danish", + "titleTranslation": "Model for the poster \"East west home is best\" U-2 Festival, the new community in Hithouse, Copenhagen. 9. - 10.11 1969", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "315 x 233", + "dimension": "height; width", + "value": "315; 233", + "measurementUnit": "cm", + "material": "blue pen; pen; ink", + "objectProductionDateGroup": "1969", + "technique": "pen and ink on magazine photo" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_51.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_51.json new file mode 100644 index 00000000..692460ca --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_51.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.096.0081", + "numberOfObjects": "1", + "title": "Skitseblad", + "titleLanguage": "Danish", + "titleTranslation": "Sketch Sheet", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "198 x 265", + "dimension": "height; width", + "value": "198; 265", + "measurementUnit": "cm", + "material": "blue pen", + "objectProductionDateGroup": "1969" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_52.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_52.json new file mode 100644 index 00000000..b023c296 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_52.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.049.0127", + "numberOfObjects": "1", + "title": "Bedstemors død", + "titleLanguage": "Danish", + "titleTranslation": "Grandmothers death", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "149 x 224", + "dimension": "height; width", + "value": "149; 224", + "measurementUnit": "cm", + "material": "coal; water", + "objectProductionDateGroup": "1978" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_53.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_53.json new file mode 100644 index 00000000..3393a243 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_53.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.005.0426", + "numberOfObjects": "1", + "title": "Bedstemors død", + "titleLanguage": "Danish", + "titleTranslation": "Grandmothers death", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "149 x 225", + "dimension": "height; width", + "value": "149; 225", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1978" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_54.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_54.json new file mode 100644 index 00000000..27df7b38 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_54.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.011.0006", + "numberOfObjects": "1", + "title": "Skitseblad med udkast til Ikastmonumentet også kaldet \"Kæmpehøj I\"", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with draft Ikast Monument also called \"Barrow In\"", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimension": "height; width", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1973" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_55.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_55.json new file mode 100644 index 00000000..22948fef --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_55.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.025.0012", + "numberOfObjects": "1", + "title": "Arbejdstegning til skulpturen \"Obelisk\"", + "titleLanguage": "Danish", + "titleTranslation": "Working Drawing for sculpture \"Obelisk\"", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "420 x 297", + "dimension": "height; width", + "value": "420; 297", + "measurementUnit": "cm", + "material": "blue pen; squared paper", + "objectProductionDateGroup": "1978" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_56.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_56.json new file mode 100644 index 00000000..d2df3e78 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_56.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.007.0003", + "numberOfObjects": "1", + "title": "Skitse efter nereiderne i Rubens Maleri \"Maria af Medici går i land i Marseille\" Louvre", + "titleLanguage": "Danish", + "titleTranslation": "Sketch by Nereids in Rubens Painting \"Maria de Medici go ashore in Marseille,\" Louvre", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "194 x 310", + "dimension": "height; width", + "value": "194; 310", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1979" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_57.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_57.json new file mode 100644 index 00000000..9688b440 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_57.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.021.0016", + "numberOfObjects": "1", + "title": "Skitse efter maleriet \"Bacchus og Adriadne\"", + "titleLanguage": "Danish", + "titleTranslation": "Sketch for the painting \"Bacchus and Adriadne\"", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "194 x 310", + "dimension": "height; width", + "value": "194; 310", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1979" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_58.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_58.json new file mode 100644 index 00000000..e8ada84b --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_58.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.002.0062", + "numberOfObjects": "1", + "title": "Udkast til tagfigurerne på Gladsaxe Hovedbibliotek", + "titleLanguage": "Danish", + "titleTranslation": "Draft tagfigurerne at Gladsaxe Main Library", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "420 x 591", + "dimension": "height; width", + "value": "420; 591", + "measurementUnit": "cm", + "material": "pencil; blue water color", + "objectProductionDateGroup": "1979" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_59.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_59.json new file mode 100644 index 00000000..d7af3757 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_59.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.064.0083.1-.2", + "numberOfObjects": "1", + "title": "Skitseblad med udkast til tegneserien til Hvedekorn 3, 1966", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with draft comic to Hvedekorn 3, 1966", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "341 x 440", + "dimension": "height; width", + "value": "341; 440", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1965" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_6.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_6.json new file mode 100644 index 00000000..4da76564 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_6.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0005", + "numberOfObjects": "1", + "title": "Untitled (Watercolor I)", + "titleLanguage": "English", + "objectName": "painting", + "responsibleDepartment": "paintings-sculpture", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Vestibulum lorem sed risus ultricies tristique nulla aliquet enim tortor at auctor urna nunc id.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "8.75 x 12", + "dimension": "height; width", + "value": "8.75; 12", + "measurementUnit": "inches", + "material": "watercolor; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_60.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_60.json new file mode 100644 index 00000000..bc53f123 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_60.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.021.0152", + "numberOfObjects": "1", + "title": "Skitseblad med udkast til tegneserien til Hvedekorn 3, 1966", + "titleLanguage": "Danish", + "titleTranslation": "Sketch sheet with draft comic to Hvedekorn 3, 1966", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "341 x 440", + "dimension": "height; width", + "value": "341; 440", + "measurementUnit": "cm", + "material": "pencil", + "objectProductionDateGroup": "1965" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_61.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_61.json new file mode 100644 index 00000000..d0d46e1e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_61.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.068.0332", + "numberOfObjects": "1", + "title": "Lene Adler Petersen som Den kvindelige Kristus", + "titleLanguage": "Danish", + "titleTranslation": "Lene Adler Petersen as the female Christ", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "505 x 300", + "dimension": "height; width", + "value": "505; 300", + "measurementUnit": "cm", + "material": "brush; black color", + "objectProductionDateGroup": "1969", + "technique": "9 photos from the movie \" The green dress.\" The photographs are pasted edge at the edge of a sheet that is shorter and wider than the overall picture." +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_62.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_62.json new file mode 100644 index 00000000..050f22eb --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_62.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.063.0138", + "numberOfObjects": "1", + "title": "Intuition", + "titleLanguage": "German", + "titleTranslation": "Intuition", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "12 x 8-3/8 x 3-3/8\"", + "dimension": "height; width; depth", + "value": "12; 8.375; 3.375", + "measurementUnit": "inches", + "objectProductionDateGroup": "1968", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "wood, graphite" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_63.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_63.json new file mode 100644 index 00000000..fc0f1ea7 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_63.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.018.0001", + "numberOfObjects": "1", + "title": "Filzanzug", + "titleLanguage": "German", + "titleTranslation": "Felt Suit", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "objectProductionDateGroup": "1970", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "sewn felt, ink stamp" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_64.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_64.json new file mode 100644 index 00000000..8c611257 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_64.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.018.0002", + "numberOfObjects": "1", + "title": "Sonnenscheibe", + "titleLanguage": "German", + "titleTranslation": "Sun Disc", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "objectProductionDateGroup": "1973", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "nickel-plated copper record master-mold, felt, oil paint, cardboard, offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_65.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_65.json new file mode 100644 index 00000000..a0e15ba7 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_65.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.018.0003a-b", + "numberOfObjects": "1", + "title": "Celtic +", + "titleLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "6-3/4 x 20-1/2 x 4-1/2\"", + "dimension": "height; width; depth", + "value": "6.75; 20.5; 4.5", + "measurementUnit": "inches", + "objectProductionDateGroup": "1971", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "linen covered cardboard box, cotton straps, metal, glass, cork, beeswax, gelatin, Super 8mm film, two wooden push pins, foam core board, black-and-white photographs" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_66.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_66.json new file mode 100644 index 00000000..1db0bc4b --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_66.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.018.0004", + "numberOfObjects": "1", + "title": "3-Tonnen-Edition", + "titleLanguage": "German", + "titleTranslation": "3 Ton Edition", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "18-1/8 x 17-5/8\"", + "dimension": "height; width", + "value": "18.125; 17.625", + "measurementUnit": "inches", + "objectProductionDateGroup": "1973", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "paint, ink, typeset printing, vinyl sheets screenprinted on both sides" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_67.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_67.json new file mode 100644 index 00000000..4e5cc976 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_67.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.049.0090a-b", + "numberOfObjects": "1", + "title": "Schwefel Ÿberzogene Zinkkiste (tamponierte Ecke)", + "titleLanguage": "German", + "titleTranslation": "Sulphur-Covered Zinc Box [Plugged Corner]", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "objectProductionDateGroup": "1970", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "sheet zinc, sulphur, gauze, ink stamp" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_68.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_68.json new file mode 100644 index 00000000..df908215 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_68.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.020.0012", + "numberOfObjects": "1", + "title": ": Quanten", + "titleLanguage": "German", + "titleTranslation": ":Quanta", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "13-1/2 x 10\" each sheet", + "dimension": "height; width", + "value": "13.5; 10", + "measurementUnit": "inches", + "objectProductionDateGroup": "1982", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "two screenprints on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_69.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_69.json new file mode 100644 index 00000000..ba19d4ef --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_69.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.009.0005-.0012", + "numberOfObjects": "1", + "title": "Eurasienstab Ÿber den Alpen", + "titleLanguage": "German", + "titleTranslation": "Eurasian Staff over the Alps", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "4-1/8 x 5-3/4\"", + "dimension": "height; width", + "value": "4.125; 5.75", + "measurementUnit": "inches", + "objectProductionDateGroup": "1971", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_7.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_7.json new file mode 100644 index 00000000..7c83b28e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_7.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0006", + "numberOfObjects": "1", + "title": "Garden", + "titleLanguage": "English", + "objectName": "painting", + "responsibleDepartment": "paintings-sculpture", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Gravida cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus mauris vitae.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "9 x 12", + "dimension": "height; width", + "value": "9; 12", + "measurementUnit": "inches", + "material": "acrylic paint; construction paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_70.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_70.json new file mode 100644 index 00000000..e10a5390 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_70.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.016.0001", + "numberOfObjects": "1", + "title": "Heidelberg", + "titleLanguage": "German", + "titleTranslation": "Heidelberg", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "4-1/8 x 5-3/4\"", + "dimension": "height; width", + "value": "4.125; 5.75", + "measurementUnit": "inches", + "objectProductionDateGroup": "1970", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph, ink stamp on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_71.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_71.json new file mode 100644 index 00000000..ac31aa9c --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_71.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.016.0002.1-.2", + "numberOfObjects": "1", + "title": "jeder Griff mu§ sitzen", + "titleLanguage": "German", + "titleTranslation": "Every Move Has to Be", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "4 x 5-7/8\"", + "dimension": "height; width", + "value": "4; 5.875", + "measurementUnit": "inches", + "objectProductionDateGroup": "1973", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_72.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_72.json new file mode 100644 index 00000000..49bf1da5 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_72.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.016.0003.1-.2", + "numberOfObjects": "1", + "title": "Klaus Staeck is mein politischer Gegner", + "titleLanguage": "German", + "titleTranslation": "Klaus Staeck is My Political Opponent", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "4-1/8 x 5-7/8\"", + "dimension": "height; width", + "value": "4.125; 5.875", + "measurementUnit": "inches", + "objectProductionDateGroup": "1973", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_73.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_73.json new file mode 100644 index 00000000..bdc5de26 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_73.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.019.0149", + "numberOfObjects": "1", + "title": "La rivoluzione siamo Noi", + "titleLanguage": "Italian", + "titleTranslation": "We Are the Revolution", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "5-11/16 x 4\"", + "dimension": "height; width", + "value": "5.6875; 4", + "measurementUnit": "inches", + "objectProductionDateGroup": "1972", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_74.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_74.json new file mode 100644 index 00000000..2349ae66 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_74.json @@ -0,0 +1,17 @@ +{ + "objectNumber": "20CS.019.0150", + "numberOfObjects": "1", + "title": "Post Card", + "titleLanguage": "English", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "6-1/4 x 4\"", + "dimension": "height; width", + "value": "6.25; 4", + "measurementUnit": "inches", + "objectProductionDateGroup": "1970", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_75.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_75.json new file mode 100644 index 00000000..82a20a13 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_75.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.019.0155", + "numberOfObjects": "1", + "title": "Signatur 1956", + "titleLanguage": "German", + "titleTranslation": "Signature 1956", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "4-1/4 x 5-7/8\"", + "dimension": "height; width", + "value": "4.25; 5.875", + "measurementUnit": "inches", + "objectProductionDateGroup": "1973", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_76.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_76.json new file mode 100644 index 00000000..7dc0227f --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_76.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.019.0156", + "numberOfObjects": "1", + "title": "DDR-Tÿten", + "titleLanguage": "German", + "titleTranslation": "GDR Paper Bags", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "6-15/16 x 5\"", + "dimension": "height; width", + "value": "6.9375; 5", + "measurementUnit": "inches", + "objectProductionDateGroup": "1977-1980", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_77.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_77.json new file mode 100644 index 00000000..6c1ee5cb --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_77.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.017.0299", + "numberOfObjects": "1", + "title": "Filzwinkel", + "titleLanguage": "German", + "titleTranslation": "Felt Angle", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "14-1/16 x 4-1/8 x 3/8", + "dimension": "height; width; depth", + "value": "14.0625; 4.125; .375", + "measurementUnit": "inches", + "objectProductionDateGroup": "1985", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper bag" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_78.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_78.json new file mode 100644 index 00000000..c8fc26b5 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_78.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.002.0017", + "numberOfObjects": "1", + "title": "Grassello Ca(OH)2 + H2O", + "titleLanguage": "German", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "12-7/16 x 9-1/16 x 1/4\"", + "dimension": "height; width; depth", + "value": "12.4375; 9.0625; .25", + "measurementUnit": "inches", + "objectProductionDateGroup": "1979", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "felt" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_79.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_79.json new file mode 100644 index 00000000..fa15b3f7 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_79.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.024.0011a-b", + "numberOfObjects": "1", + "title": "New Beginnings Are in the Offing", + "titleLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "_x001D_27-1/16 X 21-1/16 X 1-1/2\"", + "dimension": "height; width; depth", + "value": "27.0625; 21.0625; 1.5", + "measurementUnit": "inches", + "objectProductionDateGroup": "1981", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithographs on paper, soft bound, ink stamp on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_8.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_8.json new file mode 100644 index 00000000..64aa0148 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_8.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0007", + "numberOfObjects": "1", + "title": "Fireworks", + "titleLanguage": "English", + "objectName": "painting", + "responsibleDepartment": "paintings-sculpture", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Sit amet mattis vulputate enim nulla aliquet porttitor lacus luctus accumsan tortor posuere ac ut.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "9 x 12", + "dimension": "height; width", + "value": "9; 12", + "measurementUnit": "inches", + "material": "acrylic paint; construction paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_80.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_80.json new file mode 100644 index 00000000..657c7eb5 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_80.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.024.0007a-b", + "numberOfObjects": "1", + "title": "Filz-TV", + "titleLanguage": "German", + "titleTranslation": "Felt TV", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "3-9/16 x 18-3/16 x 24\"", + "dimension": "height; width; depth", + "value": "3.5625; 18.1875; 24", + "measurementUnit": "inches", + "objectProductionDateGroup": "1970", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "offset lithograph on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_81.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_81.json new file mode 100644 index 00000000..79baa0c9 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_81.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.024.0008a-b", + "numberOfObjects": "1", + "title": "1a gebratene FischgrŠte", + "titleLanguage": "German", + "titleTranslation": "First-Class Fried Fish Bones", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "7-1/4 x 9-1/2 -1/2\" closed", + "dimension": "height; width; depth", + "value": "7.25; 9.5; .5", + "measurementUnit": "inches", + "objectProductionDateGroup": "1972", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "16 color photographs mounted on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_82.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_82.json new file mode 100644 index 00000000..e82f895f --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_82.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.024.0009a-b", + "numberOfObjects": "1", + "title": "aus Frammenti Veneziani", + "titleLanguage": "German", + "titleTranslation": "from Frammenti Veneziani", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "13-3/4 x 19-5/8\" each", + "dimension": "height; width", + "value": "13.75; 19.625", + "measurementUnit": "inches", + "objectProductionDateGroup": "1980", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "16 color photographs mounted on cardboard, cardboard box" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_83.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_83.json new file mode 100644 index 00000000..30977805 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_83.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.024.0012a-b", + "numberOfObjects": "1", + "title": "aus Frammenti Veneziani", + "titleLanguage": "German", + "titleTranslation": "from Frammenti Veneziani", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "13-3/4 x 19-5/8\"", + "dimension": "height; width", + "value": "13.75; 19.625", + "measurementUnit": "inches", + "objectProductionDateGroup": "1980", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "felt, pair of boxing gloves, 16mm film in metal container, blood sausage, ink stamps, oil paint" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_84.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_84.json new file mode 100644 index 00000000..97e8f33e --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_84.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.024.0014", + "numberOfObjects": "1", + "title": "aus Frammenti Veneziani", + "titleLanguage": "German", + "titleTranslation": "from Frammenti Veneziani", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "13-3/4 x 19-5/8\"", + "dimension": "height; width", + "value": "13.75; 19.625", + "measurementUnit": "inches", + "objectProductionDateGroup": "1980", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "paper bound offset book" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_85.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_85.json new file mode 100644 index 00000000..b772db4d --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_85.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.019.0154.1-.12", + "numberOfObjects": "1", + "title": "aus Frammenti Veneziani", + "titleLanguage": "German", + "titleTranslation": "from Frammenti Veneziani", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "13-3/4 x 19-5/8\"", + "dimension": "height; width", + "value": "13.75; 19.625", + "measurementUnit": "inches", + "objectProductionDateGroup": "1980", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "screenprint, graphite on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_86.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_86.json new file mode 100644 index 00000000..455f3183 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_86.json @@ -0,0 +1,18 @@ +{ + "objectNumber": "20CS.007.0125a-b", + "numberOfObjects": "1", + "title": "aus Frammenti Veneziani", + "titleLanguage": "German", + "titleTranslation": "from Frammenti Veneziani", + "titleTranslationLanguage": "English", + "recordStatus": "approved", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "13-3/4 x 19-5/8\"", + "dimension": "height; width", + "value": "13.75; 19.625", + "measurementUnit": "inches", + "objectProductionDateGroup": "1980", + "objectProductionPerson": "Joseph Beuys", + "objectProductionPersonRole": "artist", + "technique": "screenprint, graphite on paper" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_87.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_87.json new file mode 100644 index 00000000..943a4616 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_87.json @@ -0,0 +1,15 @@ +{ + "objectNumber": "20CS.218.0003", + "numberOfObjects": "1", + "objectName": "Drums", + "recordStatus": "approved", + "briefDescription": "Rectangular wooden frame covered both sides by rawhide decorated with painted black triangles around perimeter. Rawhide handles at each end.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "61 x 40", + "dimension": "length; width", + "value": "61; 40", + "measurementUnit": "cm", + "material": "rawhide; wood; paint", + "objectProductionPeople": "Tolowa", + "objectProductionPlace": "California" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_88.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_88.json new file mode 100644 index 00000000..8bff13dc --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_88.json @@ -0,0 +1,11 @@ +{ + "objectNumber": "20CS.118.0004", + "numberOfObjects": "1", + "objectName": "Gourd rattle", + "recordStatus": "approved", + "briefDescription": "Gourd rattle, globular; holes drilled in gourd in regular pattern", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "material": "gourd", + "objectProductionPeople": "American cultures", + "objectProductionPlace": "Lower Colorado River" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_89.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_89.json new file mode 100644 index 00000000..d5086ac1 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_89.json @@ -0,0 +1,14 @@ +{ + "objectNumber": "20CS.249.0090", + "numberOfObjects": "1", + "objectName": "Basket", + "recordStatus": "approved", + "briefDescription": "Globular, coiled, many cuts on rim, incurving rim.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "33.4 x 17", + "dimension": "diameter; height", + "value": "33.4; 17", + "measurementUnit": "cm", + "objectProductionPeople": "Tohono O'odham", + "objectProductionPlace": "Southwest" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_9.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_9.json new file mode 100644 index 00000000..d04b8555 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_9.json @@ -0,0 +1,22 @@ +{ + "objectNumber": "20CS.001.0008", + "numberOfObjects": "1", + "title": "Untitled (Watercolor II)", + "titleLanguage": "English", + "objectName": "painting", + "responsibleDepartment": "paintings-sculpture", + "collection": "permanent-collection", + "recordStatus": "approved", + "briefDescription": "Nisl suscipit adipiscing bibendum est ultricies integer quis auctor elit sed vulputate mi sit amet.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "measuredPart": "unframed", + "dimensionSummary": "9 x 12", + "dimension": "height; width", + "value": "9; 12", + "measurementUnit": "inches", + "material": "watercolor; paper", + "objectProductionDateGroup": "2015", + "objectProductionPerson": "Eleanor Brown", + "objectProductionPersonRole": "artist", + "objectProductionPlace": "Louisville, KY" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_90.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_90.json new file mode 100644 index 00000000..df8e0cf2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_90.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.120.0012", + "numberOfObjects": "1", + "objectName": "Vase", + "recordStatus": "approved", + "briefDescription": "Large double neck,\"wedding jar\". Black ware, polished, cracked in one area.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "31.5 x 36.5 x 73", + "dimension": "height; diameter; circumference", + "value": "31.5; 36.5; 73", + "measurementUnit": "cm", + "material": "clay", + "objectProductionPeople": "Tesuque", + "objectProductionPlace": "Tesuque", + "technique": "coiled; fired" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_91.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_91.json new file mode 100644 index 00000000..f3fcfa95 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_91.json @@ -0,0 +1,15 @@ +{ + "objectNumber": "20CS.209.0005a,b", + "numberOfObjects": "2", + "objectName": "Figurines", + "recordStatus": "approved", + "briefDescription": "Figurines. Clay figures of dogs with painted decorations in browns and dull red-brown on cream color background, unglazed. (a) dog sitting, H 8 cm; (b) dog standing,", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "8.9", + "dimension": "height", + "value": "8.9", + "measurementUnit": "cm", + "material": "clay; paint", + "objectProductionPeople": "American cultures", + "objectProductionPlace": "Guerrero state" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_92.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_92.json new file mode 100644 index 00000000..9735359b --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_92.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.316.0001", + "numberOfObjects": "1", + "objectName": "Mask", + "recordStatus": "approved", + "briefDescription": "mask; long necked mask w/ 2 human heads back to back, each w/ pair of horns above; heads are painted white w/ red and black features; reddish brown pigment between faces; 4 lacing holes in neck w/ plaited yellow raffia (?) through them; h. 41.1 cm.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "41.1", + "dimension": "height", + "value": "41.1", + "measurementUnit": "cm", + "material": "ox horn; wood; paint", + "objectProductionPeople": "African cultures", + "objectProductionPlace": "Nigeria", + "technique": "dyed; woven" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_93.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_93.json new file mode 100644 index 00000000..b9cd8483 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_93.json @@ -0,0 +1,15 @@ +{ + "objectNumber": "20CS.216.0002", + "numberOfObjects": "1", + "objectName": "Prayer wheel", + "recordStatus": "approved", + "briefDescription": "Tibetan prayer wheel; plain on the outside, but with a tightly wound scroll, carefully enclosed in a sewn cloth sheath, and fit precisely to the copper cylinder. It spins easily on an ingeniously crafted bearing made of carved wood and shell, and is able to facilitate millions of revolutions without breaking down or causing undue friction. A coil of mantras, often hundreds of thousands of mantras, printed from wood blocks on long scrolls, is within the copper cylinder.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "7 x 6.4 x 28.6", + "dimension": "length; width; height", + "value": "7; 6.4; 28.6", + "measurementUnit": "cm", + "material": "shell; cotton; wood; copper; iron; paper", + "objectProductionPlace": "Tibet", + "technique": "carved" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_94.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_94.json new file mode 100644 index 00000000..ad8a30e2 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_94.json @@ -0,0 +1,15 @@ +{ + "objectNumber": "20CS.116.0003", + "numberOfObjects": "1", + "objectName": "Sheath", + "recordStatus": "approved", + "briefDescription": "sheath, knife, leather; made for curved cutting edge blade; leather backing; outer side decorated with proliferation of polychrome seed beads, forming geometric designs and two abstract human faces in low relief; leather thong at proximal end of sheath", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "48.5 x 8", + "dimension": "length; width", + "value": "48.5; 8", + "measurementUnit": "cm", + "material": "leather and fur; seeds", + "objectProductionPeople": "Yoruba", + "objectProductionPlace": "Nigeria" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_95.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_95.json new file mode 100644 index 00000000..3d6cc997 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_95.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.219.0149", + "numberOfObjects": "1", + "objectName": "Cradle board", + "recordStatus": "approved", + "briefDescription": "Hualapai toy cradle board. Broad is of willow sticks attached to an oval frame with a full hoop head shade, decorated with red and white cotton strips and blue and white strings of beads. Sides and shade have red cotton winding and straps are red, white & blue braided yarn.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "7.75", + "dimension": "length", + "value": "7.75", + "measurementUnit": "cm", + "material": "cotton; willow", + "objectProductionPeople": "Walapai", + "objectProductionPlace": "Arizona", + "technique": "braided" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_96.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_96.json new file mode 100644 index 00000000..5231f551 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_96.json @@ -0,0 +1,11 @@ +{ + "objectNumber": "20CS.219.0150", + "numberOfObjects": "1", + "objectName": "Food and drinks", + "recordStatus": "approved", + "briefDescription": "String of wild turnips; braided.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "objectProductionPeople": "Omaha", + "objectProductionPlace": "United States", + "technique": "braided" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_97.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_97.json new file mode 100644 index 00000000..9e0721b1 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_97.json @@ -0,0 +1,10 @@ +{ + "objectNumber": "20CS.319.0155", + "numberOfObjects": "1", + "objectName": "Vessels", + "recordStatus": "approved", + "briefDescription": "Ceramic bird vessel", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "objectProductionPeople": "American cultures", + "objectProductionPlace": "Puebla state" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_98.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_98.json new file mode 100644 index 00000000..3cc2424a --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_98.json @@ -0,0 +1,16 @@ +{ + "objectNumber": "20CS.219.0156", + "numberOfObjects": "1", + "objectName": "Doll", + "recordStatus": "approved", + "briefDescription": "Comanche man doll. Cloth doll with embroidered features, black coarse thread hair in two braids. Dressed in white buckskin mocassins with silver button trim; heavily fringed and lightly beaded leggings; red felt breechclout; white buckskin shirt witha bit of beading; two stands of red beads around shoulders.", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "dimensionSummary": "11.25", + "dimension": "height", + "value": "11.25", + "measurementUnit": "cm", + "material": "deerskin; silver; textile", + "objectProductionPeople": "Comanche", + "objectProductionPlace": "The Americas", + "technique": "beaded; embroidered" +} \ No newline at end of file diff --git a/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_99.json b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_99.json new file mode 100644 index 00000000..a0320d37 --- /dev/null +++ b/utils/benchmarking/fixtures/core_collectionobject/data_hashes/core_collectionobjects_99.json @@ -0,0 +1,11 @@ +{ + "objectNumber": "20CS.117.0299", + "numberOfObjects": "1", + "objectName": "Whistle", + "recordStatus": "approved", + "briefDescription": "Ceramic whistle", + "comment": "This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.", + "material": "ceramic", + "objectProductionPeople": "Maya civilization", + "objectProductionPlace": "Campeche state" +} \ No newline at end of file diff --git a/utils/benchmarking/handler_with_cache.rb b/utils/benchmarking/handler_with_cache.rb new file mode 100644 index 00000000..f7b3d0b1 --- /dev/null +++ b/utils/benchmarking/handler_with_cache.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +require 'bundler/setup' +require 'time_up' +require 'pry' + +require 'collectionspace/mapper' +require 'facets/array/before' +require_relative '../../spec/helpers' + +config = {delimiter: ';'} +mapper_path = File.join('..', '..', 'spec', 'fixtures', 'benchmarking', 'core_collectionobject', 'core_6-1-0_collectionobject.json') +rec_mapper = Helpers.get_json_record_mapper(mapper_path) +client = Helpers.core_client + +cache_config = { + domain: 'core.collectionspace.org', + search_enabled: false, + search_identifiers: false +} + +cache = CollectionSpace::RefCache.new(config: cache_config, client: client) +popcache = CollectionSpace::RefCache.new(config: cache_config, client: client) +Helpers.populate_core(popcache) + + +def handler_reusing_cache(mapper, cache, client, config) + TimeUp.start(:hdlr_chc_reuse) do + h = handler(mapper, cache, client, config) + c = h.mapper.termcache + end +end + +def handler_reusing_popcache(mapper, cache, client, config) + TimeUp.start(:hdlr_popchc_reuse) do + h = handler(mapper, cache, client, config) + c = h.mapper.termcache + end +end + +def handler_new_cache(mapper, client, config) + TimeUp.start(:hdlr_chc_new) do + h = handler(mapper, nil, client, config) + c = h.mapper.termcache + end +end + +def handler(mapper, cache, client, config) + CS::Mapper::DataHandler.new(record_mapper: mapper, cache: cache, client: client, config: config) +end + +50.times do + handler_reusing_popcache(rec_mapper, popcache, client, config) + handler_new_cache(rec_mapper, client, config) + handler_reusing_cache(rec_mapper, cache, client, config) +end + +TimeUp.print_detailed_summary diff --git a/utils/core_collectionobjects.csv b/utils/core_collectionobjects.csv new file mode 100644 index 00000000..b66d1309 --- /dev/null +++ b/utils/core_collectionobjects.csv @@ -0,0 +1,102 @@ +"objectNumber","numberOfObjects","numberValue","numberType","title","titleLanguage","titleType","titleTranslation","titleTranslationLanguage","publishTo","inventoryStatus","objectName","objectNameCurrency","objectNameLevel","objectNameSystem","objectNameType","objectNameLanguage","objectNameNote","responsibleDepartment","collection","recordStatus","briefDescription","distinguishingFeatures","comment","measuredPart","dimensionSummary","dimension","measuredByPersonLocal","measuredByOrganizationLocal","measurementMethod","value","measurementUnit","valueQualifier","valueDate","contentPersonPersonLocal","contentPeople","contentPlace","contentScript","contentOrganizationOrganizationLocal","contentEventName","contentEventNameType","contentOther","contentOtherType","contentDescription","contentLanguage","contentActivity","contentConceptConceptAssociated","contentConceptConceptMaterial","contentDateGroup","contentPosition","contentObject","contentObjectType","contentNote","copyNumber","editionNumber","ageQualifier","age","ageUnit","form","inscriptionContent","inscriptionContentInscriberPersonLocal","inscriptionContentInscriberOrganizationLocal","inscriptionContentLanguage","inscriptionContentDateGroup","inscriptionContentPosition","inscriptionContentScript","inscriptionContentType","inscriptionContentMethod","inscriptionContentInterpretation","inscriptionContentTranslation","inscriptionContentTransliteration","inscriptionDescription","inscriptionDescriptionInscriberPersonLocal","inscriptionDescriptionInscriberOrganizationLocal","inscriptionDescriptionDateGroup","inscriptionDescriptionPosition","inscriptionDescriptionType","inscriptionDescriptionMethod","inscriptionDescriptionInterpretation","material","materialComponent","materialComponentNote","materialName","materialSource","physicalDescription","objectStatus","phase","sex","style","color","technicalAttribute","technicalAttributeMeasurement","technicalAttributeMeasurementUnit","objectComponentName","objectComponentInformation","objectProductionDateGroup","objectProductionOrganization","objectProductionOrganizationRole","objectProductionPeople","objectProductionPeopleRole","objectProductionPerson","objectProductionPersonRole","objectProductionPlace","objectProductionPlaceRole","objectProductionReason","objectProductionNote","assocActivity","assocActivityType","assocActivityNote","assocObject","assocObjectNote","assocObjectType","assocConcept","assocConceptNote","assocConceptType","assocCulturalContext","assocCulturalContextType","assocCulturalContextNote","assocOrganization","assocOrganizationType","assocOrganizationNote","assocPeople","assocPeopleNote","assocPeopleType","assocPerson","assocPersonType","assocPersonNote","assocPlace","assocPlaceType","assocPlaceNote","assocEventName","assocEventNameType","assocEventOrganization","assocEventPeople","assocEventPerson","assocEventPlace","assocEventNote","assocStructuredDateGroup","assocDateType","assocDateNote","objectHistoryNote","usage","usageNote","ownerPersonLocal","ownerOrganizationLocal","ownershipAccess","ownershipCategory","ownershipPlace","ownershipDateGroup","ownershipExchangeMethod","ownershipExchangeNote","ownershipExchangePriceCurrency","ownershipExchangePriceValue","ownersPersonalExperience","ownersPersonalResponse","ownersReference","ownersContributionNote","viewersRole","viewersPersonalExperience","viewersPersonalResponse","viewersReference","viewersContributionNote","referenceCitationLocal","referenceNote","fieldCollectionDateGroup","fieldCollectionMethod","fieldCollectionPlacePlaceLocal","fieldCollectionSource","fieldCollectorPersonLocal","fieldCollectorOrganizationLocal","fieldCollectionNumber","technique","techniqueType","fieldColEventName","fieldCollectionNote","fieldCollectionFeature" +"20CS.001.0001",1,"123456;98765","lender;obsolete","A Man; A Woman","English; English","collection;generic","Un Homme^^Hombre; Une Femme^^Fraulein","French^^Spanish; French^^German","omeka;DPLA","accessioned;destroyed","drawing; Sheet music","current;archaic","group;subgroup","art-and-architecture-thesaurus; nomenclature","classified;taxonomic","Arabic;English","Object Name Note text 1;Object Name Note text 2","prints-drawings;decorative-arts","permanent-collection","approved","Ut consequat semper viverra nam libero justo laoreet sit amet cursus sit amet dictum sit.;Gravida cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus mauris vitae.","Distinguishing features Text","This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.; This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed;framed","8.5 x 11;11 x 8.5 x .5","height^^width;height^^width^^depth","Patricia Johnson^^Eleanor Brown;Patricia Johnson^^Eleanor Brown",,"sliding_calipers^^measuring_tape_cloth;spreading_calipers^^microscopy_reticule^^ruler","8.5^^11;11^^8.5^^0.5","inches^^inches;inches^^inches^^meters","Qualifier Text 1^^Qualifier Text 2;Qualifier Text 1^^Qualifier Text 2^^Qualifier Text 3","2000/02/02^^2000/02/03;2000/02/04^^2000/02/05^^2000/02/06","Inoke Aloha;Eleanor Brown","Content People Text 1;Content People Text 2","Content Place Text 1;Content Place Text 2","gothic-script;palmer-method","Sample Organization; Sample Organization 2","Sample Event 1; Sample Event 2","Sample Event type 1; Sample Event type 2","Other Name Text 1; Other Name Text 2","Other Type 1; Other Type 2","Content Description Sample Text.","Arabic;Chinese","Content Activity Text 1; Content Activity Text 2","Sample Associated Concept","Sample Material Concept","2015/05/11","back;bottom","Content Object name text 1; Content Object name text 2","furniture;food","Content Note Text","One","Two","older than",21,"months","dry;thin-section","Inscription content Text 1;Inscription content Text 2","Patricia Johnson",";Inscriber Org","Arabic;Armenian","2003;2004","front;outside","palmer-method;rustic-capitals","brand;decoration","incised;Inscription content Method 2","Interpretation Text 1;Interpretation Text 2","Inscription content Translation 1;Inscription content Translation 2","Inscription content Transliteration 1;Inscription content Transliteration 2","Inscription description 1;Inscription description 2","Non Textual Inscriber Person","Non Textual Inscriber Organization","2001;2002","verso;base","estate-stamp;maker's-mark","Non Textual Inscription Method 1;Non Textual Inscription Method 2","Non Textual Inscription Interpretation 1;Non Textual Inscription Interpretation 2","marker; paper","Material component text 1;Material component text 2","Material Component Note 1;Material Component Note 2","Material Name 1;Material Name 2","Material Source 1;Material Source 2","Physical Description Text","copy;forgery","adult","male","fauve;style text","red;blue","record-speed;magnetic-tape-type","metal;78","rpm;rpm","blade;handle","Object Information Component Information Text 1;Object Information Component Information Text 2","2015;2016","Admiral Corporation;Berkley Publising Group","distributor;publisher","Sample Culture; Sample Culture 2","Production people role text.;Production people role text2","Eleanor Brown;Richard J. Anobile","artist;author","Louisville, KY;Production Place 2","Production Place Role Text 1; Production Place Role Text 2","Production Reason 1;Production Reason 2","Production note text.","Associated activity 1;Associated activity 2","Associated activity Type 1; Associated activity Type 2","Associated activity Note 1; Associated activity Note 2","Associated object 1; Associated object 2","Associated object Note 1; Associated object Note 2","Associated object Type 1; Associated object Type 2","Associated concept 1; Associated concept 2","Associated concept Note 1;Associated concept Note 2","Associated concept Type 1;Associated concept Type 2","Associated cultural affinity 1;Associated cultural affinity 2","Associated cultural affinity Type 1;Associated cultural affinity Type 2","Associated cultural affinity Note 1;Associated cultural affinity Note 2","Associated organization 1;Associated organization 2","Associated organization Type 1;Associated organization Type 2","Associated organization Note 1;Associated organization Note 2","Native American;American","Associated people Note 1;Associated people Note 2","assocPeopleTypeOne;assocPeopleTypetwo","Associated person 1;Associated person 2","Associated person type 1;Associated person type 2","Associated person Note 1;Associated person Note 2","Associated place 1;Associated place 2","Associated place Type 1;Associated place Type 2","Associated place Note 1;Associated place Note 2","Associated event Text","Associated event Type Text","Associated event organization 1;Associated event organization 2","Associated event people text 1;Associated event people text 2","Associated event person 1;Associated event person 2","Associated event place Text 1;Associated event place Text 2","Associated event note Text","2000;2001","Associated date Type 1;Associated date Type 2","Associated date Note 1;Associated date Note 2","Object History Note Text.","Usage 1; Usage 2","Usage Note Text 1; Usage Note Text 2","Owner Person 1","Owner Organization 1","limited","company","Ownership Place Text","2015;2016","exchange","Ownership Exchange Note Text","Canadian Dollar",145,"Owner's personal experience Text.","Owner's personal response Text.","Owner's reference Text 1;Owner's reference Text 2","Owner's contribution note Text.","Viewer's role Text","Viewer's personal experience Text","Viewer's personal response Text","Viewer's reference Text 1;Viewer's reference Text 2","Viewer's contribution note","Reference Infor Text 1;Reference Infor Text 2","Reference Infor Note 1; Reference Infor Note 2",2002,"commissioned;excavation","Field collection place Text","Field collection source 1;Field collection source 2","Field collector Person","Field collector Organization","Field collection number Text","pen and ink;lithography","Technique Type Text 1;Technique Type Text 2","Kindergarten;Field collection event name Text 2","Field collection note text.","Field collection feature text." +"20CS.001.0002",1,,,"Rainbow","English",,,,,,"drawing",,,,,,,"prints-drawings","permanent-collection","approved","Sed cras ornare arcu dui vivamus arcu felis bibendum ut tristique et egestas quis ipsum.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","8.5 x 11","height; width",,"Admiral Corporation",,"8.5; 11","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"marker; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0003",1,,,"Cloudy Day","English",,,,,,"drawing",,,,,,,"prints-drawings","permanent-collection","approved","Integer eget aliquet nibh praesent tristique magna sit amet purus gravida quis blandit turpis cursus.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","8.5 x 11","height; width",,,,"8.5; 11","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"marker; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0004",1,,,"Dots Dots Dots","English",,,,,,"drawing",,,,,,,"prints-drawings","permanent-collection","approved","Morbi tincidunt augue interdum velit euismod in pellentesque massa placerat duis ultricies lacus sed turpis.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","8.5 x 11","height; width",,,,"8.5; 11","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"marker; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0005",1,,,"Untitled (Watercolor I)","English",,,,,,"painting",,,,,,,"paintings-sculpture","permanent-collection","approved","Vestibulum lorem sed risus ultricies tristique nulla aliquet enim tortor at auctor urna nunc id.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","8.75 x 12","height; width",,,,"8.75; 12","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"watercolor; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0006",1,,,"Garden","English",,,,,,"painting",,,,,,,"paintings-sculpture","permanent-collection","approved","Gravida cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus mauris vitae.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","9 x 12","height; width",,,,"9; 12","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"acrylic paint; construction paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0007",1,,,"Fireworks","English",,,,,,"painting",,,,,,,"paintings-sculpture","permanent-collection","approved","Sit amet mattis vulputate enim nulla aliquet porttitor lacus luctus accumsan tortor posuere ac ut.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","9 x 12","height; width",,,,"9; 12","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"acrylic paint; construction paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0008",1,,,"Untitled (Watercolor II)","English",,,,,,"painting",,,,,,,"paintings-sculpture","permanent-collection","approved","Nisl suscipit adipiscing bibendum est ultricies integer quis auctor elit sed vulputate mi sit amet.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","9 x 12","height; width",,,,"9; 12","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"watercolor; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0009",1,,,"Cyclone","English",,,,,,"drawing",,,,,,,"prints-drawings","permanent-collection","approved","Eget nulla facilisi etiam dignissim diam quis enim lobortis scelerisque fermentum dui faucibus in ornare.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","8.5 x 11","height; width",,,,"8.5; 11","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"marker; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.001.0010",1,,,"Blue Monday","English",,,,,,"drawing",,,,,,,"prints-drawings","permanent-collection","approved","Non quam lacus suspendisse faucibus interdum posuere lorem ipsum dolor sit amet consectetur adipiscing elit.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","8.5 x 11","height; width",,,,"8.5; 11","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"marker; paper",,,,,,,,,,,,,,,,2015,,,,,"Eleanor Brown","artist","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.018.1395",1,,,"Souvenir books. The Wiz Scrapbook.","English",,,,,,"Souvenir books",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","11 x 8.5 x .5","height; width; depth",,,,"11; 8.5; .5","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1978,"Berkley Publising Group","publisher",,,"Richard J. Anobile","author","Louisville, KY",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.008.0033a-d",1,,,"Window cards. Applause.","English",,,,,,"Window cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","22 x 14","height; width",,,,"22; 14","inches",,,"Helen Morgan",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1930,"Paramount-Famous Lasky Corporation","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"lithography",,,, +"20CS.075.0084-.0094",1,,,"Souvenir books. The Big Broadcast.","English",,,,,,"Souvenir books",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","9 x 6","height; width",,,,"9; 6","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1932,"Paramount Publix Corporation","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.075.0085",1,,,"Campaign books. The New Show World 1929-1930.","English",,,,,,"Campaign books",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12.5 x 9.75","height; width",,,,"12.5; 9.75","inches",,,"Clara Bow; Harold Lloyd",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1929,"Paramount-Famous Lasky Corporation","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.034.0001",1,,,"Jackets. Monsieur Beaucaire.","English",,,,,,"Jackets",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"textile",,,,,,,,,,,,,,,,1924,,,,,"Georges Barbier","designer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.107.0001",1,,,"Sheet music. You Brought a New Kind of Love to Me.","English",,,,,,"Sheet music",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1930,"Famous Music Corporation","publisher",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.067.0001a",1,,,"Souvenir books. The Smiling Lieutenant.","English",,,,,,"Souvenir books",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12 x 8","height; width",,,,"12; 8","inches",,,"Maurice Chevalier",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1931,"Paramount Publix Corporation","licensor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.008.0006a-f",1,,,"Sheet music. Do Something.","English",,,,,,"Sheet music",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12 x 9","height; width",,,,"12; 9","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1929,,,,,"Bud Green","author",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.017.0004",1,,,"Sheet music. What Do You Do Sunday, Mary?","English",,,,,,"Sheet music",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12 x 9","height; width",,,,"12; 9","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1923,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.031.0001",1,,,"Sheet music. I'm Getting So Now I Don't Care.","English",,,,,,"Sheet music",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12 x 9","height; width",,,,"12; 9","inches",,,"Rudolph Valentino",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1924,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.003.0006",1,,,"Sheet music. Alone.","English",,,,,,"Sheet music",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12 x 9","height; width",,,,"12; 9","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1935,"Robbins Music Corporation","publisher",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.038.0009",1,,,"Sheet music. Please.","English",,,,,,"Sheet music",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","12 x 9","height; width",,,,"12; 9","inches",,,"Bing Crosby",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1932,"Famous Music Corporation","publisher",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.075.0360a-e",1,,,"Window cards. Fast and Loose.","English",,,,,,"Window cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","22 x 14","height; width",,,,"22; 14","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1930,"Paramount-Famous Lasky Corporation",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.054.0056",1,,,"Playsets. Admiral Television Studio.","English",,,,,,"Playsets",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","16.5 x 15.25","height; width",,,,"16.5; 15.25","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"plastic",,,,,,,,,,,,,,,,1953,"Admiral Corporation","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.080a-d",1,,,"Lobby cards. Zaza.","English",,,,,,"Lobby cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","11 x 14","height; width",,,,"11; 14","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1923,"Paramount Pictures","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.064.0068g",1,,,"Lobby cards. Her Love Story.","English",,,,,,"Lobby cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","11 x 14","height; width",,,,"11; 14","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1924,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.024.0027",1,,,"Lobby cards. A Sainted Devil.","English",,,,,,"Lobby cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","11 x 14","height; width",,,,"11; 14","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1924,"Paramount Pictures","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.273",1,,,"Lobby cards. The Potters.","English",,,,,,"Lobby cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","11 x 14","height; width",,,,"11; 14","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1927,"Paramount Pictures","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.021.0171",1,,,"Lobby cards. The Crowded Hour.","English",,,,,,"Lobby cards",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.","unframed","11 x 14","height; width",,,,"11; 14","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper",,,,,,,,,,,,,,,,1925,"Paramount Pictures","distributor",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.002.0031",1,,,"Dresses. Orphans of the Storm.","English",,,,,,"Dresses",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"61 x 22.5","height; width",,,,"61; 22.5","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"textile",,,,,,,,,,,,,,,,1921,,,,,"Herman Patrick Tappe","designer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.096.0018",1,,,"Dresses. When Knighthood Was in Flower.","English",,,,,,"Dresses",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"Size 8",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"fur; textile",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.096.0032",1,,,"Capes. A Kiss for Cinderella.","English",,,,,,"Capes",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"Men's 38",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"textile",,,,,,,,,,,,,,,,1925,"Eaves Costume Company","manufacturer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.096.0044",1,,,"Jackets. The Scarlet Letter.","English",,,,,,"Jackets",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"textile",,,,,,,,,,,,,,,,1926,"Eaves Costume Company","manufacturer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.096.0056",1,,,"Coats. A Kiss For Cinderella.","English",,,,,,"Coats",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"textile",,,,,,,,,,,,,,,,1925,"Eaves Costume Company","manufacturer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.040.0013",1,,,"Coats. Little Old New York.","English",,,,,,"Coats",,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"Men's 38",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"textile",,,,,,,,,,,,,,,,1923,"Eaves Costume Company","manufacturer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.049.0008",1,,,"Rampe","Danish",,"Ramp","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"315 x 980 x 150","height; width; depth",,,,"315; 980; 150","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"plaster; glass",,,,,,,,,,,,,,,,1973,,,,,"Nørgaard, Bjørn","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.019.0160",1,,,"Gipsobjekt","Danish",,"Plaster Object","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"220 x 315 x 225","height; width; depth",,,,"220; 315; 225","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"plaster; wood; wire",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.037.0001",1,,,"I de dage Paven kom til Damaskus","Danish",,"In those Days the Pope Came to Damascus","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"668 x 670 x 15","height; width; depth",,,,"668; 670; 15","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"color intaglio",,,,,,,,,,,,,,,,2002,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.004.0005-.0007",1,,,"Skitseblad med udkast til ""Glasmodeller"" m.m.","Danish",,"Sketch sheet with draft ""Glass Models"" etc.","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"245 x 338","height; width",,,,"245; 338","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pen; black marker pen; blue pen",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.004.0008",1,,,"Skitseblad med skitser af ""Overhældninger med gibs""","Danish",,"Sketch sheet with sketches of ""Over Slopes with plaster""","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"101 x 145","height; width",,,,"101; 145","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.003.0131",1,,,"Notatark til Ta's skulpturfestival, Galleri 101, St. Kongengsgade, september","Danish",,"Notepads to Ta's sculpture festival, Gallery 101, St. Kongengsgade, September","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"245 x 171","height; width",,,,"245; 171","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"On the back of the fragment of printed regnskabsark from Danish mortgages",,,, +"20CS.003.0132",1,,,"Skitseblad med plan over Bjørn Nørgaards bidrag til Ta's skulpturfestival, september","Danish",,"Sketch sheet with the level of Bjørn Nørgaard's contribution to Ta's sculpture festival in September","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"174 x 146","height; width",,,,"174; 146","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"On the back of the fragment of printed regnskabsark from Danish mortgages",,,, +"20CS.003.0261",1,,,"Skitseblad med udkast til skulpturelle objekter; ikke udførte","Danish",,"Sketch sheet with draft sculptural objects; not performed","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"218 x 341","height; width",,,,"218; 341","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1982,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.003.0267",1,,,"Skitseblad med udkast til opstilling af standere og objekter på en udstilling på Vrå højskole","Danish",,"Sketch sheet with draft layout of the stands and objects on an exhibition at Vraa School","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"175 x 245","height; width",,,,"175; 245","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue-black pen",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.024.0010a-b",1,,,"Skitsebogsblad","Danish",,"Sketch Book Magazine","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"125 x 200","height; width",,,,"125; 200","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.024.0013a-b",1,,,"Skitseblad med selvportræt, bivouak og skulpturelle objekter","Danish",,"Sketch sheet with self-portrait, bivouak and sculptural objects","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"295 x 209","height; width",,,,"295; 209","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pen; ink",,,,,,,,,,,,,,,,1967,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Drawn on the back of duplicated typewritten flyer from ""Anti Drug League / March 1968 "" entitled ""Youth destruction""",,,, +"20CS.021.0183a",1,,,"Skitseblad med to udkast til gips- og trådmonument","Danish",,"Sketch sheet with two draft plaster and wire monument","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"248 x 172","height; width",,,,"248; 172","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1968,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Sign on the back of the fragment of regnskabsark for Danish mortgages",,,, +"20CS.024.1135",1,,,"Forlæg for to billeder til politikens tegneserie ""Livet i skovene""","Danish",,"Model of two images of the policy cartoon ""Life in the Woods""","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"160 x 190","height; width",,,,"160; 190","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pen; ink; blue ink",,,,,,,,,,,,,,,,1968,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Two images pasted on underlying leaf",,,, +"20CS.024.1136",1,,,"Forlæg for plakaten ""Øst vest hjemme bedst"", U-2 Festival, Det ny samfund i Hithouse, Kbh. 9.-10.11 1969","Danish",,"Model for the poster ""East west home is best"" U-2 Festival, the new community in Hithouse, Copenhagen. 9. - 10.11 1969","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"315 x 233","height; width",,,,"315; 233","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen; pen; ink",,,,,,,,,,,,,,,,1969,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pen and ink on magazine photo",,,, +"20CS.096.0081",1,,,"Skitseblad","Danish",,"Sketch Sheet","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"198 x 265","height; width",,,,"198; 265","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen",,,,,,,,,,,,,,,,1969,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.049.0127",1,,,"Bedstemors død","Danish",,"Grandmothers death","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"149 x 224","height; width",,,,"149; 224","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"coal; water",,,,,,,,,,,,,,,,1978,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.005.0426",1,,,"Bedstemors død","Danish",,"Grandmothers death","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"149 x 225","height; width",,,,"149; 225","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1978,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.011.0006",1,,,"Skitseblad med udkast til Ikastmonumentet også kaldet ""Kæmpehøj I""","Danish",,"Sketch sheet with draft Ikast Monument also called ""Barrow In""","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,"height; width",,,,,"cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1973,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.025.0012",1,,,"Arbejdstegning til skulpturen ""Obelisk""","Danish",,"Working Drawing for sculpture ""Obelisk""","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"420 x 297","height; width",,,,"420; 297","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"blue pen; squared paper",,,,,,,,,,,,,,,,1978,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.007.0003",1,,,"Skitse efter nereiderne i Rubens Maleri ""Maria af Medici går i land i Marseille"" Louvre","Danish",,"Sketch by Nereids in Rubens Painting ""Maria de Medici go ashore in Marseille,"" Louvre","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"194 x 310","height; width",,,,"194; 310","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1979,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.021.0016",1,,,"Skitse efter maleriet ""Bacchus og Adriadne""","Danish",,"Sketch for the painting ""Bacchus and Adriadne""","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"194 x 310","height; width",,,,"194; 310","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1979,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.002.0062",1,,,"Udkast til tagfigurerne på Gladsaxe Hovedbibliotek","Danish",,"Draft tagfigurerne at Gladsaxe Main Library","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"420 x 591","height; width",,,,"420; 591","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil; blue water color",,,,,,,,,,,,,,,,1979,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.064.0083.1-.2",1,,,"Skitseblad med udkast til tegneserien til Hvedekorn 3, 1966","Danish",,"Sketch sheet with draft comic to Hvedekorn 3, 1966","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"341 x 440","height; width",,,,"341; 440","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1965,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.021.0152",1,,,"Skitseblad med udkast til tegneserien til Hvedekorn 3, 1966","Danish",,"Sketch sheet with draft comic to Hvedekorn 3, 1966","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"341 x 440","height; width",,,,"341; 440","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pencil",,,,,,,,,,,,,,,,1965,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.068.0332",1,,,"Lene Adler Petersen som Den kvindelige Kristus","Danish",,"Lene Adler Petersen as the female Christ","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"505 x 300","height; width",,,,"505; 300","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"brush; black color",,,,,,,,,,,,,,,,1969,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"9 photos from the movie "" The green dress."" The photographs are pasted edge at the edge of a sheet that is shorter and wider than the overall picture.",,,, +"20CS.063.0138",1,,,"Intuition","German",,"Intuition","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"12 x 8-3/8 x 3-3/8""","height; width; depth",,,,"12; 8.375; 3.375","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1968,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"wood, graphite",,,, +"20CS.018.0001",1,,,"Filzanzug","German",,"Felt Suit","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1970,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"sewn felt, ink stamp",,,, +"20CS.018.0002",1,,,"Sonnenscheibe","German",,"Sun Disc","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1973,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"nickel-plated copper record master-mold, felt, oil paint, cardboard, offset lithograph on paper",,,, +"20CS.018.0003a-b",1,,,"Celtic +","English",,,,,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"6-3/4 x 20-1/2 x 4-1/2""","height; width; depth",,,,"6.75; 20.5; 4.5","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1971,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"linen covered cardboard box, cotton straps, metal, glass, cork, beeswax, gelatin, Super 8mm film, two wooden push pins, foam core board, black-and-white photographs",,,, +"20CS.018.0004",1,,,"3-Tonnen-Edition","German",,"3 Ton Edition","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"18-1/8 x 17-5/8""","height; width",,,,"18.125; 17.625","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1973,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paint, ink, typeset printing, vinyl sheets screenprinted on both sides",,,, +"20CS.049.0090a-b",1,,,"Schwefel Ÿberzogene Zinkkiste (tamponierte Ecke)","German",,"Sulphur-Covered Zinc Box [Plugged Corner]","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1970,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"sheet zinc, sulphur, gauze, ink stamp",,,, +"20CS.020.0012",1,,,": Quanten","German",,":Quanta","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"13-1/2 x 10"" each sheet","height; width",,,,"13.5; 10","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1982,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"two screenprints on paper",,,, +"20CS.009.0005-.0012",1,,,"Eurasienstab Ÿber den Alpen","German",,"Eurasian Staff over the Alps","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"4-1/8 x 5-3/4""","height; width",,,,"4.125; 5.75","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1971,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.016.0001",1,,,"Heidelberg","German",,"Heidelberg","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"4-1/8 x 5-3/4""","height; width",,,,"4.125; 5.75","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1970,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph, ink stamp on paper",,,, +"20CS.016.0002.1-.2",1,,,"jeder Griff mu§ sitzen","German",,"Every Move Has to Be","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"4 x 5-7/8""","height; width",,,,"4; 5.875","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1973,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.016.0003.1-.2",1,,,"Klaus Staeck is mein politischer Gegner","German",,"Klaus Staeck is My Political Opponent","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"4-1/8 x 5-7/8""","height; width",,,,"4.125; 5.875","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1973,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.019.0149",1,,,"La rivoluzione siamo Noi","Italian",,"We Are the Revolution","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"5-11/16 x 4""","height; width",,,,"5.6875; 4","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1972,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.019.0150",1,,,"Post Card","English",,,"English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"6-1/4 x 4""","height; width",,,,"6.25; 4","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1970,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.019.0155",1,,,"Signatur 1956","German",,"Signature 1956","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"4-1/4 x 5-7/8""","height; width",,,,"4.25; 5.875","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1973,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.019.0156",1,,,"DDR-Tÿten","German",,"GDR Paper Bags","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"6-15/16 x 5""","height; width",,,,"6.9375; 5","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"1977-1980",,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.017.0299",1,,,"Filzwinkel","German",,"Felt Angle","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"14-1/16 x 4-1/8 x 3/8","height; width; depth",,,,"14.0625; 4.125; .375","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1985,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper bag",,,, +"20CS.002.0017",1,,,"Grassello Ca(OH)2 + H2O","German",,,,,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"12-7/16 x 9-1/16 x 1/4""","height; width; depth",,,,"12.4375; 9.0625; .25","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1979,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"felt",,,, +"20CS.024.0011a-b",1,,,"New Beginnings Are in the Offing","English",,,,,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"_x001D_27-1/16 X 21-1/16 X 1-1/2""","height; width; depth",,,,"27.0625; 21.0625; 1.5","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1981,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithographs on paper, soft bound, ink stamp on paper",,,, +"20CS.024.0007a-b",1,,,"Filz-TV","German",,"Felt TV","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"3-9/16 x 18-3/16 x 24""","height; width; depth",,,,"3.5625; 18.1875; 24","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1970,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"offset lithograph on paper",,,, +"20CS.024.0008a-b",1,,,"1a gebratene FischgrŠte","German",,"First-Class Fried Fish Bones","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"7-1/4 x 9-1/2 -1/2"" closed","height; width; depth",,,,"7.25; 9.5; .5","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1972,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"16 color photographs mounted on paper",,,, +"20CS.024.0009a-b",1,,,"aus Frammenti Veneziani","German",,"from Frammenti Veneziani","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"13-3/4 x 19-5/8"" each","height; width",,,,"13.75; 19.625","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1980,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"16 color photographs mounted on cardboard, cardboard box",,,, +"20CS.024.0012a-b",1,,,"aus Frammenti Veneziani","German",,"from Frammenti Veneziani","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"13-3/4 x 19-5/8""","height; width",,,,"13.75; 19.625","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1980,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"felt, pair of boxing gloves, 16mm film in metal container, blood sausage, ink stamps, oil paint",,,, +"20CS.024.0014",1,,,"aus Frammenti Veneziani","German",,"from Frammenti Veneziani","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"13-3/4 x 19-5/8""","height; width",,,,"13.75; 19.625","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1980,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"paper bound offset book",,,, +"20CS.019.0154.1-.12",1,,,"aus Frammenti Veneziani","German",,"from Frammenti Veneziani","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"13-3/4 x 19-5/8""","height; width",,,,"13.75; 19.625","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1980,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"screenprint, graphite on paper",,,, +"20CS.007.0125a-b",1,,,"aus Frammenti Veneziani","German",,"from Frammenti Veneziani","English",,,,,,,,,,,,"approved",,,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"13-3/4 x 19-5/8""","height; width",,,,"13.75; 19.625","inches",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1980,,,,,"Joseph Beuys","artist",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"screenprint, graphite on paper",,,, +"20CS.218.0003",1,,,,,,,,,,"Drums",,,,,,,,,"approved","Rectangular wooden frame covered both sides by rawhide decorated with painted black triangles around perimeter. Rawhide handles at each end.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"61 x 40","length; width",,,,"61; 40","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"rawhide; wood; paint",,,,,,,,,,,,,,,,,,,"Tolowa",,,,"California",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.118.0004",1,,,,,,,,,,"Gourd rattle",,,,,,,,,"approved","Gourd rattle, globular; holes drilled in gourd in regular pattern",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"gourd",,,,,,,,,,,,,,,,,,,"American cultures",,,,"Lower Colorado River",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.249.0090",1,,,,,,,,,,"Basket",,,,,,,,,"approved","Globular, coiled, many cuts on rim, incurving rim.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"33.4 x 17","diameter; height",,,,"33.4; 17","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Tohono O'odham",,,,"Southwest",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.120.0012",1,,,,,,,,,,"Vase",,,,,,,,,"approved","Large double neck,""wedding jar"". Black ware, polished, cracked in one area.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"31.5 x 36.5 x 73","height; diameter; circumference",,,,"31.5; 36.5; 73","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"clay",,,,,,,,,,,,,,,,,,,"Tesuque",,,,"Tesuque",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"coiled; fired",,,, +"20CS.209.0005a,b",2,,,,,,,,,,"Figurines",,,,,,,,,"approved","Figurines. Clay figures of dogs with painted decorations in browns and dull red-brown on cream color background, unglazed. (a) dog sitting, H 8 cm; (b) dog standing,",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,8.9,"height",,,,8.9,"cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"clay; paint",,,,,,,,,,,,,,,,,,,"American cultures",,,,"Guerrero state",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.316.0001",1,,,,,,,,,,"Mask",,,,,,,,,"approved","mask; long necked mask w/ 2 human heads back to back, each w/ pair of horns above; heads are painted white w/ red and black features; reddish brown pigment between faces; 4 lacing holes in neck w/ plaited yellow raffia (?) through them; h. 41.1 cm.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,41.1,"height",,,,41.1,"cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"ox horn; wood; paint",,,,,,,,,,,,,,,,,,,"African cultures",,,,"Nigeria",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"dyed; woven",,,, +"20CS.216.0002",1,,,,,,,,,,"Prayer wheel",,,,,,,,,"approved","Tibetan prayer wheel; plain on the outside, but with a tightly wound scroll, carefully enclosed in a sewn cloth sheath, and fit precisely to the copper cylinder. It spins easily on an ingeniously crafted bearing made of carved wood and shell, and is able to facilitate millions of revolutions without breaking down or causing undue friction. A coil of mantras, often hundreds of thousands of mantras, printed from wood blocks on long scrolls, is within the copper cylinder.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"7 x 6.4 x 28.6","length; width; height",,,,"7; 6.4; 28.6","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"shell; cotton; wood; copper; iron; paper",,,,,,,,,,,,,,,,,,,,,,,"Tibet",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"carved",,,, +"20CS.116.0003",1,,,,,,,,,,"Sheath",,,,,,,,,"approved","sheath, knife, leather; made for curved cutting edge blade; leather backing; outer side decorated with proliferation of polychrome seed beads, forming geometric designs and two abstract human faces in low relief; leather thong at proximal end of sheath",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"48.5 x 8","length; width",,,,"48.5; 8","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"leather and fur; seeds",,,,,,,,,,,,,,,,,,,"Yoruba",,,,"Nigeria",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.219.0149",1,,,,,,,,,,"Cradle board",,,,,,,,,"approved","Hualapai toy cradle board. Broad is of willow sticks attached to an oval frame with a full hoop head shade, decorated with red and white cotton strips and blue and white strings of beads. Sides and shade have red cotton winding and straps are red, white & blue braided yarn.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,7.75,"length",,,,7.75,"cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"cotton; willow",,,,,,,,,,,,,,,,,,,"Walapai",,,,"Arizona",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"braided",,,, +"20CS.219.0150",1,,,,,,,,,,"Food and drinks",,,,,,,,,"approved","String of wild turnips; braided.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Omaha",,,,"United States",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"braided",,,, +"20CS.319.0155",1,,,,,,,,,,"Vessels",,,,,,,,,"approved","Ceramic bird vessel",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"American cultures",,,,"Puebla state",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.219.0156",1,,,,,,,,,,"Doll",,,,,,,,,"approved","Comanche man doll. Cloth doll with embroidered features, black coarse thread hair in two braids. Dressed in white buckskin mocassins with silver button trim; heavily fringed and lightly beaded leggings; red felt breechclout; white buckskin shirt witha bit of beading; two stands of red beads around shoulders.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,11.25,"height",,,,11.25,"cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"deerskin; silver; textile",,,,,,,,,,,,,,,,,,,"Comanche",,,,"The Americas",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"beaded; embroidered",,,, +"20CS.117.0299",1,,,,,,,,,,"Whistle",,,,,,,,,"approved","Ceramic whistle",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"ceramic",,,,,,,,,,,,,,,,,,,"Maya civilization",,,,"Campeche state",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.202.0017",1,,,,,,,,,,"Necklace",,,,,,,,,"approved","necklace; 8 plain silver medallions, 2 tubular silver beads, 2 round silver beads, 1 central silver repousse medallion w/ bird design and 6 rings w/ 3 silver bells suspended from each strung on black cotton cord w/ red and gold thread accents, pink silk floss tassel. Circumference (as worn) approx. 46 cm.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,46,"length",,,,46,"cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"silk; cotton; gold plate; silver",,,,,,,,,,,,,,,,,,,,,,,"Udaipur District",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"strung",,,, +"20CS.224.0011",1,,,,,,,,,,"Offering bowl",,,,,,,,,"approved","Pottery bowl; out turned rim; upper half wall verticle and smooth; lower half rough slanting inward to flat base; undecorated; wheel turned.",,"This record contains sample data provided by CollectionSpace community members. While the record may reference real artworks, people, and organizations, the information should not be read as an accurate description of any artwork, person, or organization, or of relationships among them.",,"5.5 x 10.7","height; diameter",,,,"5.5; 10.7","cm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"pottery",,,,,,,,,,,,,,,,,,,"Maya civilization",,,,"Campeche state",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +"20CS.224.0012",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, From bd1f95a3617e62baee6083185f1bd84275e69a4b Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 15:34:23 -0400 Subject: [PATCH 02/19] make memo_wise a dev dependency for now --- collectionspace-mapper.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/collectionspace-mapper.gemspec b/collectionspace-mapper.gemspec index 14bdaa7a..c5689e74 100644 --- a/collectionspace-mapper.gemspec +++ b/collectionspace-mapper.gemspec @@ -43,6 +43,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'xxhash', '>= 0.4.0' spec.add_development_dependency 'bundler', '>= 2.1.2' + spec.add_development_dependency 'memo_wise', '~> 1.1.0' spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rake', '>= 13.0.1' spec.add_development_dependency 'rspec', '~> 3.0' From 2ee806077035da077f52f5040895dd95288b0523 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 15:35:14 -0400 Subject: [PATCH 03/19] clean up and time cache creation/population too --- utils/benchmarking/handler_with_cache.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/utils/benchmarking/handler_with_cache.rb b/utils/benchmarking/handler_with_cache.rb index f7b3d0b1..3964124a 100644 --- a/utils/benchmarking/handler_with_cache.rb +++ b/utils/benchmarking/handler_with_cache.rb @@ -4,12 +4,12 @@ require 'time_up' require 'pry' + require 'collectionspace/mapper' -require 'facets/array/before' require_relative '../../spec/helpers' config = {delimiter: ';'} -mapper_path = File.join('..', '..', 'spec', 'fixtures', 'benchmarking', 'core_collectionobject', 'core_6-1-0_collectionobject.json') +mapper_path = File.join(__dir__, 'fixtures', 'core_collectionobject', 'core_6-1-0_collectionobject.json') rec_mapper = Helpers.get_json_record_mapper(mapper_path) client = Helpers.core_client @@ -19,10 +19,14 @@ search_identifiers: false } +TimeUp.start(:new_cache) cache = CollectionSpace::RefCache.new(config: cache_config, client: client) -popcache = CollectionSpace::RefCache.new(config: cache_config, client: client) -Helpers.populate_core(popcache) +TimeUp.stop(:new_cache) +TimeUp.start(:new_popcache) +popcache = Helpers.core_cache +Helpers.populate_core(popcache) +TimeUp.stop(:new_popcache) def handler_reusing_cache(mapper, cache, client, config) TimeUp.start(:hdlr_chc_reuse) do @@ -49,7 +53,7 @@ def handler(mapper, cache, client, config) CS::Mapper::DataHandler.new(record_mapper: mapper, cache: cache, client: client, config: config) end -50.times do +10.times do handler_reusing_popcache(rec_mapper, popcache, client, config) handler_new_cache(rec_mapper, client, config) handler_reusing_cache(rec_mapper, cache, client, config) From e411338ef4770259c99586a1a1bbb93d0e47cad3 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 16:37:13 -0400 Subject: [PATCH 04/19] move benchmarking stuff to utils --- spec/benchmarking.rb | 58 -------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 spec/benchmarking.rb diff --git a/spec/benchmarking.rb b/spec/benchmarking.rb deleted file mode 100644 index 906e74aa..00000000 --- a/spec/benchmarking.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -require 'bundler/setup' -require 'time_up' -require 'pry' - -require 'collectionspace/mapper' -require 'facets/array/before' -require_relative './helpers' - -config = {delimiter: ';'} -mapper_path = File.join('fixtures', 'benchmarking', 'core_collectionobject', 'core_6-1-0_collectionobject.json') -rec_mapper = Helpers.get_json_record_mapper(mapper_path) -client = Helpers.core_client - -cache_config = { - domain: 'core.collectionspace.org', - search_enabled: false, - search_identifiers: false -} - -cache = CollectionSpace::RefCache.new(config: cache_config, client: client) -popcache = CollectionSpace::RefCache.new(config: cache_config, client: client) -Helpers.populate_core(popcache) - - -def handler_reusing_cache(mapper, cache, client, config) - TimeUp.start(:hdlr_chc_reuse) do - h = handler(mapper, cache, client, config) - c = h.mapper.termcache - end -end - -def handler_reusing_popcache(mapper, cache, client, config) - TimeUp.start(:hdlr_popchc_reuse) do - h = handler(mapper, cache, client, config) - c = h.mapper.termcache - end -end - -def handler_new_cache(mapper, client, config) - TimeUp.start(:hdlr_chc_new) do - h = handler(mapper, nil, client, config) - c = h.mapper.termcache - end -end - -def handler(mapper, cache, client, config) - CS::Mapper::DataHandler.new(record_mapper: mapper, cache: cache, client: client, config: config) -end - -5.times do - handler_reusing_popcache(rec_mapper, popcache, client, config) - handler_new_cache(rec_mapper, client, config) - handler_reusing_cache(rec_mapper, cache, client, config) -end - -TimeUp.print_detailed_summary From 2e3233608fcba95002df6760c258c26ecb1dedaa Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 16:37:42 -0400 Subject: [PATCH 05/19] memoize core_cache to duplicate behavior of being sent external cache --- .../mapper/data_mapper_core_spec.rb | 2 +- .../mapper/data_mapper_spec.rb | 1 - .../mapper/data_prepper_spec.rb | 1 - .../mapper/term_handler_spec.rb | 49 ++++++++++++------- spec/core_helpers.rb | 8 ++- 5 files changed, 38 insertions(+), 23 deletions(-) diff --git a/spec/collectionspace/mapper/data_mapper_core_spec.rb b/spec/collectionspace/mapper/data_mapper_core_spec.rb index 55399daa..e131a78c 100644 --- a/spec/collectionspace/mapper/data_mapper_core_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_core_spec.rb @@ -7,7 +7,7 @@ context 'core profile' do let(:client) { core_client } - let(:cache) { populate_core(core_cache) } + let(:cache) { core_cache } let(:handler) { CollectionSpace::Mapper::DataHandler.new(record_mapper: mapper, client: client, cache: cache, diff --git a/spec/collectionspace/mapper/data_mapper_spec.rb b/spec/collectionspace/mapper/data_mapper_spec.rb index ff09d4ba..72537e2a 100644 --- a/spec/collectionspace/mapper/data_mapper_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_spec.rb @@ -44,7 +44,6 @@ before(:all) do @client = core_client @cache = core_cache - populate_core(@cache) end context 'collectionobject record' do before(:all) do diff --git a/spec/collectionspace/mapper/data_prepper_spec.rb b/spec/collectionspace/mapper/data_prepper_spec.rb index c510d235..dac7a964 100644 --- a/spec/collectionspace/mapper/data_prepper_spec.rb +++ b/spec/collectionspace/mapper/data_prepper_spec.rb @@ -87,7 +87,6 @@ before(:all) do @client = core_client @cache = core_cache - populate_core(@cache) end describe '#process_xpaths' do context 'when authority record' do diff --git a/spec/collectionspace/mapper/term_handler_spec.rb b/spec/collectionspace/mapper/term_handler_spec.rb index b9c8312f..97250f9e 100644 --- a/spec/collectionspace/mapper/term_handler_spec.rb +++ b/spec/collectionspace/mapper/term_handler_spec.rb @@ -91,37 +91,48 @@ end describe '#terms' do + let(:terms) { th.terms } context 'titletranslationlanguage (vocabulary, field subgroup)' do let(:colname) { 'titleTranslationLanguage' } let(:data) { [['%NULLVALUE%', 'Swahili'], ['Sanza', 'Spanish'], [CS::Mapper::THE_BOMB]] } - it 'contains a term Hash for each value' do - expect(th.terms.length).to eq(3) + context 'when new term (Sanza) is initially encountered' do + it 'returns terms as expected' do + found = terms.select{ |h| h[:found] } + not_found = terms.select{ |h| !h[:found] } + expect(terms.length).to eq(3) + expect(found.length).to eq(2) + expect(not_found.first[:refname].display_name).to eq('Sanza') + end end - it 'term hash :found == true when term exists already' do - chk = th.terms.select{ |h| h[:found] } - expect(chk.length).to eq(2) - end - it 'term hash :found == false when term does not exist already' do - chk = th.terms.select{ |h| !h[:found] } - expect(chk.first[:refname].display_name).to eq('Sanza') + + context 'when new term is subsequently encountered' do + it 'the term is treated as found' do + chk = terms.select{ |h| h[:found] } + expect(chk.length).to eq(3) + end end end context 'reference (authority, field group)' do let(:colname) { 'referenceLocal' } let(:data) { ['Reference 3', 'Reference 3', 'Reference 4', '%NULLVALUE%'] } - - it 'contains a term Hash for each value' do - expect(th.terms.length).to eq(3) - end - it 'term hash :found == true when term exists already' do - chk = th.terms.select{ |h| h[:found] } - expect(chk.length).to eq(1) + + context 'when new term (Reference 3) is initially encountered' do + it 'contains a term Hash for each value' do + found = th.terms.select{ |h| h[:found] } + not_found = th.terms.select{ |h| !h[:found] } + expect(terms.length).to eq(3) + expect(found.length).to eq(1) + expect(not_found.first[:refname].display_name).to eq('Reference 3') + end end - it 'term hash :found == false when term does not exist already' do - chk = th.terms.select{ |h| !h[:found] } - expect(chk.first[:refname].display_name).to eq('Reference 3') + + context 'when new term is subsequently encountered' do + it 'the term is treated as found' do + chk = th.terms.select{ |h| h[:found] } + expect(chk.length).to eq(3) + end end end end diff --git a/spec/core_helpers.rb b/spec/core_helpers.rb index 52417b89..03a9c9f1 100644 --- a/spec/core_helpers.rb +++ b/spec/core_helpers.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true +require 'memo_wise' + module Helpers + prepend MemoWise extend self def core_client @@ -19,8 +22,11 @@ def core_cache search_enabled: false, search_identifiers: false } - CollectionSpace::RefCache.new(config: cache_config, client: core_client) + cache = CollectionSpace::RefCache.new(config: cache_config, client: core_client) + populate_core(cache) + cache end + memo_wise(:core_cache) def core_cache_search cache_config = { From 2dff1b65bb5b2f8a3b33c77dfef87a74d1e5ec1f Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 19:11:20 -0400 Subject: [PATCH 06/19] set core_cache search enabled to true and fix what that broke `collectionspace-csv-importer` sends its refcache with search enabled, and I'm working toward ensuring using that will work seamlessly --- lib/collectionspace/mapper/data_handler.rb | 3 + .../mapper/object_hierarchy_data_prepper.rb | 68 +++++++++++++++++++ lib/collectionspace/mapper/tools/refname.rb | 23 ++++++- .../mapper/tools/refname_spec.rb | 39 +++++++++-- spec/core_helpers.rb | 2 +- 5 files changed, 126 insertions(+), 9 deletions(-) create mode 100644 lib/collectionspace/mapper/object_hierarchy_data_prepper.rb diff --git a/lib/collectionspace/mapper/data_handler.rb b/lib/collectionspace/mapper/data_handler.rb index f9a6ba47..8fe28dbd 100644 --- a/lib/collectionspace/mapper/data_handler.rb +++ b/lib/collectionspace/mapper/data_handler.rb @@ -41,6 +41,9 @@ def prep(data) when 'nonhierarchicalrelationship' prepper = CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper.new(response, self) prepper.prep + when 'objecthierarchy' + prepper = CollectionSpace::Mapper::ObjectHierarchyPrepper.new(response, self) + prepper.prep else prepper = CollectionSpace::Mapper::DataPrepper.new(response, self) prepper.prep diff --git a/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb b/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb new file mode 100644 index 00000000..2d8a21ed --- /dev/null +++ b/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +require_relative 'data_prepper' +require_relative 'term_searchable' + +module CollectionSpace + module Mapper + class ObjectHierarchyPrepper < CollectionSpace::Mapper::DataPrepper + include CollectionSpace::Mapper::TermSearchable + attr_reader :errors, :warnings, :type + + def initialize(data, handler) + super + @cache = @handler.mapper.csidcache + @type = @response.merged_data['subjectdocumenttype'] + @errors = [] + @warnings = [] + end + + def prep + set_id + split_data + transform_terms + combine_data_fields + push_errors_and_warnings + self + end + + private + + def set_id + bt = @response.merged_data['broader_object_number'] + nt = @response.merged_data['narrower_object_number'] + @response.identifier = "#{bt} > #{nt}" + end + + def process_xpaths + clear_unmapped_mappings + @handler.mapper.xpath = @handler.xpath_hash + super + end + + + # these mappings were needed to get data in via template for processing, but + # do not actually get used to produce XML + def clear_unmapped_mappings + to_clear = %w[termType termSubType] + @handler.mapper.mappings.reject!{ |mapping| to_clear.include?(mapping.fieldname) } + end + + def transform_terms + %w[broader_object_number narrower_object_number].each do |field| + @response.transformed_data[field] = transformed_term(field) + end + + @response.split_data.each do |field, value| + unless @response.transformed_data.key?(field) + @response.transformed_data[field] = value + end + end + end + + def transformed_term(field) + @response.split_data[field].map{ |term| obj_csid(term, @type) } + end + end + end +end diff --git a/lib/collectionspace/mapper/tools/refname.rb b/lib/collectionspace/mapper/tools/refname.rb index bb3f6717..62ba8a55 100644 --- a/lib/collectionspace/mapper/tools/refname.rb +++ b/lib/collectionspace/mapper/tools/refname.rb @@ -8,6 +8,8 @@ def initialize(msg='Arguments requires either :urn OR :source_type, :type, :subt super end end + + class UnparseableUrnError < StandardError; end class RefName attr_reader :domain, :type, :subtype, :identifier, :display_name, :urn @@ -28,7 +30,7 @@ def initialize(args) @display_name = args[:term] args[:source_type] == :authority ? new_from_authority_term : new_from_term @urn = build_urn - # new_from_term(args[:source_type]) + # new_from_term(args[:source_type]) else raise CollectionSpace::Mapper::Tools::RefNameArgumentError end @@ -50,6 +52,16 @@ def new_from_authority_term end def new_from_urn + if /^urn:cspace:([^:]+):([^:]+):name\(([^\)]+)\):item:name\(([^\)]+)\)'/.match?(@urn) + term_parts_from_urn + elsif /^urn:cspace:([^:]+):([^:]+):id\(([^\)]+)\)'([^']+)'/.match?(@urn) + non_term_parts_from_urn + else + raise CS::Mapper::Tools::UnparseableUrnError + end + end + + def term_parts_from_urn parts = @urn.match(/^urn:cspace:([^:]+):([^:]+):name\(([^\)]+)\):item:name\(([^\)]+)\)'/) @domain = parts[1] @type = parts[2] @@ -57,6 +69,15 @@ def new_from_urn @identifier = parts[4] @display_name = @urn.match(/item:name\(.+\)'(.+)'$/)[1] end + + def non_term_parts_from_urn + parts = @urn.match(/^urn:cspace:([^:]+):([^:]+):id\(([^\)]+)\)'([^']+)'/) + @domain = parts[1] + @type = parts[2] + @subtype = nil + @identifier = parts[3] + @display_name = parts[4] + end end end end diff --git a/spec/collectionspace/mapper/tools/refname_spec.rb b/spec/collectionspace/mapper/tools/refname_spec.rb index a2cd47f4..06212251 100644 --- a/spec/collectionspace/mapper/tools/refname_spec.rb +++ b/spec/collectionspace/mapper/tools/refname_spec.rb @@ -36,13 +36,38 @@ end context 'when initialized with urn' do - it 'builds refname from URN' do - args = { - urn: "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(MaryPoole1796320156)'Mary Poole'" - } - result = CollectionSpace::Mapper::Tools::RefName.new(args) - expect(result.domain).to eq('anthro.collectionspace.org') - expect(result.display_name).to eq('Mary Poole') + context 'with urn for authority term' do + it 'builds refname from URN' do + args = { + urn: "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(MaryPoole1796320156)'Mary Poole'" + } + result = CollectionSpace::Mapper::Tools::RefName.new(args) + expect(result.domain).to eq('anthro.collectionspace.org') + expect(result.display_name).to eq('Mary Poole') + end + end + + context 'with urn for collectionobject' do + it 'builds refname from URN' do + args = { + urn: "urn:cspace:core.collectionspace.org:collectionobjects:id(9010870e-e323-4beb-b065)'2020.1.1055'" + } + result = CollectionSpace::Mapper::Tools::RefName.new(args) + expect(result.domain).to eq('core.collectionspace.org') + expect(result.type).to eq('collectionobjects') + expect(result.subtype).to be_nil + expect(result.identifier).to eq('9010870e-e323-4beb-b065') + expect(result.display_name).to eq('2020.1.1055') + end + end + + context 'with unparseable URN' do + it 'raises error' do + args = { + urn: "urn:cspace:core.collectionspace.org:weird" + } + expect{ CollectionSpace::Mapper::Tools::RefName.new(args) }.to raise_error(CollectionSpace::Mapper::Tools::UnparseableUrnError) + end end end diff --git a/spec/core_helpers.rb b/spec/core_helpers.rb index 03a9c9f1..47ca0879 100644 --- a/spec/core_helpers.rb +++ b/spec/core_helpers.rb @@ -19,7 +19,7 @@ def core_client def core_cache cache_config = { domain: 'core.collectionspace.org', - search_enabled: false, + search_enabled: true, search_identifiers: false } cache = CollectionSpace::RefCache.new(config: cache_config, client: core_client) From 4c33fd3d299eb0f811bcf1baf6f9ff5512af1178 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 19:18:37 -0400 Subject: [PATCH 07/19] memoize and prepopulate anthro cache --- spec/anthro_helpers.rb | 4 ++++ spec/collectionspace/mapper/data_handler_spec.rb | 1 - spec/collectionspace/mapper/data_mapper_anthro_spec.rb | 1 - spec/collectionspace/mapper/data_mapper_spec.rb | 1 - spec/collectionspace/mapper/data_prepper_spec.rb | 1 - spec/collectionspace/mapper/tools/refname_spec.rb | 1 - spec/collectionspace/mapper/value_transformer_spec.rb | 1 - 7 files changed, 4 insertions(+), 6 deletions(-) diff --git a/spec/anthro_helpers.rb b/spec/anthro_helpers.rb index 17b123d8..066e4b98 100644 --- a/spec/anthro_helpers.rb +++ b/spec/anthro_helpers.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true +require 'memo_wise' + module Helpers + prepend MemoWise extend self def anthro_client @@ -23,6 +26,7 @@ def anthro_cache populate_anthro(cache) cache end + memo_wise(:anthro_cache) def anthro_object_mapper path = 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json' diff --git a/spec/collectionspace/mapper/data_handler_spec.rb b/spec/collectionspace/mapper/data_handler_spec.rb index 7a491140..e683ddd9 100644 --- a/spec/collectionspace/mapper/data_handler_spec.rb +++ b/spec/collectionspace/mapper/data_handler_spec.rb @@ -6,7 +6,6 @@ before(:all) do @anthro_client = anthro_client @anthro_cache = anthro_cache - populate_anthro(@anthro_cache) @anthro_object_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') @anthro_object_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_object_mapper, client: @anthro_client, diff --git a/spec/collectionspace/mapper/data_mapper_anthro_spec.rb b/spec/collectionspace/mapper/data_mapper_anthro_spec.rb index 45cf959c..f3dcc769 100644 --- a/spec/collectionspace/mapper/data_mapper_anthro_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_anthro_spec.rb @@ -11,7 +11,6 @@ before(:all) do @client = anthro_client @cache = anthro_cache - populate_anthro(@cache) end context 'claim record' do diff --git a/spec/collectionspace/mapper/data_mapper_spec.rb b/spec/collectionspace/mapper/data_mapper_spec.rb index 72537e2a..28af9125 100644 --- a/spec/collectionspace/mapper/data_mapper_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_spec.rb @@ -186,7 +186,6 @@ before(:all) do @client = anthro_client @cache = anthro_cache - populate_anthro(@cache) end context 'place record' do before(:all) do diff --git a/spec/collectionspace/mapper/data_prepper_spec.rb b/spec/collectionspace/mapper/data_prepper_spec.rb index dac7a964..82693793 100644 --- a/spec/collectionspace/mapper/data_prepper_spec.rb +++ b/spec/collectionspace/mapper/data_prepper_spec.rb @@ -11,7 +11,6 @@ before(:all) do @client = anthro_client @cache = anthro_cache - populate_anthro(@cache) @collectionobject_config = @config.merge({ transforms: { 'collection' => { diff --git a/spec/collectionspace/mapper/tools/refname_spec.rb b/spec/collectionspace/mapper/tools/refname_spec.rb index 06212251..83bdb409 100644 --- a/spec/collectionspace/mapper/tools/refname_spec.rb +++ b/spec/collectionspace/mapper/tools/refname_spec.rb @@ -5,7 +5,6 @@ RSpec.describe CollectionSpace::Mapper::Tools::RefName do before(:all) do @cache = anthro_cache - populate_anthro(@cache) end context 'when initialized with source_type, type, subtype, term, and cache' do it 'builds refname for authorities' do diff --git a/spec/collectionspace/mapper/value_transformer_spec.rb b/spec/collectionspace/mapper/value_transformer_spec.rb index 320bd8f5..d05a7ad7 100644 --- a/spec/collectionspace/mapper/value_transformer_spec.rb +++ b/spec/collectionspace/mapper/value_transformer_spec.rb @@ -6,7 +6,6 @@ before(:all) do client = anthro_client cache = anthro_cache - populate_anthro(cache) mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: mapper, client: client, From aba62847b923f381b301cc22f69a07096bc49697 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 19:25:30 -0400 Subject: [PATCH 08/19] prepopulate and memoize bonsai cache --- spec/bonsai_helpers.rb | 8 +++++++- spec/collectionspace/mapper/data_mapper_bonsai_spec.rb | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/bonsai_helpers.rb b/spec/bonsai_helpers.rb index f2d490e0..52fd8f78 100644 --- a/spec/bonsai_helpers.rb +++ b/spec/bonsai_helpers.rb @@ -1,6 +1,9 @@ # frozen_string_literal: true +require 'memo_wise' + module Helpers + prepend MemoWise extend self def bonsai_client @@ -17,8 +20,11 @@ def bonsai_cache cache_config = { domain: 'bonsai.collectionspace.org' } - CollectionSpace::RefCache.new(config: cache_config, client: bonsai_client) + cache = CollectionSpace::RefCache.new(config: cache_config, client: bonsai_client) + populate_bonsai(cache) + cache end + memo_wise(:bonsai_cache) def populate_bonsai(cache) terms = [ diff --git a/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb b/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb index 362632ea..3f9f1e31 100644 --- a/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb @@ -11,7 +11,6 @@ before(:all) do @client = bonsai_client @cache = bonsai_cache - populate_bonsai(@cache) end context 'objectexit record' do From ae23a63cd5f918f92256385509406eb0e0c72d51 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 19:33:40 -0400 Subject: [PATCH 09/19] prepopulate and memoize botgarden cache --- spec/botgarden_helpers.rb | 7 ++++++- spec/collectionspace/mapper/data_mapper_botgarden_spec.rb | 1 - spec/collectionspace/mapper/data_mapper_spec.rb | 2 -- spec/collectionspace/mapper/response_spec.rb | 1 - 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/spec/botgarden_helpers.rb b/spec/botgarden_helpers.rb index 68b1d7aa..e9ee43b0 100644 --- a/spec/botgarden_helpers.rb +++ b/spec/botgarden_helpers.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'memo_wise' + module Helpers extend self @@ -19,8 +21,11 @@ def botgarden_cache search_enabled: true, search_identifiers: false } - CollectionSpace::RefCache.new(config: cache_config, client: botgarden_client) + cache = CollectionSpace::RefCache.new(config: cache_config, client: botgarden_client) + populate_botgarden(cache) + cache end + memo_wise(:botgarden_cache) def populate_botgarden(cache) terms = [ diff --git a/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb b/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb index ea586a74..60cc6afa 100644 --- a/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb @@ -11,7 +11,6 @@ before(:all) do @client = botgarden_client @cache = botgarden_cache - populate_botgarden(@cache) end context 'pottag record' do diff --git a/spec/collectionspace/mapper/data_mapper_spec.rb b/spec/collectionspace/mapper/data_mapper_spec.rb index 28af9125..072091cb 100644 --- a/spec/collectionspace/mapper/data_mapper_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_spec.rb @@ -163,7 +163,6 @@ before(:all) do @client = botgarden_client @cache = botgarden_cache - populate_botgarden(@cache) end context 'loanout record' do before(:all) do @@ -269,7 +268,6 @@ xit 'adds botgarden propagation namespace' do client = botgarden_client cache = botgarden_cache - populate_botgarden(cache) prop_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/botgarden/botgarden_2-0-1_propagation.json') prop_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: prop_mapper, client: client, diff --git a/spec/collectionspace/mapper/response_spec.rb b/spec/collectionspace/mapper/response_spec.rb index e0b23204..801d17dc 100644 --- a/spec/collectionspace/mapper/response_spec.rb +++ b/spec/collectionspace/mapper/response_spec.rb @@ -6,7 +6,6 @@ before(:all) do @client = botgarden_client @cache = botgarden_cache - populate_botgarden(@cache) @mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/botgarden/botgarden_2-0-1_taxon-local.json') @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @mapper, client: @client, From 6aa646b52225ad558455bd783072bc00db0e59c2 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 19:49:07 -0400 Subject: [PATCH 10/19] put profiling/benchmarking stuff in utils/benchmarking --- {spec => utils/benchmarking}/profile.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {spec => utils/benchmarking}/profile.rb (100%) diff --git a/spec/profile.rb b/utils/benchmarking/profile.rb similarity index 100% rename from spec/profile.rb rename to utils/benchmarking/profile.rb From 3fd062c93a24e26e5c97e6461a8ed653f5c2c8ba Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 19:52:46 -0400 Subject: [PATCH 11/19] memoize, prepopulate, and set search enabled to true on all caches --- spec/anthro_helpers.rb | 11 +------- spec/bonsai_helpers.rb | 9 +------ spec/botgarden_helpers.rb | 10 +------ .../mapper/data_mapper_spec.rb | 2 -- spec/core_helpers.rb | 11 ++------ spec/fcart_helpers.rb | 13 ++++------ spec/helpers.rb | 26 +++++++++++++------ spec/lhmc_helpers.rb | 13 ++++------ 8 files changed, 33 insertions(+), 62 deletions(-) diff --git a/spec/anthro_helpers.rb b/spec/anthro_helpers.rb index 066e4b98..f65491e1 100644 --- a/spec/anthro_helpers.rb +++ b/spec/anthro_helpers.rb @@ -1,11 +1,6 @@ # frozen_string_literal: true -require 'memo_wise' - module Helpers - prepend MemoWise - extend self - def anthro_client CollectionSpace::Client.new( CollectionSpace::Configuration.new( @@ -17,11 +12,7 @@ def anthro_client end def anthro_cache - cache_config = { - domain: 'anthro.collectionspace.org', - search_enabled: false, - search_identifiers: false - } + cache_config = base_cache_config.merge({domain: 'anthro.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: anthro_client) populate_anthro(cache) cache diff --git a/spec/bonsai_helpers.rb b/spec/bonsai_helpers.rb index 52fd8f78..c4dbbafc 100644 --- a/spec/bonsai_helpers.rb +++ b/spec/bonsai_helpers.rb @@ -1,11 +1,6 @@ # frozen_string_literal: true -require 'memo_wise' - module Helpers - prepend MemoWise - extend self - def bonsai_client CollectionSpace::Client.new( CollectionSpace::Configuration.new( @@ -17,9 +12,7 @@ def bonsai_client end def bonsai_cache - cache_config = { - domain: 'bonsai.collectionspace.org' - } + cache_config = base_cache_config.merge({domain: 'bonsai.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: bonsai_client) populate_bonsai(cache) cache diff --git a/spec/botgarden_helpers.rb b/spec/botgarden_helpers.rb index e9ee43b0..74c0afa4 100644 --- a/spec/botgarden_helpers.rb +++ b/spec/botgarden_helpers.rb @@ -1,10 +1,6 @@ # frozen_string_literal: true -require 'memo_wise' - module Helpers - extend self - def botgarden_client CollectionSpace::Client.new( CollectionSpace::Configuration.new( @@ -16,11 +12,7 @@ def botgarden_client end def botgarden_cache - cache_config = { - domain: 'botgarden.collectionspace.org', - search_enabled: true, - search_identifiers: false - } + cache_config = base_cache_config.merge({domain: 'botgarden.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: botgarden_client) populate_botgarden(cache) cache diff --git a/spec/collectionspace/mapper/data_mapper_spec.rb b/spec/collectionspace/mapper/data_mapper_spec.rb index 072091cb..ee5ef077 100644 --- a/spec/collectionspace/mapper/data_mapper_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_spec.rb @@ -11,7 +11,6 @@ before(:all) do @client = fcart_client @cache = fcart_cache - populate_fcart(@cache) end context 'acquisition record' do @@ -121,7 +120,6 @@ before(:all) do @client = lhmc_client @cache = lhmc_cache - populate_lhmc(@cache) end context 'person record' do before(:all) do diff --git a/spec/core_helpers.rb b/spec/core_helpers.rb index 47ca0879..dafba569 100644 --- a/spec/core_helpers.rb +++ b/spec/core_helpers.rb @@ -1,11 +1,8 @@ # frozen_string_literal: true -require 'memo_wise' +require_relative './helpers' module Helpers - prepend MemoWise - extend self - def core_client CollectionSpace::Client.new( CollectionSpace::Configuration.new( @@ -17,11 +14,7 @@ def core_client end def core_cache - cache_config = { - domain: 'core.collectionspace.org', - search_enabled: true, - search_identifiers: false - } + cache_config = base_cache_config.merge({domain: 'core.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: core_client) populate_core(cache) cache diff --git a/spec/fcart_helpers.rb b/spec/fcart_helpers.rb index 1a6d3982..af889957 100644 --- a/spec/fcart_helpers.rb +++ b/spec/fcart_helpers.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true module Helpers - extend self - def fcart_client CollectionSpace::Client.new( CollectionSpace::Configuration.new( @@ -14,13 +12,12 @@ def fcart_client end def fcart_cache - cache_config = { - domain: 'fcart.collectionspace.org', - search_enabled: false, - search_identifiers: false - } - CollectionSpace::RefCache.new(config: cache_config, client: fcart_client) + cache_config = base_cache_config.merge({domain: 'fcart.collectionspace.org'}) + cache = CollectionSpace::RefCache.new(config: cache_config, client: fcart_client) + populate_fcart(cache) + cache end + memo_wise(:fcart_cache) def populate_fcart(cache) terms = [ diff --git a/spec/helpers.rb b/spec/helpers.rb index 951e0f55..94121ab1 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -1,18 +1,28 @@ # frozen_string_literal: true -require_relative './anthro_helpers' -require_relative './bonsai_helpers' -require_relative './botgarden_helpers' -require_relative './core_helpers' -require_relative './fcart_helpers' -require_relative './lhmc_helpers' +require 'memo_wise' + module Helpers + prepend MemoWise extend self - - FIXTUREDIR = 'spec/fixtures/files/xml' + require_relative './anthro_helpers' + require_relative './bonsai_helpers' + require_relative './botgarden_helpers' + require_relative './core_helpers' + require_relative './fcart_helpers' + require_relative './lhmc_helpers' + FIXTUREDIR = 'spec/fixtures/files/xml' + + def base_cache_config + { + search_enabled: true, + search_identifiers: false + } + end + # returns RecordMapper hash read in from JSON file # path = String. Path to JSON file # turns strings into symbols that removed when writing to JSON diff --git a/spec/lhmc_helpers.rb b/spec/lhmc_helpers.rb index 53e7ac18..96f38094 100644 --- a/spec/lhmc_helpers.rb +++ b/spec/lhmc_helpers.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true module Helpers - extend self - def lhmc_client CollectionSpace::Client.new( CollectionSpace::Configuration.new( @@ -14,13 +12,12 @@ def lhmc_client end def lhmc_cache - cache_config = { - domain: 'lhmc.collectionspace.org', - search_enabled: true, - search_identifiers: false - } - CollectionSpace::RefCache.new(config: cache_config, client: lhmc_client) + cache_config = base_cache_config.merge({domain: 'lhmc.collectionspace.org'}) + cache = CollectionSpace::RefCache.new(config: cache_config, client: lhmc_client) + populate_lhmc(cache) + cache end + memo_wise(:lhmc_cache) def populate_lhmc(cache) terms = [ From 656b41f6b3c366e704d0b133ee048eaf4fb4a82b Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 21:41:23 -0400 Subject: [PATCH 12/19] remove generation of new termcache by record_mapper if not passed in at initialization --- .../mapper/authority_hierarchy_prepper.rb | 2 +- .../non_hierarchical_relationship_prepper.rb | 2 +- .../mapper/object_hierarchy_data_prepper.rb | 2 +- lib/collectionspace/mapper/record_mapper.rb | 38 +------------------ lib/collectionspace/mapper/term_searchable.rb | 2 +- lib/collectionspace/mapper/tools/refname.rb | 6 +-- .../mapper/column_value_spec.rb | 2 +- .../mapper/data_validator_spec.rb | 8 ++-- .../mapper/group_column_value_spec.rb | 3 +- .../group_multival_column_value_spec.rb | 3 +- .../mapper/multival_column_value_spec.rb | 3 +- .../mapper/record_mapper_spec.rb | 18 +-------- .../mapper/subgroup_column_value_spec.rb | 3 +- .../tools/record_status_service_spec.rb | 8 ++-- .../mapper/tools/refname_spec.rb | 14 +++++++ spec/collectionspace/mapper_spec.rb | 24 +----------- spec/core_helpers.rb | 2 +- spec/helpers.rb | 4 +- 18 files changed, 45 insertions(+), 99 deletions(-) diff --git a/lib/collectionspace/mapper/authority_hierarchy_prepper.rb b/lib/collectionspace/mapper/authority_hierarchy_prepper.rb index 04c2cb7a..f2c1f904 100644 --- a/lib/collectionspace/mapper/authority_hierarchy_prepper.rb +++ b/lib/collectionspace/mapper/authority_hierarchy_prepper.rb @@ -11,7 +11,7 @@ class AuthorityHierarchyPrepper < CollectionSpace::Mapper::DataPrepper def initialize(data, handler) super - @cache = @handler.mapper.csidcache + @cache = @handler.mapper.termcache @type = @response.merged_data['term_type'] @subtype = @response.merged_data['term_subtype'] @errors = [] diff --git a/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb b/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb index bc1f532a..49bae086 100644 --- a/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb +++ b/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb @@ -11,7 +11,7 @@ class NonHierarchicalRelationshipPrepper < CollectionSpace::Mapper::DataPrepper def initialize(data, handler) super - @cache = @handler.mapper.csidcache + @cache = @handler.mapper.termcache @types = [@response.merged_data['item1_type'], @response.merged_data['item2_type']] @errors = [] @warnings = [] diff --git a/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb b/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb index 2d8a21ed..7e2a0e13 100644 --- a/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb +++ b/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb @@ -11,7 +11,7 @@ class ObjectHierarchyPrepper < CollectionSpace::Mapper::DataPrepper def initialize(data, handler) super - @cache = @handler.mapper.csidcache + @cache = @handler.mapper.termcache @type = @response.merged_data['subjectdocumenttype'] @errors = [] @warnings = [] diff --git a/lib/collectionspace/mapper/record_mapper.rb b/lib/collectionspace/mapper/record_mapper.rb index 4bd9e458..9646dd3f 100644 --- a/lib/collectionspace/mapper/record_mapper.rb +++ b/lib/collectionspace/mapper/record_mapper.rb @@ -17,7 +17,7 @@ module Mapper class RecordMapper include Tools::Symbolizable - attr_reader :batchconfig, :config, :mappings, :xml_template, :csclient + attr_reader :batchconfig, :config, :termcache, :mappings, :xml_template, :csclient attr_accessor :xpath @@ -26,17 +26,9 @@ def initialize(opts) convert(jhash) @batchconfig = CS::Mapper::Config.new(config: opts[:batchconfig], record_type: record_type_extension) @csclient = opts[:csclient] - @termcache = opts[:termcache] || nil + @termcache = opts[:termcache] @xpath = {} end - - def termcache - @termcache ||= get_termcache - end - - def csidcache - @csidcache ||= get_csidcache - end def record_type @config.recordtype @@ -65,32 +57,6 @@ def convert(json) mapper: self) end - def get_termcache - config = { - domain: @csclient.domain, - error_if_not_found: false, - lifetime: 5 * 60, - search_delay: 5 * 60, - search_enabled: true - } - # search for authority records by display name, not short ID - config[:search_identifiers] = service_type == CS::Mapper::Authority ? false : true - CollectionSpace::RefCache.new(config: config, client: @csclient) - end - - def get_csidcache - return nil unless service_type == CS::Mapper::Relationship - - config = { - domain: @csclient.domain, - error_if_not_found: false, - lifetime: 5 * 60, - search_delay: 5 * 60, - search_enabled: false - } - CollectionSpace::RefCache.new(config: config, client: @csclient) - end - def record_type_extension case record_type when 'media' diff --git a/lib/collectionspace/mapper/term_searchable.rb b/lib/collectionspace/mapper/term_searchable.rb index d90efb02..c516d7f2 100644 --- a/lib/collectionspace/mapper/term_searchable.rb +++ b/lib/collectionspace/mapper/term_searchable.rb @@ -42,7 +42,7 @@ def searched_term(val) end def obj_csid(objnum, type) - csid = @cache.get(type, '', objnum) + csid = @cache.get(type, '', objnum, search: false) return csid unless csid.nil? response = @client.find(type: type, value: objnum) diff --git a/lib/collectionspace/mapper/tools/refname.rb b/lib/collectionspace/mapper/tools/refname.rb index 62ba8a55..39e61cf6 100644 --- a/lib/collectionspace/mapper/tools/refname.rb +++ b/lib/collectionspace/mapper/tools/refname.rb @@ -54,7 +54,7 @@ def new_from_authority_term def new_from_urn if /^urn:cspace:([^:]+):([^:]+):name\(([^\)]+)\):item:name\(([^\)]+)\)'/.match?(@urn) term_parts_from_urn - elsif /^urn:cspace:([^:]+):([^:]+):id\(([^\)]+)\)'([^']+)'/.match?(@urn) + elsif /^urn:cspace:([^:]+):([^:]+):id\(([^\)]+)\)(.*)/.match?(@urn) non_term_parts_from_urn else raise CS::Mapper::Tools::UnparseableUrnError @@ -71,12 +71,12 @@ def term_parts_from_urn end def non_term_parts_from_urn - parts = @urn.match(/^urn:cspace:([^:]+):([^:]+):id\(([^\)]+)\)'([^']+)'/) + parts = @urn.match(/^urn:cspace:([^:]+):([^:]+):id\(([^\)]+)\)(.*)/) @domain = parts[1] @type = parts[2] @subtype = nil @identifier = parts[3] - @display_name = parts[4] + @display_name = parts[4].delete("'") if parts[4] end end end diff --git a/spec/collectionspace/mapper/column_value_spec.rb b/spec/collectionspace/mapper/column_value_spec.rb index 57e9c3bc..99c55664 100644 --- a/spec/collectionspace/mapper/column_value_spec.rb +++ b/spec/collectionspace/mapper/column_value_spec.rb @@ -4,7 +4,7 @@ RSpec.describe CollectionSpace::Mapper::ColumnValue do let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json'} - let(:recmapper) { get_record_mapper_object(mapperpath) } + let(:recmapper) { get_record_mapper_object(mapperpath, core_cache) } let(:mapping) { recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, diff --git a/spec/collectionspace/mapper/data_validator_spec.rb b/spec/collectionspace/mapper/data_validator_spec.rb index cbd5fd41..f56bd57c 100644 --- a/spec/collectionspace/mapper/data_validator_spec.rb +++ b/spec/collectionspace/mapper/data_validator_spec.rb @@ -93,11 +93,11 @@ RSpec.describe CollectionSpace::Mapper::DataValidator do before(:all) do @anthro_object_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') - @anthro_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @anthro_object_mapper), anthro_cache) + @anthro_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @anthro_object_mapper, termcache: anthro_cache), anthro_cache) @botgarden_loanout_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/botgarden/botgarden_2-0-1_loanout.json') - @botgarden_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @botgarden_loanout_mapper), botgarden_cache) + @botgarden_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @botgarden_loanout_mapper, termcache: botgarden_cache), botgarden_cache) @core_authhier_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_authorityhierarchy.json') - @core_authhier_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @core_authhier_mapper), core_cache) + @core_authhier_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @core_authhier_mapper, termcache: core_cache), core_cache) end describe '#validate' do @@ -109,7 +109,7 @@ context 'when recordtype has multiauthority required field' do before(:all) do @mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_movement.json') - @validator = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @mapper), core_cache) + @validator = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @mapper, termcache: core_cache), core_cache) end it 'validates' do data = { 'movementReferenceNumber' => '1', 'currentLocationLocationLocal' => 'Loc' } diff --git a/spec/collectionspace/mapper/group_column_value_spec.rb b/spec/collectionspace/mapper/group_column_value_spec.rb index 777ba082..7fac15a6 100644 --- a/spec/collectionspace/mapper/group_column_value_spec.rb +++ b/spec/collectionspace/mapper/group_column_value_spec.rb @@ -6,7 +6,8 @@ let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), - batchconfig: config) } + batchconfig: config, + termcache: core_cache) } let(:mapping) { recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, diff --git a/spec/collectionspace/mapper/group_multival_column_value_spec.rb b/spec/collectionspace/mapper/group_multival_column_value_spec.rb index b95187ba..3091b576 100644 --- a/spec/collectionspace/mapper/group_multival_column_value_spec.rb +++ b/spec/collectionspace/mapper/group_multival_column_value_spec.rb @@ -6,7 +6,8 @@ let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json' } let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), - batchconfig: config) } + batchconfig: config, + termcache: bonsai_cache) } let(:mapping) { recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, diff --git a/spec/collectionspace/mapper/multival_column_value_spec.rb b/spec/collectionspace/mapper/multival_column_value_spec.rb index 3138911a..89e64145 100644 --- a/spec/collectionspace/mapper/multival_column_value_spec.rb +++ b/spec/collectionspace/mapper/multival_column_value_spec.rb @@ -6,7 +6,8 @@ let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), - batchconfig: config) } + batchconfig: config, + termcache: core_cache) } let(:mapping) { recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, diff --git a/spec/collectionspace/mapper/record_mapper_spec.rb b/spec/collectionspace/mapper/record_mapper_spec.rb index cd900c91..935a9c03 100644 --- a/spec/collectionspace/mapper/record_mapper_spec.rb +++ b/spec/collectionspace/mapper/record_mapper_spec.rb @@ -6,7 +6,7 @@ let(:path) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json' } let(:jsonmapper) { get_json_record_mapper(path) } let(:client) { anthro_client } - let(:mapper) { mapr = described_class.new(mapper: jsonmapper, csclient: client) } + let(:mapper) { mapr = described_class.new(mapper: jsonmapper, csclient: client, termcache: anthro_cache) } it 'has expected instance variables' do expected = [:@xpath, :@config, :@xml_template, :@mappings, :@batchconfig, :@csclient, :@termcache].sort @@ -34,20 +34,4 @@ end end end - - describe '#termcache' do - context 'when cache is not passed in at initialization', services_call: true do - context 'when mapping an authority' do - let(:path) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_place-local.json' } - it 'cache.search_identifiers = false' do - expect(mapper.termcache.inspect).to include('@search_identifiers=false') - end - end - context 'when mapping a non-authority' do - it 'cache.search_identifiers = true' do - expect(mapper.termcache.inspect).to include('@search_identifiers=true') - end - end - end - end end diff --git a/spec/collectionspace/mapper/subgroup_column_value_spec.rb b/spec/collectionspace/mapper/subgroup_column_value_spec.rb index 961ffcfa..e71052ef 100644 --- a/spec/collectionspace/mapper/subgroup_column_value_spec.rb +++ b/spec/collectionspace/mapper/subgroup_column_value_spec.rb @@ -6,7 +6,8 @@ let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), - batchconfig: config) } + batchconfig: config, + termcache: core_cache) } let(:mapping) { recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, diff --git a/spec/collectionspace/mapper/tools/record_status_service_spec.rb b/spec/collectionspace/mapper/tools/record_status_service_spec.rb index 15086084..417d9296 100644 --- a/spec/collectionspace/mapper/tools/record_status_service_spec.rb +++ b/spec/collectionspace/mapper/tools/record_status_service_spec.rb @@ -9,7 +9,7 @@ context 'when mapper service_path not handled by collectionspace-client' do let(:mapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper( 'spec/fixtures/files/mappers/core_6-1-0_aardvark.json' - )) } + ), termcache: core_cache) } it 'raises NoClientServiceError' do expect{ CS::Mapper::Tools::RecordStatusService.new(client, mapper) }.to raise_error(CS::Mapper::NoClientServiceError) @@ -22,7 +22,7 @@ context 'when mapper is for an authority' do let(:mapper) { CollectionSpace::Mapper::RecordMapper.new(mapper: get_json_record_mapper( 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_person-local.json' - )) } + ), termcache: core_cache) } context 'and one result is found' do let(:report) { service.lookup('John Doe') } @@ -62,7 +62,7 @@ context 'when mapper is for an object' do let(:mapper) { CollectionSpace::Mapper::RecordMapper.new(mapper: get_json_record_mapper( 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' - )) } + ), termcache: core_cache) } it 'works the same' do res = service.lookup('2000.1') @@ -73,7 +73,7 @@ context 'when mapper is for a procedure' do let(:mapper) { CollectionSpace::Mapper::RecordMapper.new(mapper: get_json_record_mapper( 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_acquisition.json' - )) } + ), termcache: core_cache) } it 'works the same' do res = service.lookup('2000.001') diff --git a/spec/collectionspace/mapper/tools/refname_spec.rb b/spec/collectionspace/mapper/tools/refname_spec.rb index 83bdb409..323ffc4e 100644 --- a/spec/collectionspace/mapper/tools/refname_spec.rb +++ b/spec/collectionspace/mapper/tools/refname_spec.rb @@ -60,6 +60,20 @@ end end + context 'with urn for movement' do + it 'builds refname from URN' do + args = { + urn: "urn:cspace:core.collectionspace.org:movements:id(8e74756f-38f5-4dee-90d4)" + } + result = CollectionSpace::Mapper::Tools::RefName.new(args) + expect(result.domain).to eq('core.collectionspace.org') + expect(result.type).to eq('movements') + expect(result.subtype).to be_nil + expect(result.identifier).to eq('8e74756f-38f5-4dee-90d4') + expect(result.display_name).to eq('') + end + end + context 'with unparseable URN' do it 'raises error' do args = { diff --git a/spec/collectionspace/mapper_spec.rb b/spec/collectionspace/mapper_spec.rb index 397de46b..e010035c 100644 --- a/spec/collectionspace/mapper_spec.rb +++ b/spec/collectionspace/mapper_spec.rb @@ -19,10 +19,8 @@ @data = { 'objectNumber'=>'123' } @response = CollectionSpace::Mapper::setup_data(@data) end - it 'returns a CollectionSpace::Mapper::Response' do + it 'returns a CollectionSpace::Mapper::Response with expected orig_data' do expect(@response).to be_a(CollectionSpace::Mapper::Response) - end - it 'sets Hash as Response.orig_data' do expect(@response.orig_data).to eq(@data) end end @@ -33,24 +31,4 @@ end end end - - context 'when testing' do - let(:rc) { anthro_cache } - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json' } - - - it 'can create anthro refcache' do - expect(rc).to be_a(CollectionSpace::RefCache) - end - - it 'getting json record mapper returns a Hash' do - hash = get_json_record_mapper(mapperpath) - expect(hash).to be_a(Hash) - end - - it 'getting RecordMapper returns a RecordMapper object' do - obj = get_record_mapper_object(mapperpath) - expect(obj).to be_a(CS::Mapper::RecordMapper) - end - end end diff --git a/spec/core_helpers.rb b/spec/core_helpers.rb index dafba569..706a8a3b 100644 --- a/spec/core_helpers.rb +++ b/spec/core_helpers.rb @@ -34,7 +34,7 @@ def core_cache_search def core_object_mapper path = 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' - get_record_mapper_object(path) + get_record_mapper_object(path, core_cache) end def populate_core(cache) diff --git a/spec/helpers.rb b/spec/helpers.rb index 94121ab1..8e3819a3 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -32,8 +32,8 @@ def get_json_record_mapper(path) JSON.parse(File.read(path)) end - def get_record_mapper_object(path) - CS::Mapper::RecordMapper.new(mapper: File.read(path)) + def get_record_mapper_object(path, cache = nil) + CS::Mapper::RecordMapper.new(mapper: File.read(path), termcache: cache) end def get_datahash(path:) From e8e2c027c8882e9a7145378f5037de8b98487eee Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 21:55:21 -0400 Subject: [PATCH 13/19] make memo_wise a non-dev dependency --- collectionspace-mapper.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collectionspace-mapper.gemspec b/collectionspace-mapper.gemspec index c5689e74..45a3819d 100644 --- a/collectionspace-mapper.gemspec +++ b/collectionspace-mapper.gemspec @@ -39,11 +39,11 @@ Gem::Specification.new do |spec| spec.add_dependency 'chronic' spec.add_dependency 'facets' + spec.add_dependency 'memo_wise', '~> 1.1.0' spec.add_dependency 'nokogiri', '>= 1.10.9' spec.add_dependency 'xxhash', '>= 0.4.0' spec.add_development_dependency 'bundler', '>= 2.1.2' - spec.add_development_dependency 'memo_wise', '~> 1.1.0' spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rake', '>= 13.0.1' spec.add_development_dependency 'rspec', '~> 3.0' From b91b665cf7d1a295a1690521b0b6867e9ee0422b Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 21:55:56 -0400 Subject: [PATCH 14/19] clear reek todo config --- .reek.yml | 313 +----------------------------------------------------- 1 file changed, 1 insertion(+), 312 deletions(-) diff --git a/.reek.yml b/.reek.yml index 6948d982..d7579261 100644 --- a/.reek.yml +++ b/.reek.yml @@ -1,317 +1,6 @@ -# Auto generated by Reeks --todo flag --- detectors: - Attribute: - exclude: - - CollectionSpace::Mapper::DataHandler#mapper - - CollectionSpace::Mapper::DataMapper#doc - - CollectionSpace::Mapper::DataMapper#response - - CollectionSpace::Mapper::DataPrepper#response - - CollectionSpace::Mapper::DataPrepper#xphash - - CollectionSpace::Mapper::Response#combined_data - - CollectionSpace::Mapper::Response#csid - - CollectionSpace::Mapper::Response#doc - - CollectionSpace::Mapper::Response#errors - - CollectionSpace::Mapper::Response#identifier - - CollectionSpace::Mapper::Response#merged_data - - CollectionSpace::Mapper::Response#record_status - - CollectionSpace::Mapper::Response#refname - - CollectionSpace::Mapper::Response#split_data - - CollectionSpace::Mapper::Response#terms - - CollectionSpace::Mapper::Response#transformed_data - - CollectionSpace::Mapper::Response#uri - - CollectionSpace::Mapper::Response#warnings - - CollectionSpace::Mapper::TermHandler#value - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#mappable - DuplicateMethodCall: - exclude: - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#initialize - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#prep - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#set_id - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#transform_terms - - CollectionSpace::Mapper::DataHandler#add_short_id_mapping - - CollectionSpace::Mapper::DataHandler#get_cache - - CollectionSpace::Mapper::DataHandler#get_csidcache - - CollectionSpace::Mapper::DataHandler#initialize - - CollectionSpace::Mapper::DataHandler#merge_config_transforms - - CollectionSpace::Mapper::DataHandler#process - - CollectionSpace::Mapper::DataHandler#set_record_status - - CollectionSpace::Mapper::DataHandler#tag_terms - - CollectionSpace::Mapper::DataHandler#xpath_hash - - CollectionSpace::Mapper::DataMapper#add_namespaces - - CollectionSpace::Mapper::DataMapper#add_too_many_subgroups_warning - - CollectionSpace::Mapper::DataMapper#clean_doc - - CollectionSpace::Mapper::DataMapper#map - - CollectionSpace::Mapper::DataMapper#map_group - - CollectionSpace::Mapper::DataMapper#map_subgroup - - CollectionSpace::Mapper::DataMapper#set_relation_id - - CollectionSpace::Mapper::DataMapper#set_response_identifier - - CollectionSpace::Mapper::DataPrepper#check_data - - CollectionSpace::Mapper::DataPrepper#check_data_quality - - CollectionSpace::Mapper::DataPrepper#combine_data_values - - CollectionSpace::Mapper::DataPrepper#do_splits - - CollectionSpace::Mapper::DataPrepper#do_term_handling - - CollectionSpace::Mapper::DataPrepper#do_transforms - - CollectionSpace::Mapper::DataPrepper#get_source_type - - CollectionSpace::Mapper::DataPrepper#process_xpaths - - CollectionSpace::Mapper::DataPrepper#structured_date_transform - - CollectionSpace::Mapper::DataPrepper#transform_value - - CollectionSpace::Mapper::DataPrepper#unstructured_date_transform - - CollectionSpace::Mapper::DataQualityChecker#check_opt_list_vals - - CollectionSpace::Mapper::DataQualityChecker#initialize - - CollectionSpace::Mapper::DataQualityChecker#validate_refnames - - CollectionSpace::Mapper::SubgroupSplitter#initialize - - CollectionSpace::Mapper::DataValidator#check_required_fields - - CollectionSpace::Mapper::DataValidator#get_id_field - - CollectionSpace::Mapper::DataValidator#validate - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#flip_response - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#initialize - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#push_errors_and_warnings - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#stringify_item - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#transform_terms - - CollectionSpace::Mapper::TermHandler#handle_term - - CollectionSpace::Mapper::TermHandler#handle_terms - - CollectionSpace::Mapper::TermHandler#initialize - - CollectionSpace::Mapper::TermSearchable#obj_csid - - CollectionSpace::Mapper::TermSearchable#response_term_refname - - CollectionSpace::Mapper::TermSearchable#term_csid - - CollectionSpace::Mapper::Tools::Config#symbolize_transforms - - CollectionSpace::Mapper::Tools::Config#validate - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#create_mappable_month - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#initialize - - CollectionSpace::Mapper::Tools::RecordStatusService#count_results - - CollectionSpace::Mapper::Tools::RecordStatusService#get_service - - CollectionSpace::Mapper::Tools::RecordStatusService#initialize - - CollectionSpace::Mapper::Tools::RecordStatusService#lookup - - CollectionSpace::Mapper::Tools::RecordStatusService#lookup_non_relationship - - CollectionSpace::Mapper::ValueTransformer#process_replacements - - CollectionSpace::Mapper#merge_default_values - - CollectionSpace::Mapper#term_key - FeatureEnvy: - exclude: - - CollectionSpace::Mapper::DataHandler#check_fields - - CollectionSpace::Mapper::DataHandler#set_record_status - - CollectionSpace::Mapper::DataHandler#tag_terms - - CollectionSpace::Mapper::DataHandler#xpath_hash - - CollectionSpace::Mapper::DataMapper#add_namespaces - - CollectionSpace::Mapper::DataMapper#clean_doc - - CollectionSpace::Mapper::DataMapper#map - - CollectionSpace::Mapper::DataMapper#map_group - - CollectionSpace::Mapper::DataPrepper#do_date_transforms - - CollectionSpace::Mapper::DataPrepper#transform_value - - CollectionSpace::Mapper::DataValidator#check_required_fields - - CollectionSpace::Mapper::DataValidator#get_id_field - - CollectionSpace::Mapper::DataValidator#get_required_fields - - CollectionSpace::Mapper::DataValidator#validate - - CollectionSpace::Mapper::RequiredField#populated_in? - - CollectionSpace::Mapper::Tools::Config#symbolize_transforms - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#coerced_year_date - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#fix_services_scalars - - CollectionSpace::Mapper::Tools::RecordStatusService#count_results - - CollectionSpace::Mapper#setup_data - InstanceVariableAssumption: - exclude: - - CollectionSpace::Mapper::AuthorityHierarchyPrepper - - CollectionSpace::Mapper::DataPrepper - - CollectionSpace::Mapper::DataQualityChecker - - CollectionSpace::Mapper::SimpleSplitter - - CollectionSpace::Mapper::SubgroupSplitter - - CollectionSpace::Mapper::MultiColumnRequiredField - - CollectionSpace::Mapper::SingleColumnRequiredField - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper - - CollectionSpace::Mapper::Tools::Dates::CspaceDate - - CollectionSpace::Mapper::Tools::RefName - IrresponsibleModule: - exclude: - - CollectionSpace::Mapper::AuthorityHierarchyPrepper - - CollectionSpace::Mapper::DataMapper - - CollectionSpace::Mapper::DataPrepper - - CollectionSpace::Mapper::DataQualityChecker - - CollectionSpace::Mapper::DataSplitter - - CollectionSpace::Mapper::SimpleSplitter - - CollectionSpace::Mapper::SubgroupSplitter - - CollectionSpace::Mapper::DataValidator - - CollectionSpace::Mapper::IdFieldNotInMapperError - - CollectionSpace::Mapper::MultiColumnRequiredField - - CollectionSpace::Mapper::RequiredField - - CollectionSpace::Mapper::SingleColumnRequiredField - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper - - CollectionSpace::Mapper::Response - - CollectionSpace::Mapper::TermHandler - - CollectionSpace::Mapper::TermSearchable - - CollectionSpace::Mapper::Errors::ConfigKeyMissingError - - CollectionSpace::Mapper::Errors::ConfigResponseModeError - - CollectionSpace::Mapper::Errors::UnhandledConfigFormatError - - CollectionSpace::Mapper::Tools::Config - - CollectionSpace::Mapper::Tools::Dates - - CollectionSpace::Mapper::Tools::Dates::CspaceDate - - CollectionSpace::Mapper::Tools::Identifiers - - CollectionSpace::Mapper::MultipleCsRecordsFoundError - - CollectionSpace::Mapper::Tools::RecordStatusService - - CollectionSpace::Mapper::Tools::RefName - - CollectionSpace::Mapper::Tools::RefNameArgumentError - - CollectionSpace::Mapper::ValueTransformer - - CollectionSpace::Mapper - - CollectionSpace::Mapper::Errors::UnprocessableDataError - LongParameterList: - exclude: - - CollectionSpace::Mapper::DataMapper#map_group - - CollectionSpace::Mapper::DataMapper#map_subgroup - - CollectionSpace::Mapper::DataMapper#simple_map - NestedIterators: - exclude: -# DataHandler#xpath_hash is a nightmare that needs to be its own class or something. -# Don't even start messing with it here. - - CollectionSpace::Mapper::DataHandler#xpath_hash -# - CollectionSpace::Mapper::DataPrepper#combine_data_values - - CollectionSpace::Mapper::DataPrepper#combine_subgroup_values - - CollectionSpace::Mapper::DataPrepper#do_transforms - - CollectionSpace::Mapper::DataPrepper#process_xpaths - - CollectionSpace::Mapper::DataPrepper#structured_date_transform - - CollectionSpace::Mapper::DataPrepper#unstructured_date_transform - - CollectionSpace::Mapper::DataQualityChecker#check_opt_list_vals - - CollectionSpace::Mapper::DataQualityChecker#validate_refnames - - CollectionSpace::Mapper::SubgroupSplitter#initialize - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#transform_terms - - CollectionSpace::Mapper::TermHandler#handle_terms - - CollectionSpace::Mapper::Tools::Config#symbolize_transforms - NilCheck: - exclude: - - CollectionSpace::Mapper::DataHandler#initialize - - CollectionSpace::Mapper::DataMapper#add_namespaces - - CollectionSpace::Mapper::DataMapper#map_subgroup - - CollectionSpace::Mapper::DataPrepper#do_splits - - CollectionSpace::Mapper::DataPrepper#do_term_handling - - CollectionSpace::Mapper::DataValidator#get_id_field - - CollectionSpace::Mapper::TermSearchable#get_vocabulary_term - - CollectionSpace::Mapper::TermSearchable#obj_csid - - CollectionSpace::Mapper::TermSearchable#response_term_refname - - CollectionSpace::Mapper::TermSearchable#term_csid - - CollectionSpace::Mapper#merge_default_values - RepeatedConditional: - exclude: - - CollectionSpace::Mapper::DataHandler - - CollectionSpace::Mapper::DataPrepper - TooManyInstanceVariables: - exclude: - - CollectionSpace::Mapper::AuthorityHierarchyPrepper - - CollectionSpace::Mapper::DataHandler - - CollectionSpace::Mapper::DataMapper - - CollectionSpace::Mapper::DataPrepper - - CollectionSpace::Mapper::DataQualityChecker - - CollectionSpace::Mapper::DataValidator - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper - - CollectionSpace::Mapper::Response - - CollectionSpace::Mapper::TermHandler - - CollectionSpace::Mapper::Tools::Dates::CspaceDate - - CollectionSpace::Mapper::Tools::RecordStatusService - - CollectionSpace::Mapper::Tools::RefName - - CollectionSpace::Mapper::ValueTransformer - TooManyMethods: - exclude: - - CollectionSpace::Mapper::DataHandler - - CollectionSpace::Mapper::DataPrepper - TooManyStatements: - exclude: - - initialize - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#prep - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#transform_terms - - CollectionSpace::Mapper::DataHandler#build_xml - - CollectionSpace::Mapper::DataHandler#map - - CollectionSpace::Mapper::DataHandler#merge_config_transforms - - CollectionSpace::Mapper::DataHandler#process - - CollectionSpace::Mapper::DataHandler#set_record_status - - CollectionSpace::Mapper::DataHandler#tag_terms - - CollectionSpace::Mapper::DataHandler#xpath_hash - - CollectionSpace::Mapper::DataMapper#add_namespaces - - CollectionSpace::Mapper::DataMapper#add_short_id - - CollectionSpace::Mapper::DataMapper#map - - CollectionSpace::Mapper::DataMapper#map_group - - CollectionSpace::Mapper::DataMapper#map_subgroup - - CollectionSpace::Mapper::DataMapper#set_response_identifier - - CollectionSpace::Mapper::DataMapper#simple_map - - CollectionSpace::Mapper::DataPrepper#check_data_quality - - CollectionSpace::Mapper::DataPrepper#combine_data_values - - CollectionSpace::Mapper::DataPrepper#combine_subgroup_values - - CollectionSpace::Mapper::DataPrepper#do_date_transforms - - CollectionSpace::Mapper::DataPrepper#do_splits - - CollectionSpace::Mapper::DataPrepper#do_term_handling - - CollectionSpace::Mapper::DataPrepper#do_transforms - - CollectionSpace::Mapper::DataPrepper#prep - - CollectionSpace::Mapper::DataPrepper#process_xpaths - - CollectionSpace::Mapper::DataPrepper#transform_value - - CollectionSpace::Mapper::DataQualityChecker#check_opt_list_vals - - CollectionSpace::Mapper::DataValidator#check_required_fields - - CollectionSpace::Mapper::DataValidator#get_required_fields - - CollectionSpace::Mapper::DataValidator#validate - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#flip_response - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#prep - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#transform_terms - - CollectionSpace::Mapper::TermHandler#handle_term - - CollectionSpace::Mapper::TermSearchable#obj_csid - - CollectionSpace::Mapper::TermSearchable#response_term_refname - - CollectionSpace::Mapper::TermSearchable#term_csid - - CollectionSpace::Mapper::Tools::Config#validate - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#coerced_year_date - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#create_mappable_date - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#create_mappable_month - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#create_mappable_year - - CollectionSpace::Mapper::Tools::RecordStatusService#lookup - - CollectionSpace::Mapper::Tools::RefName#new_from_urn - - CollectionSpace::Mapper::ValueTransformer#process_boolean - - CollectionSpace::Mapper#merge_default_values - UncommunicativeVariableName: - exclude: - - CollectionSpace::Mapper::AuthorityHierarchyPrepper#clear_unmapped_mappings - - CollectionSpace::Mapper::DataHandler#add_short_id_mapping - - CollectionSpace::Mapper::DataHandler#authority_hierarchy_default_values - - CollectionSpace::Mapper::DataHandler#initialize - - CollectionSpace::Mapper::DataHandler#merge_config_transforms - - CollectionSpace::Mapper::DataHandler#non_hierarchical_relationship_default_values - - CollectionSpace::Mapper::DataHandler#object_hierarchy_default_values - - CollectionSpace::Mapper::DataHandler#set_record_status - - CollectionSpace::Mapper::DataHandler#tag_terms - - CollectionSpace::Mapper::DataHandler#xpath_hash - - CollectionSpace::Mapper::DataMapper#add_short_id - - CollectionSpace::Mapper::DataMapper#map - - CollectionSpace::Mapper::DataMapper#map_group - - CollectionSpace::Mapper::DataMapper#map_subgroup - - CollectionSpace::Mapper::DataMapper#set_response_identifier - - CollectionSpace::Mapper::DataPrepper#combine_data_values - - CollectionSpace::Mapper::DataPrepper#combine_subgroup_values - - CollectionSpace::Mapper::DataPrepper#do_transforms - - CollectionSpace::Mapper::DataPrepper#process_xpaths - - CollectionSpace::Mapper::DataPrepper#structured_date_transform - - CollectionSpace::Mapper::DataPrepper#transform_value - - CollectionSpace::Mapper::DataPrepper#unstructured_date_transform - - CollectionSpace::Mapper::SimpleSplitter#initialize - - CollectionSpace::Mapper::SubgroupSplitter#initialize - - CollectionSpace::Mapper::DataValidator#get_required_fields - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#clear_unmapped_mappings - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#flip_response - - CollectionSpace::Mapper::NonHierarchicalRelationshipPrepper#transform_terms - - CollectionSpace::Mapper::TermSearchable#search_field - - CollectionSpace::Mapper::TermSearchable#searched_term - - CollectionSpace::Mapper::Tools::Config#symbolize_transforms - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#fix_services_scalars - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#initialize - - CollectionSpace::Mapper::Tools::Identifiers#short_identifier - - CollectionSpace::Mapper::ValueTransformer#process_replacements - - CollectionSpace::Mapper#merge_default_values - UnusedParameters: - exclude: - - CollectionSpace::Mapper::Tools::Dates::CspaceDate#map - - CollectionSpace::Mapper::DataPrepper#do_date_transforms UtilityFunction: exclude: - - CollectionSpace::Mapper::DataHandler#get_config - - CollectionSpace::Mapper::DataMapper#even_subgroup_field_values? - - CollectionSpace::Mapper::DataMapper#group_accommodates_subgroup? - - CollectionSpace::Mapper::DataPrepper#combine_subgroup_values - - CollectionSpace::Mapper::DataPrepper#get_source_type - - CollectionSpace::Mapper::TermSearchable#has_caps? - - CollectionSpace::Mapper::Tools::Identifiers#short_identifier - - CollectionSpace::Mapper#merge_default_values - - CollectionSpace::Mapper#term_key -# real -- excluded because they ARE Utility modules + # they ARE Utility modules - CollectionSpace::Mapper::Tools::Symbolizable From 45319adc8db662e1023498c04eefefe232b6157e Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 5 Aug 2021 22:28:47 -0400 Subject: [PATCH 15/19] rubocopping --- .rubocop.yml | 11 + Gemfile | 6 +- Rakefile | 8 +- bin/console | 1 + collectionspace-mapper.gemspec | 10 +- lib/collectionspace/mapper.rb | 17 +- .../mapper/authority_hierarchy_prepper.rb | 7 +- .../mapper/authority_transformer.rb | 2 +- lib/collectionspace/mapper/column_mapping.rb | 10 +- lib/collectionspace/mapper/column_mappings.rb | 3 +- lib/collectionspace/mapper/column_value.rb | 2 +- lib/collectionspace/mapper/config.rb | 16 +- lib/collectionspace/mapper/data_handler.rb | 38 +- lib/collectionspace/mapper/data_mapper.rb | 29 +- lib/collectionspace/mapper/data_prepper.rb | 23 +- .../mapper/data_quality_checker.rb | 4 +- lib/collectionspace/mapper/data_validator.rb | 5 +- .../mapper/find_replace_operation.rb | 2 +- .../mapper/find_replace_transformer.rb | 2 +- .../identifiers/authority_short_identifier.rb | 2 +- .../mapper/identifiers/short_identifier.rb | 4 +- .../non_hierarchical_relationship_prepper.rb | 7 +- .../mapper/object_hierarchy_data_prepper.rb | 7 +- lib/collectionspace/mapper/record_mapper.rb | 12 +- .../mapper/record_mapper_config.rb | 6 +- lib/collectionspace/mapper/response.rb | 9 +- lib/collectionspace/mapper/term_handler.rb | 15 +- lib/collectionspace/mapper/term_searchable.rb | 8 +- lib/collectionspace/mapper/tools/dates.rb | 28 +- .../mapper/tools/record_status_service.rb | 14 +- lib/collectionspace/mapper/tools/refname.rb | 6 +- lib/collectionspace/mapper/transformer.rb | 6 +- lib/collectionspace/mapper/transformers.rb | 4 +- .../mapper/value_transformer.rb | 7 +- lib/collectionspace/mapper/version.rb | 4 +- .../mapper/vocabulary_transformer.rb | 2 +- lib/collectionspace/mapper/xml_template.rb | 4 +- spec/anthro_helpers.rb | 235 +++++--- spec/bonsai_helpers.rb | 35 +- spec/botgarden_helpers.rb | 86 ++- .../mapper/column_mapping_spec.rb | 21 +- .../mapper/column_mappings_spec.rb | 159 +++-- .../mapper/column_value_spec.rb | 35 +- spec/collectionspace/mapper/config_spec.rb | 18 +- .../mapper/data_handler_spec.rb | 132 ++--- .../mapper/data_mapper_anthro_spec.rb | 2 +- .../mapper/data_mapper_bonsai_spec.rb | 2 +- .../mapper/data_mapper_botgarden_spec.rb | 8 +- .../mapper/data_mapper_core_spec.rb | 175 +++--- .../mapper/data_mapper_spec.rb | 41 +- .../mapper/data_prepper_spec.rb | 30 +- .../mapper/data_quality_checker_spec.rb | 6 +- .../mapper/data_splitter_spec.rb | 62 +- .../mapper/data_validator_spec.rb | 51 +- .../mapper/find_replace_operation_spec.rb | 18 +- .../mapper/find_replace_transformer_spec.rb | 8 +- .../mapper/group_column_value_spec.rb | 12 +- .../group_multival_column_value_spec.rb | 16 +- .../mapper/multival_column_value_spec.rb | 12 +- .../mapper/record_mapper_config_spec.rb | 4 +- .../mapper/record_mapper_spec.rb | 14 +- .../regex_find_replace_operation_spec.rb | 16 +- spec/collectionspace/mapper/response_spec.rb | 10 +- spec/collectionspace/mapper/row_data_spec.rb | 12 +- .../mapper/subgroup_column_value_spec.rb | 16 +- .../mapper/term_handler_spec.rb | 82 +-- .../mapper/tools/dates_spec.rb | 30 +- .../tools/record_status_service_spec.rb | 18 +- .../mapper/tools/refname_spec.rb | 10 +- .../mapper/tools/symbolizable_spec.rb | 8 +- .../mapper/transformer_spec.rb | 24 +- .../mapper/transformers_spec.rb | 16 +- .../mapper/value_transformer_spec.rb | 29 +- spec/collectionspace/mapper_spec.rb | 8 +- spec/core_helpers.rb | 545 ++++++++++++------ spec/fcart_helpers.rb | 5 +- spec/helpers.rb | 19 +- spec/lhmc_helpers.rb | 8 +- spec/spec_helper.rb | 7 +- utils/benchmarking/handler_with_cache.rb | 1 - utils/benchmarking/profile.rb | 3 +- utils/csv-to-datahashes.rb | 8 +- utils/datahash_to_csv.rb | 5 +- 83 files changed, 1379 insertions(+), 1024 deletions(-) create mode 100644 .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..2947f02a --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,11 @@ +AllCops: + NewCops: enable + SuggestExtensions: + rubocop-rake: false +Layout/SpaceBeforeBlockBraces: + EnforcedStyle: no_space + EnforcedStyleForEmptyBraces: no_space +Layout/SpaceInsideHashLiteralBraces: + EnforcedStyle: no_space +Lint/RedundantCopDisableDirective: + Enabled: false diff --git a/Gemfile b/Gemfile index 85e9edc8..3ff8b2bd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ -source "https://rubygems.org" -git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } +# frozen_string_literal: true + +source 'https://rubygems.org' +git_source(:github){|repo_name| "https://github.com/#{repo_name}" } ruby '2.7.3' diff --git a/Rakefile b/Rakefile index b7e9ed54..82bb534a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,8 @@ -require "bundler/gem_tasks" -require "rspec/core/rake_task" +# frozen_string_literal: true + +require 'bundler/gem_tasks' +require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) -task :default => :spec +task default: :spec diff --git a/bin/console b/bin/console index 5fc95f63..fbdc5a69 100755 --- a/bin/console +++ b/bin/console @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require 'bundler/setup' require 'collectionspace/mapper' diff --git a/collectionspace-mapper.gemspec b/collectionspace-mapper.gemspec index 45a3819d..7b571431 100644 --- a/collectionspace-mapper.gemspec +++ b/collectionspace-mapper.gemspec @@ -1,3 +1,4 @@ +# frozen_string_literal: true lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) @@ -14,7 +15,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.required_ruby_version = '>= 2.7.3' - + # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' # to allow pushing to a single host or delete this section to allow pushing to any host. if spec.respond_to?(:metadata) @@ -30,11 +31,11 @@ Gem::Specification.new do |spec| # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do + `git ls-files -z`.split("\x0").reject{ |f| f.match(%r{^(test|spec|features)/}) } end spec.bindir = 'exe' - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.executables = spec.files.grep(%r{^exe/}){ |f| File.basename(f) } spec.require_paths = ['lib'] spec.add_dependency 'chronic' @@ -47,6 +48,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'pry-byebug' spec.add_development_dependency 'rake', '>= 13.0.1' spec.add_development_dependency 'rspec', '~> 3.0' + spec.add_development_dependency 'rubocop', '~> 1.18.3' spec.add_development_dependency 'ruby-prof', '~> 1.4.3' spec.add_development_dependency 'time_up', '~> 0.0.7' end diff --git a/lib/collectionspace/mapper.rb b/lib/collectionspace/mapper.rb index 593108c4..98a9077a 100644 --- a/lib/collectionspace/mapper.rb +++ b/lib/collectionspace/mapper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'collectionspace/mapper/version' require 'collectionspace/client' require 'collectionspace/refcache' @@ -19,7 +21,7 @@ module Mapper LOGGER = Logger.new(STDERR) THE_BOMB = "\u{1F4A3}" - + Dir[File.dirname(__FILE__) + 'mapper/tools/*.rb'].sort.each do |file| require "collectionspace/mapper/tools/#{File.basename(file, File.extname(file))}" end @@ -31,8 +33,8 @@ module Mapper end module Errors - class UnprocessableDataError < StandardError - UnprocessableDataError = CollectionSpace::Mapper::Errors::UnprocessableDataError + class UnprocessableDataError < StandardError + UnprocessableDataError = CollectionSpace::Mapper::Errors::UnprocessableDataError attr_reader :input def initialize(message, input) super(message) @@ -47,7 +49,8 @@ def setup_data(data, config = Mapper::Config.new) elsif data.is_a?(CollectionSpace::Mapper::Response) response = data else - raise Errors::UnprocessableDataError.new("Cannot process a #{data.class}. Need a Hash or Mapper::Response", data) + raise Errors::UnprocessableDataError.new("Cannot process a #{data.class}. Need a Hash or Mapper::Response", + data) end response.merged_data.empty? ? merge_default_values(response, config) : response @@ -56,7 +59,7 @@ def setup_data(data, config = Mapper::Config.new) def merge_default_values(data, batchconfig) defaults = batchconfig.default_values return data unless defaults - + mdata = data.orig_data.clone defaults.each do |f, val| if batchconfig.force_defaults @@ -69,10 +72,10 @@ def merge_default_values(data, batchconfig) data.merged_data = mdata.compact.transform_keys(&:downcase) data end - + def term_key(term) "#{term[:refname].type}-#{term[:refname].subtype}-#{term[:refname].display_name}" end - end + end end diff --git a/lib/collectionspace/mapper/authority_hierarchy_prepper.rb b/lib/collectionspace/mapper/authority_hierarchy_prepper.rb index f2c1f904..a52218ed 100644 --- a/lib/collectionspace/mapper/authority_hierarchy_prepper.rb +++ b/lib/collectionspace/mapper/authority_hierarchy_prepper.rb @@ -8,7 +8,7 @@ module Mapper class AuthorityHierarchyPrepper < CollectionSpace::Mapper::DataPrepper include CollectionSpace::Mapper::TermSearchable attr_reader :errors, :warnings, :type, :subtype - + def initialize(data, handler) super @cache = @handler.mapper.termcache @@ -17,7 +17,7 @@ def initialize(data, handler) @errors = [] @warnings = [] end - + def prep set_id split_data @@ -34,13 +34,12 @@ def set_id nt = @response.merged_data['narrower_term'] @response.identifier = "#{bt} > #{nt}" end - + def process_xpaths clear_unmapped_mappings @handler.mapper.xpath = @handler.xpath_hash super end - # these mappings were needed to get data in via template for processing, but # do not actually get used to produce XML diff --git a/lib/collectionspace/mapper/authority_transformer.rb b/lib/collectionspace/mapper/authority_transformer.rb index 54c433ec..c8587d46 100644 --- a/lib/collectionspace/mapper/authority_transformer.rb +++ b/lib/collectionspace/mapper/authority_transformer.rb @@ -7,7 +7,7 @@ module Mapper # transforms authority display name into RefName class AuthorityTransformer < Transformer - + def initialize(opts) super @type = opts[:transform][0] diff --git a/lib/collectionspace/mapper/column_mapping.rb b/lib/collectionspace/mapper/column_mapping.rb index 5b306708..55066239 100644 --- a/lib/collectionspace/mapper/column_mapping.rb +++ b/lib/collectionspace/mapper/column_mapping.rb @@ -6,10 +6,10 @@ module Mapper # :reek:InstanceVariableAssumption is spurious; we are setting the instance variables here # by iterating through the mapper hash. Given that the mapper data is created by the # Untangler, I am trusting it will be consistent and I'm not validating that expected - # keys are present for now. This also makes writing tests onthe methods here a bit easier. + # keys are present for now. This also makes writing tests onthe methods here a bit easier. class ColumnMapping attr_reader :recmapper, :data_type, :fieldname, :in_repeating_group, :is_group, :namespace, :opt_list_values, - :repeats, :source_type, :transforms, :xpath + :repeats, :source_type, :transforms, :xpath def initialize(mapping_hash, recmapper) @recmapper = recmapper mapping_hash.each do |key, value| @@ -26,7 +26,7 @@ def fullpath @fullpath ||= [@namespace, @xpath].flatten.join('/') end - # includes both truly required and "required in template" + # includes both truly required and "required in template" def required? @required.start_with?('y') end @@ -34,12 +34,12 @@ def required? def update_transforms(new_transforms) @transforms = @transforms.merge(new_transforms) end - + private def symbolize_transforms return if @transforms.blank? - + @transforms.transform_keys!(&:to_sym) end end diff --git a/lib/collectionspace/mapper/column_mappings.rb b/lib/collectionspace/mapper/column_mappings.rb index 2fafb481..7b6f4ce2 100644 --- a/lib/collectionspace/mapper/column_mappings.rb +++ b/lib/collectionspace/mapper/column_mappings.rb @@ -11,7 +11,7 @@ class ColumnMappings attr_reader :config def_delegators :@all, :each, :length, :map, :reject!, :select - + def initialize(opts = {}) @mapper = opts[:mapper] @config = @mapper.config @@ -45,6 +45,7 @@ def required_columns def service_type=(mawdule) return unless mawdule + extend(mawdule) end diff --git a/lib/collectionspace/mapper/column_value.rb b/lib/collectionspace/mapper/column_value.rb index 4badc4ea..013cba6a 100644 --- a/lib/collectionspace/mapper/column_value.rb +++ b/lib/collectionspace/mapper/column_value.rb @@ -20,7 +20,7 @@ def self.create(column:, value:, recmapper:, mapping:) MultivalColumnValue.new(column: column, value: value, recmapper: recmapper, mapping: mapping) when 2 GroupColumnValue.new(column: column, value: value, recmapper: recmapper, mapping: mapping) - when 3 #bonsai conservation fertilizerToBeUsed is the only field like this + when 3 # bonsai conservation fertilizerToBeUsed is the only field like this GroupMultivalColumnValue.new(column: column, value: value, recmapper: recmapper, mapping: mapping) when 4 SubgroupColumnValue.new(column: column, value: value, recmapper: recmapper, mapping: mapping) diff --git a/lib/collectionspace/mapper/config.rb b/lib/collectionspace/mapper/config.rb index cae570d8..282d2d99 100644 --- a/lib/collectionspace/mapper/config.rb +++ b/lib/collectionspace/mapper/config.rb @@ -10,12 +10,12 @@ module Mapper # :reek:InstanceVariableAssumption - instance variables are set during initialization class Config attr_reader :delimiter, :subgroup_delimiter, :response_mode, :force_defaults, :check_record_status, - :check_terms, :date_format, :two_digit_year_handling, :transforms, :default_values, - :record_type + :check_terms, :date_format, :two_digit_year_handling, :transforms, :default_values, + :record_type # todo: move default config in here include Tools::Symbolizable - DEFAULT_CONFIG = { delimiter: '|', + DEFAULT_CONFIG = {delimiter: '|', subgroup_delimiter: '^^', response_mode: 'normal', check_terms: true, @@ -40,7 +40,7 @@ def initialize(opts = {}) self.record_type = opts[:record_type] @default_values = {} - + if config.is_a?(String) set_instance_variables(JSON.parse(config)) elsif config.is_a?(Hash) @@ -59,7 +59,7 @@ def hash config = symbolize(config) transforms = config[:transforms] return config unless transforms - + config[:transforms] = symbolize_transforms(transforms) config end @@ -73,6 +73,7 @@ def add_default_value(column, value) def record_type=(mawdule) return unless mawdule + extend(mawdule) end @@ -80,6 +81,7 @@ def to_h hash = {} instance_variables.each do |var| next if var == :@record_type + key = var.to_s.delete('@').to_sym hash[key] = instance_variable_get(var) end @@ -89,7 +91,7 @@ def to_h def set_instance_variables(hash) hash.each{ |key, value| instance_variable_set("@#{key}", value) } end - + def validate begin has_required_attributes @@ -111,7 +113,7 @@ def valid_response_mode raise ConfigResponseModeError.new("Invalid response_mode value in config: #{@response_mode}") end end - + def has_required_attributes required_keys = DEFAULT_CONFIG.keys remaining_keys = required_keys - hash.keys diff --git a/lib/collectionspace/mapper/data_handler.rb b/lib/collectionspace/mapper/data_handler.rb index 8fe28dbd..a39738b1 100644 --- a/lib/collectionspace/mapper/data_handler.rb +++ b/lib/collectionspace/mapper/data_handler.rb @@ -22,13 +22,13 @@ def initialize(record_mapper:, client:, cache: nil, config: {}) end def process(data) - prepped = prep(data) - case @mapper.record_type - when 'nonhierarchicalrelationship' - prepped.responses.map{ |response| map(response, prepped.xphash) } - else - map(prepped.response, prepped.xphash) - end + prepped = prep(data) + case @mapper.record_type + when 'nonhierarchicalrelationship' + prepped.responses.map{ |response| map(response, prepped.xphash) } + else + map(prepped.response, prepped.xphash) + end end def prep(data) @@ -52,7 +52,7 @@ def prep(data) response end end - + def map(response, xphash) mapper = CollectionSpace::Mapper::DataMapper.new(response, self, xphash) result = mapper.response @@ -60,19 +60,19 @@ def map(response, xphash) @mapper.batchconfig.check_record_status ? set_record_status(result) : result.record_status = :new @mapper.batchconfig.response_mode == 'normal' ? result.normal : result end - + def check_fields(data) data_fields = data.keys.map(&:downcase) unknown = data_fields - @mapper.mappings.known_columns known = data_fields - unknown - { known_fields: known, unknown_fields: unknown } + {known_fields: known, unknown_fields: unknown} end # this is surfaced in public interface because it is used by cspace-batch-import def service_type @mapper.config.service_type end - + def validate(data) response = CollectionSpace::Mapper::setup_data(data, @mapper.batchconfig) validator.validate(response) @@ -93,7 +93,8 @@ def xpath_hash h = {} # create key for each xpath containing fields, and set up structure of its value @mapper.mappings.each do |mapping| - h[mapping.fullpath] = {parent: '', children: [], is_group: false, is_subgroup: false, subgroups: [], mappings: []} + h[mapping.fullpath] = +{parent: '', children: [], is_group: false, is_subgroup: false, subgroups: [], mappings: []} end # add fieldmappings for children of each xpath @mapper.mappings.each do |mapping| @@ -115,7 +116,7 @@ def xpath_hash keys = h.keys - [xpath] ph[:children] = keys.select{ |k| k.start_with?(xpath) } end - + # populate subgroups h.each do |xpath, ph| keys = h.keys - [xpath] @@ -131,7 +132,8 @@ def xpath_hash if v.size > 1 puts "WARNING: #{xpath} has fields with different :in_repeating_group values (#{v}). Defaulting to treating NOT as a group" end - ph[:is_group] = true if ct == 1 && v == ['as part of larger repeating group'] && ph[:mappings][0].repeats == 'y' + ph[:is_group] = +true if ct == 1 && v == ['as part of larger repeating group'] && ph[:mappings][0].repeats == 'y' end # populate is_subgroup @@ -141,7 +143,7 @@ def xpath_hash h.keys.each{ |k| h[k][:is_subgroup] = true if subgroups.include?(k) } h end - + private def set_record_status(response) @@ -188,20 +190,20 @@ def tag_terms(result) terms.select{ |t| t[:found] }.each do |term| term[:found] = false if @new_terms.key?(CollectionSpace::Mapper::term_key(term)) end - + result.terms = terms end def validator @validator ||= CS::Mapper::DataValidator.new(@mapper, @mapper.termcache) end - + # you can specify per-data-key transforms in your config.json # This method merges the config.json transforms into the CollectionSpace::Mapper::RecordMapper field # mappings for the appropriate fields def merge_config_transforms return unless @mapper.batchconfig.transforms - + @mapper.batchconfig.transforms.transform_keys!(&:downcase) @mapper.batchconfig.transforms.each do |data_column, transforms| target_mapping = transform_target(data_column) diff --git a/lib/collectionspace/mapper/data_mapper.rb b/lib/collectionspace/mapper/data_mapper.rb index 20e29c61..bdd81af9 100644 --- a/lib/collectionspace/mapper/data_mapper.rb +++ b/lib/collectionspace/mapper/data_mapper.rb @@ -9,11 +9,11 @@ def initialize(response, handler, xphash) @response = response @handler = handler @xphash = xphash - + @data = @response.combined_data @doc = @handler.mapper.xml_template.blankdoc @cache = @handler.mapper.termcache - + @xphash.each{ |xpath, hash| map(xpath, hash) } add_short_id if @handler.mapper.service_type == CS::Mapper::Authority set_response_identifier @@ -33,7 +33,7 @@ def set_response_identifier mapping = @handler.mapper.mappings.select{ |mapper| mapper.fieldname == id_field }.first thexpath = "//#{mapping.namespace}/#{mapping.fieldname}" value = @doc.xpath(thexpath).first - value = value.text + value = value.text @response.identifier = value end end @@ -46,7 +46,7 @@ def set_relation_id @response.identifier = "#{broad} > #{narrow}" end end - + def add_short_id term = @response.transformed_data['termdisplayname'][0] targetnode = @doc.xpath("/document/#{@handler.mapper.config.common_namespace}").first @@ -67,7 +67,7 @@ def map(xpath, xphash) map_subgroup(xphash, thisdata) end end - + def clean_doc @doc.traverse do |node| node.remove if node.text == '%NULLVALUE%' @@ -80,7 +80,7 @@ def defuse_bomb node.content = '' if node.text == THE_BOMB end end - + def add_namespaces @doc.xpath('/*/*').each do |section| fetchuri = @handler.mapper.config.ns_uri[section.name] @@ -99,7 +99,7 @@ def map_structured_date(groupname, hash) target.add_child(child) end end - + def simple_map(xphash, parent, thisdata) xphash[:mappings].each do |field_mapping| field_name = field_mapping.fieldname @@ -119,15 +119,15 @@ def populate_simple_field_data(field_name, data, parent) parent.add_child(child) end end - + def populate_group_field_data(index, data, parent) data.each do |field, values| if values[index] child = Nokogiri::XML::Node.new(field, @doc) if values[index].is_a?(Hash) - map_structured_date(child, values[index]) + map_structured_date(child, values[index]) else values[index] - child.content = values[index] + child.content = values[index] end parent.add_child(child) end @@ -158,7 +158,7 @@ def map_subgroups_to_group(group, target) populate_subgroup_field_data(field, data, target) end end - + def map_group(xpath, targetnode, thisdata) pnode = targetnode.parent groupname = targetnode.name.dup @@ -232,10 +232,11 @@ def subgroup_value_count(values) def assign_subgroup_values_to_group_hash_data(groups, field, subgroups) subgroups.each_with_index do |subgroup_values, group_index| next if groups[group_index].nil? + groups[group_index][:data][field] = subgroup_values end end - + def map_subgroup(xphash, thisdata) parent_path = xphash[:parent] parent_set = @doc.xpath("//#{parent_path}") @@ -246,7 +247,7 @@ def map_subgroup(xphash, thisdata) groups = {} # populated it with parent group for each subgroup, keyed by group index parent_set.each_with_index do |p, i| - groups[i] = { parent: p, data: {} } + groups[i] = {parent: p, data: {}} end add_uneven_subgroup_warning(parent_path: parent_path, @@ -255,7 +256,7 @@ def map_subgroup(xphash, thisdata) add_too_many_subgroups_warning(parent_path: parent_path, intervening_path: subgroup_path, subgroup: subgroup) unless group_accommodates_subgroup?(groups, thisdata) - + thisdata.each{ |field, subgroups| assign_subgroup_values_to_group_hash_data(groups, field, subgroups) } groups.values.each{ |grp| create_intermediate_subgroup_hierarchy(grp, subgroup_path) } diff --git a/lib/collectionspace/mapper/data_prepper.rb b/lib/collectionspace/mapper/data_prepper.rb index 1c1aa5aa..f2359f80 100644 --- a/lib/collectionspace/mapper/data_prepper.rb +++ b/lib/collectionspace/mapper/data_prepper.rb @@ -27,7 +27,7 @@ def prep combine_data_fields self end - + def split_data @xphash.each{ |xpath, hash| do_splits(hash) } @response.split_data @@ -49,7 +49,7 @@ def handle_term_fields @response.errors.flatten! @response.transformed_data end - + def check_data @xphash.each{ |xpath, hash| check_data_quality(hash) } @response.warnings.flatten! @@ -63,7 +63,7 @@ def combine_data_fields private - #used by NonHierarchicalRelationshipPrepper and AuthorityHierarchyPrepper + # used by NonHierarchicalRelationshipPrepper and AuthorityHierarchyPrepper def push_errors_and_warnings unless errors.empty? @response.errors << errors @@ -103,13 +103,15 @@ def do_splits(xphash) data = @response.merged_data.fetch(column, nil) next if data.nil? || data.empty? - @response.split_data[column] = mapping.repeats == 'y' ? CollectionSpace::Mapper::SimpleSplitter.new(data, @config).result : [data.strip] + @response.split_data[column] = +mapping.repeats == 'y' ? CollectionSpace::Mapper::SimpleSplitter.new(data, @config).result : [data.strip] end elsif xphash[:is_group] == true && xphash[:is_subgroup] == false xphash[:mappings].each do |mapping| column = mapping.datacolumn data = @response.merged_data.fetch(column, nil) next if data.nil? || data.empty? + @response.split_data[column] = CollectionSpace::Mapper::SimpleSplitter.new(data, @config).result end elsif xphash[:is_group] && xphash[:is_subgroup] @@ -117,6 +119,7 @@ def do_splits(xphash) column = mapping.datacolumn data = @response.merged_data.fetch(column, nil) next if data.nil? || data.empty? + @response.split_data[column] = CollectionSpace::Mapper::SubgroupSplitter.new(data, @config).result end end @@ -129,6 +132,7 @@ def do_transforms(xphash) column = mapping.datacolumn data = splitdata.fetch(column, nil) next if data.blank? + if mapping.transforms.blank? targetdata[column] = data else @@ -162,7 +166,7 @@ def do_date_transforms(xpath, xphash) xphash[:mappings].each do |mapping| column = mapping.datacolumn type = mapping.data_type - + data = sourcedata.fetch(column, nil) next if data.blank? @@ -174,7 +178,7 @@ def do_date_transforms(xpath, xphash) sourcedata[column] = unstructured_date_transform(data) end else - sourcedata[column] = data + sourcedata[column] = data end end end @@ -184,10 +188,10 @@ def do_term_handling(xphash) xphash[:mappings].each do |mapping| source_type = get_source_type(mapping.source_type) next if source_type.nil? - + column = mapping.datacolumn next if column['refname'] - + data = sourcedata.fetch(column, nil) next if data.blank? @@ -213,7 +217,7 @@ def get_source_type(source_type_string) nil end end - + def structured_date_transform(data) data.map do |d| if d.is_a?(String) @@ -251,6 +255,7 @@ def check_data_quality(xphash) xphash[:mappings].each do |mapping| data = xformdata[mapping.datacolumn] next if data.blank? + qc = CollectionSpace::Mapper::DataQualityChecker.new(mapping, data) @response.warnings << qc.warnings unless qc.warnings.empty? end diff --git a/lib/collectionspace/mapper/data_quality_checker.rb b/lib/collectionspace/mapper/data_quality_checker.rb index 8a6d0974..d052cc04 100644 --- a/lib/collectionspace/mapper/data_quality_checker.rb +++ b/lib/collectionspace/mapper/data_quality_checker.rb @@ -40,6 +40,7 @@ def validate_refname(val) } pattern = Regexp.new("^urn:cspace:.+#{type_segment[@source_type]}name\(.+\):item:name(.+)'.+'$") return if val.match?(pattern) + @warnings << { category: :malformed_refname_value, field: @column, @@ -61,13 +62,14 @@ def check_opt_list_vals def check_opt_list_val(val) return if @opts.include?(val) + @warnings << { category: :unknown_option_list_value, field: @column, type: 'option list value', subtype: '', value: val, - message: "Unknown value in option list `#{@column}` column" + message: "Unknown value in option list `#{@column}` column" } end end diff --git a/lib/collectionspace/mapper/data_validator.rb b/lib/collectionspace/mapper/data_validator.rb index dfe7611b..f6e46e76 100644 --- a/lib/collectionspace/mapper/data_validator.rb +++ b/lib/collectionspace/mapper/data_validator.rb @@ -67,7 +67,7 @@ def empty_message # checks incoming data before mapping to ensure the necessary data is present to do the mapping class DataValidator class IdFieldNotInMapperError < StandardError; end - + attr_reader :mapper, :cache, :required_fields def initialize(record_mapper, cache) @mapper = record_mapper @@ -93,12 +93,13 @@ def validate(data) response end end - + private def get_id_field idfield = @mapper.config.identifier_field raise IdFieldNotInMapperError if idfield.nil? + idfield.nil? ? nil : idfield.downcase end diff --git a/lib/collectionspace/mapper/find_replace_operation.rb b/lib/collectionspace/mapper/find_replace_operation.rb index 145af6d1..1e3e828c 100644 --- a/lib/collectionspace/mapper/find_replace_operation.rb +++ b/lib/collectionspace/mapper/find_replace_operation.rb @@ -12,7 +12,7 @@ def initialize(opts) def perform(value) return value if value.blank? - + value.gsub(@find, @replace) end diff --git a/lib/collectionspace/mapper/find_replace_transformer.rb b/lib/collectionspace/mapper/find_replace_transformer.rb index e8277a45..88ab1c56 100644 --- a/lib/collectionspace/mapper/find_replace_transformer.rb +++ b/lib/collectionspace/mapper/find_replace_transformer.rb @@ -12,7 +12,7 @@ def initialize(transform:) super @operations = transform.map{ |operation| FindReplaceOperation.create(operation) } end - + def transform(value) return value if value.blank? diff --git a/lib/collectionspace/mapper/identifiers/authority_short_identifier.rb b/lib/collectionspace/mapper/identifiers/authority_short_identifier.rb index 36400422..85e19f4f 100644 --- a/lib/collectionspace/mapper/identifiers/authority_short_identifier.rb +++ b/lib/collectionspace/mapper/identifiers/authority_short_identifier.rb @@ -20,7 +20,7 @@ def value def hashed_term XXhash.xxh32(prepped_term) end - end + end end end end diff --git a/lib/collectionspace/mapper/identifiers/short_identifier.rb b/lib/collectionspace/mapper/identifiers/short_identifier.rb index 61512857..e3147f22 100644 --- a/lib/collectionspace/mapper/identifiers/short_identifier.rb +++ b/lib/collectionspace/mapper/identifiers/short_identifier.rb @@ -14,11 +14,11 @@ def value end private - + def prepped_term @term.gsub(/\W/, '') end - end + end end end end diff --git a/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb b/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb index 49bae086..748ce314 100644 --- a/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb +++ b/lib/collectionspace/mapper/non_hierarchical_relationship_prepper.rb @@ -8,7 +8,7 @@ module Mapper class NonHierarchicalRelationshipPrepper < CollectionSpace::Mapper::DataPrepper include CollectionSpace::Mapper::TermSearchable attr_reader :errors, :warnings, :responses - + def initialize(data, handler) super @cache = @handler.mapper.termcache @@ -17,7 +17,7 @@ def initialize(data, handler) @warnings = [] @responses = [] end - + def prep @response.identifier = "#{stringify_item(1)} -> #{stringify_item(2)}" split_data @@ -42,7 +42,7 @@ def stringify_item(item_number) def flip_response resp2 = @response.dup resp2.identifier = "#{stringify_item(2)} -> #{stringify_item(1)}" - resp2.combined_data = {'relations_common'=>{}} + resp2.combined_data = {'relations_common' => {}} origrel = @response.combined_data['relations_common']['relationshipType'] origsub = @response.combined_data['relations_common']['subjectCsid'] origobj = @response.combined_data['relations_common']['objectCsid'] @@ -57,7 +57,6 @@ def process_xpaths @handler.mapper.xpath = @handler.xpath_hash super end - # these mappings were needed to get data in via template for processing, but # do not actually get used to produce XML diff --git a/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb b/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb index 7e2a0e13..59198d0e 100644 --- a/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb +++ b/lib/collectionspace/mapper/object_hierarchy_data_prepper.rb @@ -8,7 +8,7 @@ module Mapper class ObjectHierarchyPrepper < CollectionSpace::Mapper::DataPrepper include CollectionSpace::Mapper::TermSearchable attr_reader :errors, :warnings, :type - + def initialize(data, handler) super @cache = @handler.mapper.termcache @@ -16,7 +16,7 @@ def initialize(data, handler) @errors = [] @warnings = [] end - + def prep set_id split_data @@ -33,13 +33,12 @@ def set_id nt = @response.merged_data['narrower_object_number'] @response.identifier = "#{bt} > #{nt}" end - + def process_xpaths clear_unmapped_mappings @handler.mapper.xpath = @handler.xpath_hash super end - # these mappings were needed to get data in via template for processing, but # do not actually get used to produce XML diff --git a/lib/collectionspace/mapper/record_mapper.rb b/lib/collectionspace/mapper/record_mapper.rb index 9646dd3f..bf9cc6d6 100644 --- a/lib/collectionspace/mapper/record_mapper.rb +++ b/lib/collectionspace/mapper/record_mapper.rb @@ -10,17 +10,17 @@ module Mapper # The RecordMapper bundles up all the info needed by various other classes in order # to transform and map incoming data into CollectionSpace XML, so it gets passed # around to everything as a kind of mondo-configuration-object, which is probably - # terrible OOD but better than what I had before? + # terrible OOD but better than what I had before? # :reek:Attribute - when I get rid of xphash, this will go away # :reek:InstanceVariableAssumption - instance variable gets set by convert class RecordMapper include Tools::Symbolizable - + attr_reader :batchconfig, :config, :termcache, :mappings, :xml_template, :csclient attr_accessor :xpath - + def initialize(opts) jhash = opts[:mapper].is_a?(Hash) ? opts[:mapper] : JSON.parse(opts[:mapper]) convert(jhash) @@ -29,7 +29,7 @@ def initialize(opts) @termcache = opts[:termcache] @xpath = {} end - + def record_type @config.recordtype end @@ -46,14 +46,14 @@ def service_type record_type_extension end end - + private def convert(json) hash = symbolize(json) @config = CS::Mapper::RecordMapperConfig.new(hash[:config]) @xml_template = CS::Mapper::XmlTemplate.new(hash[:docstructure]) - @mappings = CS::Mapper::ColumnMappings.new(mappings: hash[:mappings], + @mappings = CS::Mapper::ColumnMappings.new(mappings: hash[:mappings], mapper: self) end diff --git a/lib/collectionspace/mapper/record_mapper_config.rb b/lib/collectionspace/mapper/record_mapper_config.rb index 23c288e6..c36fa702 100644 --- a/lib/collectionspace/mapper/record_mapper_config.rb +++ b/lib/collectionspace/mapper/record_mapper_config.rb @@ -9,8 +9,8 @@ module Mapper # keys are present for now. This also makes writing tests on the methods here a bit easier. class RecordMapperConfig attr_reader :profile_basename, :document_name, :service_name, :service_path, :service_type, - :object_name, :ns_uri, :identifier_field, :search_field, :authority_subtypes, - :authority_type, :authority_subtype, :recordtype + :object_name, :ns_uri, :identifier_field, :search_field, :authority_subtypes, + :authority_type, :authority_subtype, :recordtype def initialize(config_hash) config_hash.each do |key, value| @@ -21,7 +21,7 @@ def initialize(config_hash) def common_namespace namespaces.select{ |namespace| namespace.end_with?('_common') }.first end - + def namespaces @ns_uri.keys end diff --git a/lib/collectionspace/mapper/response.rb b/lib/collectionspace/mapper/response.rb index f0f01716..aa3ab09a 100644 --- a/lib/collectionspace/mapper/response.rb +++ b/lib/collectionspace/mapper/response.rb @@ -4,7 +4,8 @@ module CollectionSpace module Mapper class Response attr_reader :orig_data - attr_accessor :split_data, :merged_data, :transformed_data, :combined_data, :doc, :errors, :warnings, :identifier, :terms, :record_status, :csid, :uri, :refname + attr_accessor :split_data, :merged_data, :transformed_data, :combined_data, :doc, :errors, :warnings, + :identifier, :terms, :record_status, :csid, :uri, :refname def initialize(data_hash) @orig_data = data_hash @merged_data = {} @@ -24,9 +25,9 @@ def valid? def normal @merged_data = {} - @split_data = {} - @transformed_data = {} - @combined_data = {} + @split_data = {} + @transformed_data = {} + @combined_data = {} self end diff --git a/lib/collectionspace/mapper/term_handler.rb b/lib/collectionspace/mapper/term_handler.rb index 7bd4ed93..56e0b9c6 100644 --- a/lib/collectionspace/mapper/term_handler.rb +++ b/lib/collectionspace/mapper/term_handler.rb @@ -6,9 +6,9 @@ module CollectionSpace module Mapper class TermHandler include TermSearchable - + attr_reader :result, :terms, :warnings, :errors, - :column, :source_type, :type, :subtype + :column, :source_type, :type, :subtype attr_accessor :value def initialize(mapping:, data:, client:, cache:, mapper:) @mapping = mapping @@ -16,7 +16,7 @@ def initialize(mapping:, data:, client:, cache:, mapper:) @client = client @cache = cache @mapper = mapper - + @column = mapping.datacolumn @field = mapping.fieldname @config = @mapper.batchconfig @@ -50,8 +50,9 @@ def handle_term(val) @value = val return '' if val.blank? || val == '%NULLVALUE%' return THE_BOMB if val == THE_BOMB + added = false - + term_report = { category: source_type, field: column @@ -80,7 +81,7 @@ def handle_term(val) subtype: subtype, term: val, cache: @cache) - @terms << term_report.merge({ found: false, refname: refname_obj }) + @terms << term_report.merge({found: false, refname: refname_obj}) @cache.put(type, subtype, val, refname_obj.urn) refname_urn = refname_obj.urn end @@ -97,8 +98,8 @@ def cached_term(val) def add_found_term(refname_urn, term_report) refname_obj = CollectionSpace::Mapper::Tools::RefName.new(urn: refname_urn) - found = @config.check_terms ? true : false - @terms << term_report.merge({ found: found, refname: refname_obj }) + found = @config.check_terms ? true : false + @terms << term_report.merge({found: found, refname: refname_obj}) end end end diff --git a/lib/collectionspace/mapper/term_searchable.rb b/lib/collectionspace/mapper/term_searchable.rb index c516d7f2..1828571b 100644 --- a/lib/collectionspace/mapper/term_searchable.rb +++ b/lib/collectionspace/mapper/term_searchable.rb @@ -25,7 +25,7 @@ def get_vocabulary_term(vocab:, term:) def has_caps?(string) string.match?(/[A-Z]/) ? true : false end - + def searched_term(val) begin response = @client.find( @@ -77,7 +77,7 @@ def obj_csid(objnum, type) end return csid if csid.nil? - + @cache.put(type, '', objnum, csid) return csid else @@ -131,7 +131,7 @@ def term_csid(term) end return csid if csid.nil? - + @cache.put(type, subtype, term, csid) return csid else @@ -168,7 +168,7 @@ def response_term_refname(response) end refname end - + def search_field begin field = CollectionSpace::Service.get(type: type)[:term] diff --git a/lib/collectionspace/mapper/tools/dates.rb b/lib/collectionspace/mapper/tools/dates.rb index 530baf5f..6de3caba 100644 --- a/lib/collectionspace/mapper/tools/dates.rb +++ b/lib/collectionspace/mapper/tools/dates.rb @@ -24,16 +24,16 @@ def initialize(date_string, client, cache, config) @ce = "urn:cspace:#{@cache.domain}:vocabularies:name(dateera):item:name(ce)'CE'" date_formats = [ - '^\d{1,2}[-\/]\d{1,2}[-\/]\d{4}$', #02-15-2020, 2-15-2020, 2/15/2020, 02/15/2020 - '^\d{4}-\d{2}-\d{2}$', #2020-02-15 - '^\w+ \d{1,2},? \d{4}$', #Feb 15 2020, February 15, 2020 - '^\d{1,2} \w+ \d{4}$' #15 Feb 2020, 15 February 2020 + '^\d{1,2}[-\/]\d{1,2}[-\/]\d{4}$', # 02-15-2020, 2-15-2020, 2/15/2020, 02/15/2020 + '^\d{4}-\d{2}-\d{2}$', # 2020-02-15 + '^\w+ \d{1,2},? \d{4}$', # Feb 15 2020, February 15, 2020 + '^\d{1,2} \w+ \d{4}$' # 15 Feb 2020, 15 February 2020 ].map{ |f| Regexp.new(f) } two_digit_year_date_formats = [ '^\d{1,2}[-\/]\d{1,2}[-\/]\d{2}$' ].map{ |f| Regexp.new(f) } - + service_parseable_month_formats = [ '^\w+ \d{4}$', '^\d{4} \w+$', @@ -45,7 +45,7 @@ def initialize(date_string, client, cache, config) ].map{ |f| Regexp.new(f) } if date_string == '%NULLVALUE%' - #do nothing + # do nothing elsif date_string == THE_BOMB @timestamp = date_string blow_up_date @@ -82,13 +82,13 @@ def coerced_year_date this_year_last_two = this_year[2,2].to_i if yr.to_i > this_year_last_two - val << "#{this_year_century.to_i - 1}#{yr}" + val << "#{this_year_century.to_i - 1}#{yr}" else val << "#{this_year_century}#{yr}" end val.join('-') end - + def try_chronic_parse(string) if @config.date_format == 'day month year' @timestamp = Chronic.parse(string, endian_precedence: :little) @@ -100,11 +100,11 @@ def try_chronic_parse(string) def create_mappable_passthrough @mappable['dateDisplayDate'] = @date_string end - + def create_mappable_date date = @timestamp.to_date next_day = date + 1 - + @mappable['dateDisplayDate'] = @date_string @mappable['dateEarliestSingleYear'] = date.year.to_s @mappable['dateEarliestSingleMonth'] = date.month.to_s @@ -131,7 +131,7 @@ def create_mappable_month month = @date_string.sub(year.to_s, '').match(/(\d{1,2})/)[1].to_i next_month = month + 1 last_day_of_month = Date.new(year, month, -1).day - + @mappable['dateDisplayDate'] = @date_string @mappable['dateEarliestSingleYear'] = year.to_s @mappable['dateEarliestSingleMonth'] = month.to_s @@ -149,7 +149,7 @@ def create_mappable_month def create_mappable_year year = @date_string next_year = @date_string.to_i + 1 - + @mappable['dateDisplayDate'] = @date_string @mappable['dateEarliestSingleYear'] = year @mappable['dateEarliestSingleMonth'] = '1' @@ -171,7 +171,7 @@ def try_services_query result = response.result['structureddate_common'] @mappable = fix_services_scalars(result) else - @mappable = { 'dateDisplayDate' => date_string, + @mappable = {'dateDisplayDate' => date_string, 'scalarValuesComputed' => 'false' } end @@ -191,7 +191,7 @@ def fix_services_scalars(services_result) def map(doc, parentnode, groupname) @parser_result.each do |datefield, value| - value = DateTime.parse(value).iso8601(3).sub('+00:00', "Z") if datefield['ScalarValue'] + value = DateTime.parse(value).iso8601(3).sub('+00:00', 'Z') if datefield['ScalarValue'] end end end diff --git a/lib/collectionspace/mapper/tools/record_status_service.rb b/lib/collectionspace/mapper/tools/record_status_service.rb index 426a143b..f9147096 100644 --- a/lib/collectionspace/mapper/tools/record_status_service.rb +++ b/lib/collectionspace/mapper/tools/record_status_service.rb @@ -10,7 +10,7 @@ def initialize(count) end class NoClientServiceError < StandardError; end - + module Tools class RecordStatusService def initialize(client, mapper) @@ -38,7 +38,7 @@ def lookup(value) ct = count_results(response) if ct == 0 - report = { status: :new } + report = {status: :new} elsif ct == 1 report = { status: :existing, @@ -56,10 +56,10 @@ def lookup(value) def lookup_relationship(value) @client.get( - @path, query: { 'sbj' => value[:sub], 'obj' => value[:obj] } + @path, query: {'sbj' => value[:sub], 'obj' => value[:obj]} ) end - + def lookup_non_relationship(value) @client.find( type: @mapper.config.service_path, @@ -68,11 +68,12 @@ def lookup_non_relationship(value) field: @search_field ) end - + def count_results(response) unless response.result.success? raise CollectionSpace::RequestError, response.result.body end + response.parsed[@response_top]['totalItems'].to_i end @@ -84,7 +85,8 @@ def get_service subtype: @mapper.config.authority_subtype ) rescue KeyError - raise CS::Mapper::NoClientServiceError, "#{@mapper.config.authority_type} > #{@mapper.config.authority_subtype}" + raise CS::Mapper::NoClientServiceError, + "#{@mapper.config.authority_type} > #{@mapper.config.authority_subtype}" end else begin diff --git a/lib/collectionspace/mapper/tools/refname.rb b/lib/collectionspace/mapper/tools/refname.rb index 39e61cf6..343d4048 100644 --- a/lib/collectionspace/mapper/tools/refname.rb +++ b/lib/collectionspace/mapper/tools/refname.rb @@ -10,7 +10,7 @@ def initialize(msg='Arguments requires either :urn OR :source_type, :type, :subt end class UnparseableUrnError < StandardError; end - + class RefName attr_reader :domain, :type, :subtype, :identifier, :display_name, :urn @@ -41,9 +41,9 @@ def initialize(args) def build_urn "urn:cspace:#{@domain}:#{@type}:name(#{@subtype}):item:name(#{@identifier})'#{@display_name}'" end - + def new_from_term - + @identifier = CollectionSpace::Mapper::Identifiers::ShortIdentifier.new(term: @display_name).value end diff --git a/lib/collectionspace/mapper/transformer.rb b/lib/collectionspace/mapper/transformer.rb index 49b1477c..f6a30e8c 100644 --- a/lib/collectionspace/mapper/transformer.rb +++ b/lib/collectionspace/mapper/transformer.rb @@ -5,8 +5,8 @@ module Mapper # parent class of the data value Transformer class hierarchy class Transformer - attr_reader :precedence, :warnings - + attr_reader :precedence, :warnings + def initialize(opts = {}) @precedence = lookup_precedence @warnings = [] @@ -18,7 +18,7 @@ def transform(value) def <=>(other) @precedence <=> other.precedence end - + private def lookup_precedence diff --git a/lib/collectionspace/mapper/transformers.rb b/lib/collectionspace/mapper/transformers.rb index c12a782c..5d972058 100644 --- a/lib/collectionspace/mapper/transformers.rb +++ b/lib/collectionspace/mapper/transformers.rb @@ -21,7 +21,7 @@ def initialize(colmapping:, transforms:, recmapper:) def queue @queue.sort end - + private def populate_queue @@ -37,7 +37,7 @@ def populate_queue def data_type_transforms @queue << DateStampTransformer.new if @colmapping.data_type == 'date' @queue << StructuredDateTransformer.new if @colmapping.data_type == 'structured date group' - end + end end end end diff --git a/lib/collectionspace/mapper/value_transformer.rb b/lib/collectionspace/mapper/value_transformer.rb index 47e4b0ca..95e4868a 100644 --- a/lib/collectionspace/mapper/value_transformer.rb +++ b/lib/collectionspace/mapper/value_transformer.rb @@ -22,6 +22,7 @@ def initialize(value, transforms, prepper) def process_replacements return if @value.empty? + @transforms[:replacements].each do |r| case r[:type] when :plain @@ -41,7 +42,7 @@ def process_special obj_num_to_csid if special.include?('obj_num_to_csid') end end - + def process_boolean if @value.blank? @value = 'false' @@ -82,7 +83,7 @@ def process_boolean def obj_num_to_csid @value = obj_csid(@value, 'collectionobjects') end - + def process_behrensmeyer lookup = { '0' => '0 - no cracking or flaking on bone surface', @@ -97,4 +98,4 @@ def process_behrensmeyer end end end - + diff --git a/lib/collectionspace/mapper/version.rb b/lib/collectionspace/mapper/version.rb index 51a2c027..1e021559 100644 --- a/lib/collectionspace/mapper/version.rb +++ b/lib/collectionspace/mapper/version.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + module CollectionSpace module Mapper - VERSION = "2.4.7" + VERSION = '2.4.7' end end diff --git a/lib/collectionspace/mapper/vocabulary_transformer.rb b/lib/collectionspace/mapper/vocabulary_transformer.rb index 4e1121cf..d24f2843 100644 --- a/lib/collectionspace/mapper/vocabulary_transformer.rb +++ b/lib/collectionspace/mapper/vocabulary_transformer.rb @@ -7,7 +7,7 @@ module Mapper # transforms vocabulary term into RefName class VocabularyTransformer < Transformer - + def initialize(opts) super @type = 'vocabularies' diff --git a/lib/collectionspace/mapper/xml_template.rb b/lib/collectionspace/mapper/xml_template.rb index fc304838..18fbf616 100644 --- a/lib/collectionspace/mapper/xml_template.rb +++ b/lib/collectionspace/mapper/xml_template.rb @@ -15,7 +15,7 @@ def initialize(docstructure) def blankdoc build_xml end - + private def build_xml @@ -32,7 +32,7 @@ def create_record_namespace_nodes(xml) end end end - + def process_group(xml, grouppath) @docstructure.dig(*grouppath).keys.each do |key| thispath = grouppath.clone.append(key) diff --git a/spec/anthro_helpers.rb b/spec/anthro_helpers.rb index f65491e1..a4dae142 100644 --- a/spec/anthro_helpers.rb +++ b/spec/anthro_helpers.rb @@ -10,7 +10,7 @@ def anthro_client ) ) end - + def anthro_cache cache_config = base_cache_config.merge({domain: 'anthro.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: anthro_client) @@ -23,86 +23,163 @@ def anthro_object_mapper path = 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json' get_record_mapper_object(path) end - + def populate_anthro(cache) terms = [ - ['conceptauthorities', 'archculture', 'Blackfoot', "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(archculture):item:name(Blackfoot1576172504869)'Blackfoot'"], - ['conceptauthorities', 'concept', 'Birds', "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(concept):item:name(Birds918181)'Birds'"], - ['conceptauthorities', 'ethculture', 'Batak', "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(ethculture):item:name(Batak1576172496916)'Batak'"], - ['conceptauthorities', 'ethculture', 'Got', "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(ethculture):item:name(Got1599824429903)'Got'"], - ['conceptauthorities', 'ethculture', 'Hero', "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(ethculture):item:name(Hero1599824418804)'Hero'"], - ['conceptauthorities', 'material_ca', 'Feathers', "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(material_ca):item:name(Feathers918181)'Feathers'"], - ['orgauthorities', 'organization', 'Hola', "urn:cspace:anthro.collectionspace.org:orgauthorities:name(organization):item:name(Hola1599824351945)'Hola'"], - ['orgauthorities', 'organization', 'Organization 1', "urn:cspace:anthro.collectionspace.org:orgauthorities:name(organization):item:name(Organization11587136583004)'Organization 1'"], - ['orgauthorities', 'organization', 'chores', "urn:cspace:anthro.collectionspace.org:orgauthorities:name(organization):item:name(chores1599824370125)'chores'"], - ['personauthorities', 'person', 'Ann Analyst', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(AnnAnalyst1594848799340)'Ann Analyst'"], - ['personauthorities', 'person', 'Gabriel Solares', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(GabrielSolares1594848906847)'Gabriel Solares'"], - ['personauthorities', 'person', 'Tegla', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(Tegla1599824325923)'Tegla'"], - ['personauthorities', 'person', 'Tom', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(Tom1599824331955)'Tom'"], - ['placeauthorities', 'place', 'Early', "urn:cspace:anthro.collectionspace.org:placeauthorities:name(place):item:name(Early1599824413345)'Early'"], - ['placeauthorities', 'place', 'Local', "urn:cspace:anthro.collectionspace.org:placeauthorities:name(place):item:name(Local1599824385298)'Local'"], - ['placeauthorities', 'place', 'York County, Pennsylvania', "urn:cspace:anthro.collectionspace.org:placeauthorities:name(place):item:name(YorkCountyPennsylvania)'York County, Pennsylvania'"], - ['vocabularies', 'agerange', 'adolescent 26-75%', "urn:cspace:anthro.collectionspace.org:vocabularies:name(agerange):item:name(adolescent_26_75)'adolescent 26-75%'"], - ['vocabularies', 'agerange', 'adult 0-25%', "urn:cspace:anthro.collectionspace.org:vocabularies:name(agerange):item:name(adult_0_25)'adult 0-25%'"], - ['vocabularies', 'annotationtype', 'image made', "urn:cspace:anthro.collectionspace.org:vocabularies:name(annotationtype):item:name(image_made)'image made'"], - ['vocabularies', 'annotationtype', 'type', "urn:cspace:anthro.collectionspace.org:vocabularies:name(annotationtype):item:name(type)'type'"], - ['vocabularies', 'behrensmeyer', '0 - no cracking or flaking on bone surface', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(0)'0 - no cracking or flaking on bone surface'"], - ['vocabularies', 'behrensmeyer', '1 - longitudinal and/or mosaic cracking present on surface', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(1)'1 - longitudinal and/or mosaic cracking present on surface'"], - ['vocabularies', 'behrensmeyer', '2 - longitudinal cracks, exfoliation on surface', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(2)'2 - longitudinal cracks, exfoliation on surface'"], - ['vocabularies', 'behrensmeyer', '3 - fibrous texture, extensive exfoliation', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(3)'3 - fibrous texture, extensive exfoliation'"], - ['vocabularies', 'behrensmeyer', '5 - bone crumbling in situ, large splinters', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(5)'5 - bone crumbling in situ, large splinters'"], - ['vocabularies', 'bodyside', 'midline', "urn:cspace:anthro.collectionspace.org:vocabularies:name(bodyside):item:name(midline)'midline'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'inventorystatus', 'accessioned', "urn:cspace:anthro.collectionspace.org:vocabularies:name(inventorystatus):item:name(accessioned)'accessioned'"], - ['vocabularies', 'inventorystatus', 'unknown', "urn:cspace:anthro.collectionspace.org:vocabularies:name(inventorystatus):item:name(unknown)'unknown'"], - ['vocabularies', 'languages', 'Chinese', "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'"], - ['vocabularies', 'languages', 'English', "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'"], - ['vocabularies', 'languages', 'French', "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(fra)'French'"], - ['vocabularies', 'languages', 'German', "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(deu)'German'"], - ['vocabularies', 'languages', 'Spanish', "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(spa)'Spanish'"], - ['vocabularies', 'limitationlevel', 'recommendation', "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationlevel):item:name(recommendation)'recommendation'"], - ['vocabularies', 'limitationlevel', 'restriction', "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationlevel):item:name(restriction)'restriction'"], - ['vocabularies', 'limitationtype', 'lending', "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationtype):item:name(lending)'lending'"], - ['vocabularies', 'limitationtype', 'publication', "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationtype):item:name(publication)'publication'"], - ['vocabularies', 'mortuarytreatment', 'burned/unburned bone mixture', "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(burnedunburnedbonemixture)'burned/unburned bone mixture'"], - ['vocabularies', 'mortuarytreatment', 'enbalmed', "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(enbalmed)'enbalmed'"], - ['vocabularies', 'mortuarytreatment', 'excarnated', "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(excarnated)'excarnated'"], - ['vocabularies', 'mortuarytreatment', 'mummified', "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(mummified)'mummified'"], - ['vocabularies', 'nagpracategory', 'not subject to NAGPRA', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpracategory):item:name(nonNagpra)'not subject to NAGPRA'"], - ['vocabularies', 'nagpracategory', 'subject to NAGPRA (unspec.)', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpracategory):item:name(subjectToNAGPRA)'subject to NAGPRA (unspec.)'"], - ['vocabularies', 'nagpraclaimtype', 'affiliated human skeletal remains (HSR)', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(affiliatedHsr)'affiliated human skeletal remains (HSR)'"], - ['vocabularies', 'nagpraclaimtype', 'needs further research', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(needsFurtherResearch)'needs further research'"], - ['vocabularies', 'nagpraclaimtype', 'not subject to NAGPRA', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(nonNagpra)'not subject to NAGPRA'"], - ['vocabularies', 'nagpraclaimtype', 'object of cultural patrimony', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(objectOfCulturalPatrimony)'object of cultural patrimony'"], - ['vocabularies', 'nagpraclaimtype', 'unassociated funerary object (UFO)', "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(ufo)'unassociated funerary object (UFO)'"], - ['vocabularies', 'prodpeoplerole', 'designed after', "urn:cspace:anthro.collectionspace.org:vocabularies:name(prodpeoplerole):item:name(designedAfter)'designed after'"], - ['vocabularies', 'prodpeoplerole', 'traditional makers', "urn:cspace:anthro.collectionspace.org:vocabularies:name(prodpeoplerole):item:name(traditionalMakers)'traditional makers'"], - ['vocabularies', 'publishto', 'DPLA', "urn:cspace:anthro.collectionspace.org:vocabularies:name(publishto):item:name(dpla)'DPLA'"], - ['vocabularies', 'publishto', 'Omeka', "urn:cspace:anthro.collectionspace.org:vocabularies:name(publishto):item:name(omeka)'Omeka'"], - ['vocabularies', 'cranialdeformationcategory', 'other (describe)', "urn:cspace:anthro.collectionspace.org:vocabularies:name(cranialdeformationcategory):item:name(other)'other (describe)'"], - ['vocabularies', 'cranialdeformationcategory', 'tabular', "urn:cspace:anthro.collectionspace.org:vocabularies:name(cranialdeformationcategory):item:name(tabular)'tabular'"], - ['vocabularies', 'cranialdeformationcategory', 'circumferential', "urn:cspace:anthro.collectionspace.org:vocabularies:name(cranialdeformationcategory):item:name(circumferential)'circumferential'"], - ['vocabularies', 'trepanationcertainty', 'possible trepanation', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationcertainty):item:name(possible)'possible trepanation'"], - ['vocabularies', 'trepanationcertainty', 'clear evidence of trepanation', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationcertainty):item:name(clear)'clear evidence of trepanation'"], - ['vocabularies', 'trepanationtechnique', 'grooving', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationtechnique):item:name(grooving)'grooving'"], - ['vocabularies', 'trepanationtechnique', 'grooving', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationtechnique):item:name(grooving)'grooving'"], - ['vocabularies', 'trepanationhealing', 'possible healing', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationhealing):item:name(possible)'possible healing'"], - ['vocabularies', 'trepanationhealing', 'no healing', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationhealing):item:name(none)'no healing'"], - ['vocabularies', 'trepanationhealing', 'definite evidence for healing', "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationhealing):item:name(definite)'definite evidence for healing'"], - ['vocabularies', 'mortuarytreatment', 'excarnated', "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(excarnated)'excarnated'"], - ['vocabularies', 'behrensmeyer', '3 - fibrous texture, extensive exfoliation', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(3)'3 - fibrous texture, extensive exfoliation'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'osteocompleteness', 'mandible only', "urn:cspace:anthro.collectionspace.org:vocabularies:name(osteocompleteness):item:name(mandible)'mandible only'"], - ['vocabularies', 'behrensmeyer', '4 - coarsely fibrous texture, splinters of bone loose on the surface, open cracks', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(4)'4 - coarsely fibrous texture, splinters of bone loose on the surface, open cracks'"], - ['vocabularies', 'dentitionscore', 'not applicable', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dentitionscore):item:name(notapplicable)'not applicable'"], - ['personauthorities', 'person', 'sniper', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(sniper1599821165616)'sniper'"], - ['personauthorities', 'person', 'fullclip', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(fullclip1599821193344)'fullclip'"], - ['personauthorities', 'person', 'fullclip', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(fullclip1599821140041)'fullclip'"], - ['personauthorities', 'person', 'praya', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(praya1599821095120)'praya'"], - ['personauthorities', 'person', 'jijoe', "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(jijoe1599821246989)'jijoe'"], + ['conceptauthorities', 'archculture', 'Blackfoot', + "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(archculture):item:name(Blackfoot1576172504869)'Blackfoot'"], + ['conceptauthorities', 'concept', 'Birds', + "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(concept):item:name(Birds918181)'Birds'"], + ['conceptauthorities', 'ethculture', 'Batak', + "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(ethculture):item:name(Batak1576172496916)'Batak'"], + ['conceptauthorities', 'ethculture', 'Got', + "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(ethculture):item:name(Got1599824429903)'Got'"], + ['conceptauthorities', 'ethculture', 'Hero', + "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(ethculture):item:name(Hero1599824418804)'Hero'"], + ['conceptauthorities', 'material_ca', 'Feathers', + "urn:cspace:anthro.collectionspace.org:conceptauthorities:name(material_ca):item:name(Feathers918181)'Feathers'"], + ['orgauthorities', 'organization', 'Hola', + "urn:cspace:anthro.collectionspace.org:orgauthorities:name(organization):item:name(Hola1599824351945)'Hola'"], + ['orgauthorities', 'organization', 'Organization 1', + "urn:cspace:anthro.collectionspace.org:orgauthorities:name(organization):item:name(Organization11587136583004)'Organization 1'"], + ['orgauthorities', 'organization', 'chores', + "urn:cspace:anthro.collectionspace.org:orgauthorities:name(organization):item:name(chores1599824370125)'chores'"], + ['personauthorities', 'person', 'Ann Analyst', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(AnnAnalyst1594848799340)'Ann Analyst'"], + ['personauthorities', 'person', 'Gabriel Solares', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(GabrielSolares1594848906847)'Gabriel Solares'"], + ['personauthorities', 'person', 'Tegla', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(Tegla1599824325923)'Tegla'"], + ['personauthorities', 'person', 'Tom', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(Tom1599824331955)'Tom'"], + ['placeauthorities', 'place', 'Early', + "urn:cspace:anthro.collectionspace.org:placeauthorities:name(place):item:name(Early1599824413345)'Early'"], + ['placeauthorities', 'place', 'Local', + "urn:cspace:anthro.collectionspace.org:placeauthorities:name(place):item:name(Local1599824385298)'Local'"], + ['placeauthorities', 'place', 'York County, Pennsylvania', + "urn:cspace:anthro.collectionspace.org:placeauthorities:name(place):item:name(YorkCountyPennsylvania)'York County, Pennsylvania'"], + ['vocabularies', 'agerange', 'adolescent 26-75%', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(agerange):item:name(adolescent_26_75)'adolescent 26-75%'"], + ['vocabularies', 'agerange', 'adult 0-25%', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(agerange):item:name(adult_0_25)'adult 0-25%'"], + ['vocabularies', 'annotationtype', 'image made', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(annotationtype):item:name(image_made)'image made'"], + ['vocabularies', 'annotationtype', 'type', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(annotationtype):item:name(type)'type'"], + ['vocabularies', 'behrensmeyer', '0 - no cracking or flaking on bone surface', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(0)'0 - no cracking or flaking on bone surface'"], + ['vocabularies', 'behrensmeyer', '1 - longitudinal and/or mosaic cracking present on surface', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(1)'1 - longitudinal and/or mosaic cracking present on surface'"], + ['vocabularies', 'behrensmeyer', '2 - longitudinal cracks, exfoliation on surface', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(2)'2 - longitudinal cracks, exfoliation on surface'"], + ['vocabularies', 'behrensmeyer', '3 - fibrous texture, extensive exfoliation', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(3)'3 - fibrous texture, extensive exfoliation'"], + ['vocabularies', 'behrensmeyer', '5 - bone crumbling in situ, large splinters', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(5)'5 - bone crumbling in situ, large splinters'"], + ['vocabularies', 'bodyside', 'midline', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(bodyside):item:name(midline)'midline'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'inventorystatus', 'accessioned', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(inventorystatus):item:name(accessioned)'accessioned'"], + ['vocabularies', 'inventorystatus', 'unknown', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(inventorystatus):item:name(unknown)'unknown'"], + ['vocabularies', 'languages', 'Chinese', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(zho)'Chinese'"], + ['vocabularies', 'languages', 'English', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'"], + ['vocabularies', 'languages', 'French', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(fra)'French'"], + ['vocabularies', 'languages', 'German', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(deu)'German'"], + ['vocabularies', 'languages', 'Spanish', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(languages):item:name(spa)'Spanish'"], + ['vocabularies', 'limitationlevel', 'recommendation', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationlevel):item:name(recommendation)'recommendation'"], + ['vocabularies', 'limitationlevel', 'restriction', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationlevel):item:name(restriction)'restriction'"], + ['vocabularies', 'limitationtype', 'lending', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationtype):item:name(lending)'lending'"], + ['vocabularies', 'limitationtype', 'publication', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(limitationtype):item:name(publication)'publication'"], + ['vocabularies', 'mortuarytreatment', 'burned/unburned bone mixture', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(burnedunburnedbonemixture)'burned/unburned bone mixture'"], + ['vocabularies', 'mortuarytreatment', 'enbalmed', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(enbalmed)'enbalmed'"], + ['vocabularies', 'mortuarytreatment', 'excarnated', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(excarnated)'excarnated'"], + ['vocabularies', 'mortuarytreatment', 'mummified', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(mummified)'mummified'"], + ['vocabularies', 'nagpracategory', 'not subject to NAGPRA', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpracategory):item:name(nonNagpra)'not subject to NAGPRA'"], + ['vocabularies', 'nagpracategory', 'subject to NAGPRA (unspec.)', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpracategory):item:name(subjectToNAGPRA)'subject to NAGPRA (unspec.)'"], + ['vocabularies', 'nagpraclaimtype', 'affiliated human skeletal remains (HSR)', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(affiliatedHsr)'affiliated human skeletal remains (HSR)'"], + ['vocabularies', 'nagpraclaimtype', 'needs further research', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(needsFurtherResearch)'needs further research'"], + ['vocabularies', 'nagpraclaimtype', 'not subject to NAGPRA', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(nonNagpra)'not subject to NAGPRA'"], + ['vocabularies', 'nagpraclaimtype', 'object of cultural patrimony', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(objectOfCulturalPatrimony)'object of cultural patrimony'"], + ['vocabularies', 'nagpraclaimtype', 'unassociated funerary object (UFO)', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(nagpraclaimtype):item:name(ufo)'unassociated funerary object (UFO)'"], + ['vocabularies', 'prodpeoplerole', 'designed after', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(prodpeoplerole):item:name(designedAfter)'designed after'"], + ['vocabularies', 'prodpeoplerole', 'traditional makers', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(prodpeoplerole):item:name(traditionalMakers)'traditional makers'"], + ['vocabularies', 'publishto', 'DPLA', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(publishto):item:name(dpla)'DPLA'"], + ['vocabularies', 'publishto', 'Omeka', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(publishto):item:name(omeka)'Omeka'"], + ['vocabularies', 'cranialdeformationcategory', 'other (describe)', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(cranialdeformationcategory):item:name(other)'other (describe)'"], + ['vocabularies', 'cranialdeformationcategory', 'tabular', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(cranialdeformationcategory):item:name(tabular)'tabular'"], + ['vocabularies', 'cranialdeformationcategory', 'circumferential', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(cranialdeformationcategory):item:name(circumferential)'circumferential'"], + ['vocabularies', 'trepanationcertainty', 'possible trepanation', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationcertainty):item:name(possible)'possible trepanation'"], + ['vocabularies', 'trepanationcertainty', 'clear evidence of trepanation', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationcertainty):item:name(clear)'clear evidence of trepanation'"], + ['vocabularies', 'trepanationtechnique', 'grooving', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationtechnique):item:name(grooving)'grooving'"], + ['vocabularies', 'trepanationtechnique', 'grooving', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationtechnique):item:name(grooving)'grooving'"], + ['vocabularies', 'trepanationhealing', 'possible healing', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationhealing):item:name(possible)'possible healing'"], + ['vocabularies', 'trepanationhealing', 'no healing', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationhealing):item:name(none)'no healing'"], + ['vocabularies', 'trepanationhealing', 'definite evidence for healing', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(trepanationhealing):item:name(definite)'definite evidence for healing'"], + ['vocabularies', 'mortuarytreatment', 'excarnated', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(mortuarytreatment):item:name(excarnated)'excarnated'"], + ['vocabularies', 'behrensmeyer', '3 - fibrous texture, extensive exfoliation', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(3)'3 - fibrous texture, extensive exfoliation'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'osteocompleteness', 'mandible only', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(osteocompleteness):item:name(mandible)'mandible only'"], + ['vocabularies', 'behrensmeyer', + '4 - coarsely fibrous texture, splinters of bone loose on the surface, open cracks', "urn:cspace:anthro.collectionspace.org:vocabularies:name(behrensmeyer):item:name(4)'4 - coarsely fibrous texture, splinters of bone loose on the surface, open cracks'"], + ['vocabularies', 'dentitionscore', 'not applicable', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dentitionscore):item:name(notapplicable)'not applicable'"], + ['personauthorities', 'person', 'sniper', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(sniper1599821165616)'sniper'"], + ['personauthorities', 'person', 'fullclip', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(fullclip1599821193344)'fullclip'"], + ['personauthorities', 'person', 'fullclip', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(fullclip1599821140041)'fullclip'"], + ['personauthorities', 'person', 'praya', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(praya1599821095120)'praya'"], + ['personauthorities', 'person', 'jijoe', + "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(jijoe1599821246989)'jijoe'"], ] populate(cache, terms) end diff --git a/spec/bonsai_helpers.rb b/spec/bonsai_helpers.rb index c4dbbafc..22958b3d 100644 --- a/spec/bonsai_helpers.rb +++ b/spec/bonsai_helpers.rb @@ -10,7 +10,7 @@ def bonsai_client ) ) end - + def bonsai_cache cache_config = base_cache_config.merge({domain: 'bonsai.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: bonsai_client) @@ -21,17 +21,28 @@ def bonsai_cache def populate_bonsai(cache) terms = [ - ['orgauthorities', 'organization', 'Bonsai Museum', "urn:cspace:bonsai.collectionspace.org:orgauthorities:name(organization):item:name(BonsaiMuseum1598919439027)'Bonsai Museum'"], - ['orgauthorities', 'organization', 'Bonsai Store', "urn:cspace:bonsai.collectionspace.org:orgauthorities:name(organization):item:name(BonsaiStore1598920297843)'Bonsai Store'"], - ['personauthorities', 'person', 'Ann Authorizer', "urn:cspace:bonsai.collectionspace.org:personauthorities:name(person):item:name(AnnAuthorizer1598919551068)'Ann Authorizer'"], - ['personauthorities', 'person', 'Debbie Depositor', "urn:cspace:bonsai.collectionspace.org:personauthorities:name(person):item:name(DebbieDepositor1598919493867)'Debbie Depositor'"], - ['personauthorities', 'person', 'Priscilla Plantsale', "urn:cspace:bonsai.collectionspace.org:personauthorities:name(person):item:name(PriscillaPlantsale1598920259864)'Priscilla Plantsale'"], - ['vocabularies', 'currency', 'Canadian Dollar', "urn:cspace:bonsai.collectionspace.org:vocabularies:name(currency):item:name(CAD)'Canadian Dollar'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'deaccessionapprovalgroup', 'collection committee', "urn:cspace:bonsai.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(collection_committee)'collection committee'"], - ['vocabularies', 'deaccessionapprovalstatus', 'approved', "urn:cspace:bonsai.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(approved)'approved'"], - ['vocabularies', 'deaccessionapprovalstatus', 'not required', "urn:cspace:bonsai.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(not_required)'not required'"], - ['vocabularies', 'disposalmethod', 'public auction', "urn:cspace:bonsai.collectionspace.org:vocabularies:name(disposalmethod):item:name(public_auction)'public auction'"], + ['orgauthorities', 'organization', 'Bonsai Museum', + "urn:cspace:bonsai.collectionspace.org:orgauthorities:name(organization):item:name(BonsaiMuseum1598919439027)'Bonsai Museum'"], + ['orgauthorities', 'organization', 'Bonsai Store', + "urn:cspace:bonsai.collectionspace.org:orgauthorities:name(organization):item:name(BonsaiStore1598920297843)'Bonsai Store'"], + ['personauthorities', 'person', 'Ann Authorizer', + "urn:cspace:bonsai.collectionspace.org:personauthorities:name(person):item:name(AnnAuthorizer1598919551068)'Ann Authorizer'"], + ['personauthorities', 'person', 'Debbie Depositor', + "urn:cspace:bonsai.collectionspace.org:personauthorities:name(person):item:name(DebbieDepositor1598919493867)'Debbie Depositor'"], + ['personauthorities', 'person', 'Priscilla Plantsale', + "urn:cspace:bonsai.collectionspace.org:personauthorities:name(person):item:name(PriscillaPlantsale1598920259864)'Priscilla Plantsale'"], + ['vocabularies', 'currency', 'Canadian Dollar', + "urn:cspace:bonsai.collectionspace.org:vocabularies:name(currency):item:name(CAD)'Canadian Dollar'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:anthro.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'deaccessionapprovalgroup', 'collection committee', + "urn:cspace:bonsai.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(collection_committee)'collection committee'"], + ['vocabularies', 'deaccessionapprovalstatus', 'approved', + "urn:cspace:bonsai.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(approved)'approved'"], + ['vocabularies', 'deaccessionapprovalstatus', 'not required', + "urn:cspace:bonsai.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(not_required)'not required'"], + ['vocabularies', 'disposalmethod', 'public auction', + "urn:cspace:bonsai.collectionspace.org:vocabularies:name(disposalmethod):item:name(public_auction)'public auction'"], ] populate(cache, terms) end diff --git a/spec/botgarden_helpers.rb b/spec/botgarden_helpers.rb index 74c0afa4..e02b0aed 100644 --- a/spec/botgarden_helpers.rb +++ b/spec/botgarden_helpers.rb @@ -10,7 +10,7 @@ def botgarden_client ) ) end - + def botgarden_cache cache_config = base_cache_config.merge({domain: 'botgarden.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: botgarden_client) @@ -21,34 +21,62 @@ def botgarden_cache def populate_botgarden(cache) terms = [ - ['citationauthorities', 'citation', 'FNA Volume 19', "urn:cspace:botgarden.collectionspace.org:citationauthorities:name(citation):item:name(FNAVolume191599238760383)'FNA Volume 19'"], - ['citationauthorities', 'citation', 'Sp. Pl. 2: 899. 1753', "urn:cspace:botgarden.collectionspace.org:citationauthorities:name(citation):item:name(SpPl289917531599238184211)'Sp. Pl. 2: 899. 1753'"], - ['citationauthorities', 'worldcat', 'Bull. Torrey Bot. Club', "urn:cspace:botgarden.collectionspace.org:citationauthorities:name(worldcat):item:name(BullTorreyBotClub331599245358364)'Bull. Torrey Bot. Club 33'"], - ['conceptauthorities', 'concept', 'Official', "urn:cspace:botgarden.collectionspace.org:conceptauthorities:name(concept):item:name(Official1599737276242)'Official'"], - ['locationauthorities', 'location', 'Corner', "urn:cspace:botgarden.collectionspace.org:locationauthorities:name(location):item:name(Corner1599737289184)'Corner'"], - ['orgauthorities', 'organization', 'FVA', "urn:cspace:botgarden.collectionspace.org:orgauthorities:name(organization):item:name(FVA1599246022216)'FVA'"], - ['personauthorities', 'person', 'Linnaeus, Carl', "urn:cspace:botgarden.collectionspace.org:personauthorities:name(person):item:name(LinnaeusCarl1599238374086)'Linnaeus, Carl'"], - ['taxonomyauthority', 'taxon', 'Domestic', "urn:cspace:botgarden.collectionspace.org:taxonomyauthority:name(taxon):item:name(Domestic1599750187683)'Domestic'"], - ['taxonomyauthority', 'taxon', 'Tropez', "urn:cspace:botgarden.collectionspace.org:taxonomyauthority:name(taxon):item:name(Tropez1599750195530)'Tropez'"], - ['vocabularies', 'cuttingtype', 'hardwood', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(cuttingtype):item:name(hardwood)'hardwood'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'durationunit', 'Days', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(durationunit):item:name(days)'Days'"], - ['vocabularies', 'durationunit', 'Hours', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(durationunit):item:name(hours)'Hours'"], - ['vocabularies', 'languages', 'English', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'"], - ['vocabularies', 'languages', 'French', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(languages):item:name(fra)'French'"], - ['vocabularies', 'languages', 'Latin', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(languages):item:name(lat)'Latin'"], - ['vocabularies', 'potsize', '1 gal. pot', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(potsize):item:name(OneGalPot)'1 gal. pot'"], - ['vocabularies', 'propActivityType', 'benlate and captan', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propActivityType):item:name(benlateAndCaptan)'benlate and captan'"], - ['vocabularies', 'propChemicals', 'benlate and physan', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propChemicals):item:name(benlateAndPhysan)'benlate and physan'"], - ['vocabularies', 'propConditions', 'glass cover', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propConditions):item:name(glassCover)'glass cover'"], - ['vocabularies', 'propHormones', 'hormone', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propHormones):item:name(hormone)'hormone'"], - ['vocabularies', 'propPlantType', 'bulbs', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propPlantType):item:name(bulbs)'bulbs'"], - ['vocabularies', 'propreason', 'conservation', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propreason):item:name(conservation)'conservation'"], - ['vocabularies', 'proptype', 'Division', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(proptype):item:name(division)'Division'"], - ['vocabularies', 'scarstrat', 'boiling water', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(scarstrat):item:name(boilingwater)'boiling water'"], - ['vocabularies', 'scarstrat', 'cold strat', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(scarstrat):item:name(coldstrat)'cold strat'"], - ['vocabularies', 'taxontermflag', 'invalid', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(taxontermflag):item:name(invalid)'invalid'"], - ['vocabularies', 'taxontermflag', 'valid', "urn:cspace:botgarden.collectionspace.org:vocabularies:name(taxontermflag):item:name(valid)'valid'"], + ['citationauthorities', 'citation', 'FNA Volume 19', + "urn:cspace:botgarden.collectionspace.org:citationauthorities:name(citation):item:name(FNAVolume191599238760383)'FNA Volume 19'"], + ['citationauthorities', 'citation', 'Sp. Pl. 2: 899. 1753', + "urn:cspace:botgarden.collectionspace.org:citationauthorities:name(citation):item:name(SpPl289917531599238184211)'Sp. Pl. 2: 899. 1753'"], + ['citationauthorities', 'worldcat', 'Bull. Torrey Bot. Club', + "urn:cspace:botgarden.collectionspace.org:citationauthorities:name(worldcat):item:name(BullTorreyBotClub331599245358364)'Bull. Torrey Bot. Club 33'"], + ['conceptauthorities', 'concept', 'Official', + "urn:cspace:botgarden.collectionspace.org:conceptauthorities:name(concept):item:name(Official1599737276242)'Official'"], + ['locationauthorities', 'location', 'Corner', + "urn:cspace:botgarden.collectionspace.org:locationauthorities:name(location):item:name(Corner1599737289184)'Corner'"], + ['orgauthorities', 'organization', 'FVA', + "urn:cspace:botgarden.collectionspace.org:orgauthorities:name(organization):item:name(FVA1599246022216)'FVA'"], + ['personauthorities', 'person', 'Linnaeus, Carl', + "urn:cspace:botgarden.collectionspace.org:personauthorities:name(person):item:name(LinnaeusCarl1599238374086)'Linnaeus, Carl'"], + ['taxonomyauthority', 'taxon', 'Domestic', + "urn:cspace:botgarden.collectionspace.org:taxonomyauthority:name(taxon):item:name(Domestic1599750187683)'Domestic'"], + ['taxonomyauthority', 'taxon', 'Tropez', + "urn:cspace:botgarden.collectionspace.org:taxonomyauthority:name(taxon):item:name(Tropez1599750195530)'Tropez'"], + ['vocabularies', 'cuttingtype', 'hardwood', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(cuttingtype):item:name(hardwood)'hardwood'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'durationunit', 'Days', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(durationunit):item:name(days)'Days'"], + ['vocabularies', 'durationunit', 'Hours', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(durationunit):item:name(hours)'Hours'"], + ['vocabularies', 'languages', 'English', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'"], + ['vocabularies', 'languages', 'French', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(languages):item:name(fra)'French'"], + ['vocabularies', 'languages', 'Latin', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(languages):item:name(lat)'Latin'"], + ['vocabularies', 'potsize', '1 gal. pot', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(potsize):item:name(OneGalPot)'1 gal. pot'"], + ['vocabularies', 'propActivityType', 'benlate and captan', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propActivityType):item:name(benlateAndCaptan)'benlate and captan'"], + ['vocabularies', 'propChemicals', 'benlate and physan', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propChemicals):item:name(benlateAndPhysan)'benlate and physan'"], + ['vocabularies', 'propConditions', 'glass cover', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propConditions):item:name(glassCover)'glass cover'"], + ['vocabularies', 'propHormones', 'hormone', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propHormones):item:name(hormone)'hormone'"], + ['vocabularies', 'propPlantType', 'bulbs', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propPlantType):item:name(bulbs)'bulbs'"], + ['vocabularies', 'propreason', 'conservation', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(propreason):item:name(conservation)'conservation'"], + ['vocabularies', 'proptype', 'Division', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(proptype):item:name(division)'Division'"], + ['vocabularies', 'scarstrat', 'boiling water', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(scarstrat):item:name(boilingwater)'boiling water'"], + ['vocabularies', 'scarstrat', 'cold strat', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(scarstrat):item:name(coldstrat)'cold strat'"], + ['vocabularies', 'taxontermflag', 'invalid', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(taxontermflag):item:name(invalid)'invalid'"], + ['vocabularies', 'taxontermflag', 'valid', + "urn:cspace:botgarden.collectionspace.org:vocabularies:name(taxontermflag):item:name(valid)'valid'"], ] populate(cache, terms) end diff --git a/spec/collectionspace/mapper/column_mapping_spec.rb b/spec/collectionspace/mapper/column_mapping_spec.rb index c4bd16d7..ad9cec41 100644 --- a/spec/collectionspace/mapper/column_mapping_spec.rb +++ b/spec/collectionspace/mapper/column_mapping_spec.rb @@ -3,7 +3,6 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::ColumnMapping do - # all mapping hash keys from Untangler # :fieldname=>"numberValue", # :transforms=>{}, @@ -17,20 +16,20 @@ # :opt_list_values=>[], # :datacolumn=>"numberValue", # :required=>"n" - let(:recordmapper) { instance_double('CS::Mapper::RecordMapper') } - let(:mapping) { described_class.new(hash, recordmapper) } - + let(:recordmapper){ instance_double('CS::Mapper::RecordMapper') } + let(:mapping){ described_class.new(hash, recordmapper) } + describe '#datacolumn' do - let(:hash) { {:datacolumn=>"abCdeFg"} } + let(:hash){ {datacolumn: 'abCdeFg'} } it 'returns downcased column name' do expect(mapping.datacolumn).to eq('abcdefg') end end - + describe '#fullpath' do let(:hash) { { - :namespace=>"collectionobjects_common", - :xpath=>["otherNumberList", "otherNumber"], + namespace: 'collectionobjects_common', + xpath: ['otherNumberList', 'otherNumber'], } } it 'returns full xpath to target CollectionSpace field' do expected = 'collectionobjects_common/otherNumberList/otherNumber' @@ -40,21 +39,21 @@ describe '#required?' do context 'with required = y' do - let(:hash) { { :required=>"y" } } + let(:hash){ {required: 'y'} } it 'returns true' do expect(mapping.required?).to be true end end context 'with required = y in template' do - let(:hash) { { :required=>"y in template" } } + let(:hash){ {required: 'y in template'} } it 'returns true' do expect(mapping.required?).to be true end end context 'with required = n' do - let(:hash) { { :required=>"n" } } + let(:hash){ {required: 'n'} } it 'returns false' do expect(mapping.required?).to be false end diff --git a/spec/collectionspace/mapper/column_mappings_spec.rb b/spec/collectionspace/mapper/column_mappings_spec.rb index 13959832..cbe63da9 100644 --- a/spec/collectionspace/mapper/column_mappings_spec.rb +++ b/spec/collectionspace/mapper/column_mappings_spec.rb @@ -4,62 +4,62 @@ RSpec.describe CollectionSpace::Mapper::ColumnMappings do let(:mappings) { [ - {:fieldname=>"objectNumber", - :transforms=>{}, - :source_type=>"na", - :source_name=>nil, - :namespace=>"collectionobjects_common", - :xpath=>[], - :data_type=>"string", - :repeats=>"n", - :in_repeating_group=>"n/a", - :opt_list_values=>[], - :datacolumn=>"objectNumber", - :required=>"y"}, - {:fieldname=>"numberOfObjects", - :transforms=>{}, - :source_type=>"na", - :source_name=>nil, - :namespace=>"collectionobjects_common", - :xpath=>[], - :data_type=>"integer", - :repeats=>"n", - :in_repeating_group=>"n/a", - :opt_list_values=>[], - :datacolumn=>"numberOfObjects", - :required=>"n"}, - {:fieldname=>"numberValue", - :transforms=>{}, - :source_type=>"na", - :source_name=>nil, - :namespace=>"collectionobjects_common", - :xpath=>["otherNumberList", "otherNumber"], - :data_type=>"string", - :repeats=>"n", - :in_repeating_group=>"y", - :opt_list_values=>[], - :datacolumn=>"numberValue", - :required=>"n"}, - {:fieldname=>"numberType", - :transforms=>{}, - :source_type=>"optionlist", - :source_name=>"numberTypes", - :namespace=>"collectionobjects_common", - :xpath=>["otherNumberList", "otherNumber"], - :data_type=>"string", - :repeats=>"n", - :in_repeating_group=>"y", - :opt_list_values=>["lender", "obsolete", "previous", "serial", "unknown"], - :datacolumn=>"numberType", - :required=>"n"}, - {:datacolumn=>"otherRequired", - :required=>"y"} + {fieldname: 'objectNumber', + transforms: {}, + source_type: 'na', + source_name: nil, + namespace: 'collectionobjects_common', + xpath: [], + data_type: 'string', + repeats: 'n', + in_repeating_group: 'n/a', + opt_list_values: [], + datacolumn: 'objectNumber', + required: 'y'}, + {fieldname: 'numberOfObjects', + transforms: {}, + source_type: 'na', + source_name: nil, + namespace: 'collectionobjects_common', + xpath: [], + data_type: 'integer', + repeats: 'n', + in_repeating_group: 'n/a', + opt_list_values: [], + datacolumn: 'numberOfObjects', + required: 'n'}, + {fieldname: 'numberValue', + transforms: {}, + source_type: 'na', + source_name: nil, + namespace: 'collectionobjects_common', + xpath: ['otherNumberList', 'otherNumber'], + data_type: 'string', + repeats: 'n', + in_repeating_group: 'y', + opt_list_values: [], + datacolumn: 'numberValue', + required: 'n'}, + {fieldname: 'numberType', + transforms: {}, + source_type: 'optionlist', + source_name: 'numberTypes', + namespace: 'collectionobjects_common', + xpath: ['otherNumberList', 'otherNumber'], + data_type: 'string', + repeats: 'n', + in_repeating_group: 'y', + opt_list_values: ['lender', 'obsolete', 'previous', 'serial', 'unknown'], + datacolumn: 'numberType', + required: 'n'}, + {datacolumn: 'otherRequired', + required: 'y'} ] } - let(:recordmapper) { instance_double('CS::Mapper::RecordMapper') } - let(:mapperconfig) { instance_double('CS::Mapper::RecordMapperConfig') } - - let(:mappingsobj) { dc = described_class.new(mappings: mappings, mapper: recordmapper) } + let(:recordmapper){ instance_double('CS::Mapper::RecordMapper') } + let(:mapperconfig){ instance_double('CS::Mapper::RecordMapperConfig') } + + let(:mappingsobj){ dc = described_class.new(mappings: mappings, mapper: recordmapper) } let(:added_field) { { fieldname: 'addedField', @@ -76,7 +76,7 @@ allow(recordmapper).to receive(:config).and_return(mapperconfig) allow(recordmapper).to receive(:service_type).and_return(nil) end - + context 'when initialized from authority RecordMapper' do it 'adds shortIdentifier to mappings' do allow(mapperconfig).to receive(:common_namespace).and_return('citations_common') @@ -95,31 +95,30 @@ context 'when initialized from media RecordMapper' do let(:mappings) { [ - {:fieldname=>"identificationNumber", - :transforms=>{}, - :source_type=>"na", - :source_name=>nil, - :namespace=>"media_common", - :xpath=>[], - :data_type=>"string", - :repeats=>"n", - :in_repeating_group=>"n/a", - :opt_list_values=>[], - :datacolumn=>"identificationNumber", - :required=>"y"}, - {:fieldname=>"title", - :transforms=>{}, - :source_type=>"na", - :source_name=>nil, - :namespace=>"media_common", - :xpath=>[], - :data_type=>"string", - :repeats=>"n", - :in_repeating_group=>"n/a", - :opt_list_values=>[], - :datacolumn=>"title", - :required=>"n"} - + {fieldname: 'identificationNumber', + transforms: {}, + source_type: 'na', + source_name: nil, + namespace: 'media_common', + xpath: [], + data_type: 'string', + repeats: 'n', + in_repeating_group: 'n/a', + opt_list_values: [], + datacolumn: 'identificationNumber', + required: 'y'}, + {fieldname: 'title', + transforms: {}, + source_type: 'na', + source_name: nil, + namespace: 'media_common', + xpath: [], + data_type: 'string', + repeats: 'n', + in_repeating_group: 'n/a', + opt_list_values: [], + datacolumn: 'title', + required: 'n'} ] } it 'adds mediaFileURI to mappings' do diff --git a/spec/collectionspace/mapper/column_value_spec.rb b/spec/collectionspace/mapper/column_value_spec.rb index 99c55664..bfe2d90a 100644 --- a/spec/collectionspace/mapper/column_value_spec.rb +++ b/spec/collectionspace/mapper/column_value_spec.rb @@ -3,57 +3,56 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::ColumnValue do - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json'} - let(:recmapper) { get_record_mapper_object(mapperpath, core_cache) } - let(:mapping) { recmapper.mappings.lookup(colname) } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json'} + let(:recmapper){ get_record_mapper_object(mapperpath, core_cache) } + let(:mapping){ recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, recmapper: recmapper, mapping: mapping) } - describe '.create' do let(:creator) { described_class.create(column: colname, value: colvalue, recmapper: recmapper, mapping: mapping) } - + context 'given core collectionobject collection value' do - let(:colname) { 'collection' } - let(:colvalue) { 'blah' } + let(:colname){ 'collection' } + let(:colvalue){ 'blah' } it 'returns ColumnValue' do expect(creator).to be_a(CS::Mapper::ColumnValue) end end context 'given core collectionobject comment value' do - let(:colname) { 'comment' } - let(:colvalue) { 'blah' } + let(:colname){ 'comment' } + let(:colvalue){ 'blah' } it 'returns MultivalColumnValue' do expect(creator).to be_a(CS::Mapper::MultivalColumnValue) end end context 'given core collectionobject comment value' do - let(:colname) { 'title' } - let(:colvalue) { 'blah' } + let(:colname){ 'title' } + let(:colvalue){ 'blah' } it 'returns GroupColumnValue' do expect(creator).to be_a(CS::Mapper::GroupColumnValue) end end context 'given bonsai conservation fertilizerToBeUsed value' do - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json' } - let(:colname) { 'fertilizerToBeUsed' } - let(:colvalue) { 'blah' } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json' } + let(:colname){ 'fertilizerToBeUsed' } + let(:colvalue){ 'blah' } it 'returns GroupMultivalColumnValue' do expect(creator).to be_a(CS::Mapper::GroupMultivalColumnValue) end end context 'given core collectionobject titleTranslation value' do - let(:colname) { 'titleTranslation' } - let(:colvalue) { 'blah' } + let(:colname){ 'titleTranslation' } + let(:colvalue){ 'blah' } it 'returns SubgroupColumnValue' do expect(creator).to be_a(CS::Mapper::SubgroupColumnValue) end @@ -61,8 +60,8 @@ end describe '#split' do - let(:colname) { 'collection' } - let(:colvalue) { 'blah ' } + let(:colname){ 'collection' } + let(:colvalue){ 'blah ' } it 'returns value as stripped single element in Array' do expect(colval.split).to eq(['blah']) end diff --git a/spec/collectionspace/mapper/config_spec.rb b/spec/collectionspace/mapper/config_spec.rb index 97cb9801..9f1d6f24 100644 --- a/spec/collectionspace/mapper/config_spec.rb +++ b/spec/collectionspace/mapper/config_spec.rb @@ -30,14 +30,16 @@ } }' } - let(:with_string) { described_class.new(config: configstr) } - let(:confighash) { JSON.parse(configstr) } - let(:with_hash) { described_class.new(config: confighash) } - let(:with_nothing) { described_class.new } - let(:with_array) { described_class.new(config: [2, 3]) } - let(:expected_hash) { {:delimiter=>";", :subgroup_delimiter=>"^^", :response_mode=>"verbose", :force_defaults=>false, :check_record_status=>true, :check_terms=>true, :date_format=>"month day year", :two_digit_year_handling=>"convert to four digit", :transforms=>{"collection"=>{:special=>["downcase_value"], :replacements=>[{:find=>" ", :replace=>"-", :type=>"plain"}]}}, :default_values=>{"publishto"=>"DPLA;Omeka", "collection"=>"library-collection"}} } - let(:invalid_response) { {response_mode: 'mouthy'} } - let(:with_invalid_response) { described_class.new(config: invalid_response) } + let(:with_string){ described_class.new(config: configstr) } + let(:confighash){ JSON.parse(configstr) } + let(:with_hash){ described_class.new(config: confighash) } + let(:with_nothing){ described_class.new } + let(:with_array){ described_class.new(config: [2, 3]) } + let(:expected_hash){ + {delimiter: ';', subgroup_delimiter: '^^', response_mode: 'verbose', force_defaults: false, + check_record_status: true, check_terms: true, date_format: 'month day year', two_digit_year_handling: 'convert to four digit', transforms: {'collection' => {special: ['downcase_value'], replacements: [{find: ' ', replace: '-', type: 'plain'}]}}, default_values: {'publishto' => 'DPLA;Omeka', 'collection' => 'library-collection'}} } + let(:invalid_response){ {response_mode: 'mouthy'} } + let(:with_invalid_response){ described_class.new(config: invalid_response) } context 'when initialized with JSON string' do it 'is created' do diff --git a/spec/collectionspace/mapper/data_handler_spec.rb b/spec/collectionspace/mapper/data_handler_spec.rb index e683ddd9..2e8b2248 100644 --- a/spec/collectionspace/mapper/data_handler_spec.rb +++ b/spec/collectionspace/mapper/data_handler_spec.rb @@ -4,23 +4,23 @@ RSpec.describe CollectionSpace::Mapper::DataHandler do before(:all) do - @anthro_client = anthro_client - @anthro_cache = anthro_cache - @anthro_object_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') - @anthro_object_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_object_mapper, - client: @anthro_client, - cache: @anthro_cache) - @anthro_place_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_place-local.json') - @anthro_place_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_place_mapper, - client: @anthro_client, - cache: @anthro_cache) + @anthro_client = anthro_client + @anthro_cache = anthro_cache + @anthro_object_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') + @anthro_object_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_object_mapper, + client: @anthro_client, + cache: @anthro_cache) + @anthro_place_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_place-local.json') + @anthro_place_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_place_mapper, + client: @anthro_client, + cache: @anthro_cache) - @bonsai_client = bonsai_client - @bonsai_cache = bonsai_cache - @bonsai_conservation_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json') - @bonsai_conservation_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @bonsai_conservation_mapper, - client: @bonsai_client, - cache: @bonsai_cache) + @bonsai_client = bonsai_client + @bonsai_cache = bonsai_cache + @bonsai_conservation_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json') + @bonsai_conservation_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @bonsai_conservation_mapper, + client: @bonsai_client, + cache: @bonsai_cache) end # todo: why are these making services api calls? @@ -34,20 +34,20 @@ client: @client, cache: @cache, config: @config) - @data = {"objectNumber"=>"20CS.001.0002", - "numberOfObjects"=>"1", - "title"=>"Rainbow", - "titleLanguage"=>"English", - "namedCollection"=>"Test Collection", - "collection"=>"rando"} - @data2 = {"objectNumber"=>"20CS.001.0001", - "numberOfObjects"=>"1", - "numberValue"=>"123456|98765", - "numberType"=>"lender|obsolete", - "title"=>"A Man| A Woman", - "titleLanguage"=>"English| Klingon", - "namedCollection"=>"Test collection", - "collection"=>"permanent collection"} + @data = {'objectNumber' => '20CS.001.0002', + 'numberOfObjects' => '1', + 'title' => 'Rainbow', + 'titleLanguage' => 'English', + 'namedCollection' => 'Test Collection', + 'collection' => 'rando'} + @data2 = {'objectNumber' => '20CS.001.0001', + 'numberOfObjects' => '1', + 'numberValue' => '123456|98765', + 'numberType' => 'lender|obsolete', + 'title' => 'A Man| A Woman', + 'titleLanguage' => 'English| Klingon', + 'namedCollection' => 'Test collection', + 'collection' => 'permanent collection'} end it 'returns found = false for all terms, even if they exist in client' do res = @handler.process(@data) @@ -64,20 +64,20 @@ it 'tags all un-found terms as such', services_call: true do data1 = { 'objectNumber' => '1', - 'publishTo' => 'Wordpress', #vocabulary - not in cache - 'namedCollection' => 'nc', #authority - not in cache + 'publishTo' => 'Wordpress', # vocabulary - not in cache + 'namedCollection' => 'nc', # authority - not in cache } data2 = { 'objectNumber' => '2', - 'publishTo' => 'Wordpress', #vocabulary - now in cache - 'namedCollection' => 'nc', #authority - now in cache + 'publishTo' => 'Wordpress', # vocabulary - now in cache + 'namedCollection' => 'nc', # authority - now in cache 'contentConceptAssociated' => 'Birds' # authority, in cache } @anthro_object_handler.process(data1) result = @anthro_object_handler.process(data2).terms.select{ |t| t[:found] == false } expect(result.length).to eq(2) end - + describe '#is_authority' do context 'anthro profile' do context 'place record' do @@ -92,10 +92,10 @@ end describe '#service_type' do - let(:servicetype) { handler.service_type } + let(:servicetype){ handler.service_type } context 'anthro profile' do context 'collectionobject record' do - let(:handler) { @anthro_object_handler } + let(:handler){ @anthro_object_handler } it 'returns object' do expect(servicetype).to eq('object') @@ -103,7 +103,7 @@ end context 'place record' do - let(:handler) { @anthro_place_handler } + let(:handler){ @anthro_place_handler } it 'returns authority' do expect(servicetype).to eq('authority') @@ -113,7 +113,7 @@ context 'bonsai profile' do context 'conservation record' do - let(:handler) { @bonsai_conservation_handler } + let(:handler){ @bonsai_conservation_handler } it 'returns procedure' do expect(servicetype).to eq('procedure') @@ -121,7 +121,7 @@ end end end - + describe '#xpath_hash' do context 'anthro profile' do context 'collectionobject record' do @@ -176,29 +176,29 @@ end end end -context 'bonsai profile' do - context 'conservation record type' do - context 'xpath ending with fertilizersToBeUsed' do - it 'is a repeating group' do - h = @bonsai_conservation_handler.mapper.xpath - res = h['conservation_livingplant/fertilizationGroupList/fertilizationGroup/fertilizersToBeUsed'][:is_group] - expect(res).to be true - end - end - context 'xpath ending with conservators' do - it 'is a repeating group' do - h = @bonsai_conservation_handler.mapper.xpath - res = h['conservation_common/conservators'][:is_group] - expect(res).to be false + context 'bonsai profile' do + context 'conservation record type' do + context 'xpath ending with fertilizersToBeUsed' do + it 'is a repeating group' do + h = @bonsai_conservation_handler.mapper.xpath + res = h['conservation_livingplant/fertilizationGroupList/fertilizationGroup/fertilizersToBeUsed'][:is_group] + expect(res).to be true + end + end + context 'xpath ending with conservators' do + it 'is a repeating group' do + h = @bonsai_conservation_handler.mapper.xpath + res = h['conservation_common/conservators'][:is_group] + expect(res).to be false + end + end end end end -end - end describe '#validate' do it 'returns CollectionSpace::Mapper::Response object' do - data = { 'objectNumber' => '123' } + data = {'objectNumber' => '123'} result = @anthro_object_handler.validate(data) expect(result).to be_a(CollectionSpace::Mapper::Response) end @@ -219,10 +219,10 @@ } end end - + describe '#prep' do before(:all) do - @data = { 'objectNumber' => '123' } + @data = {'objectNumber' => '123'} end it 'can be called with response from validation' do vresult = @anthro_object_handler.validate(@data) @@ -241,7 +241,7 @@ end context 'when response_mode = verbose' do it 'returned response includes detailed data transformation info' do - config = { response_mode: 'verbose' } + config = {response_mode: 'verbose'} handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_object_mapper, client: @anthro_client, cache: @anthro_cache, @@ -254,7 +254,7 @@ describe '#process', services_call: true do before(:all) do - @data = { 'objectNumber' => '123' } + @data = {'objectNumber' => '123'} end it 'can be called with response from validation' do vresult = @anthro_object_handler.validate(@data) @@ -273,7 +273,7 @@ end context 'when response_mode = verbose' do it 'returned response includes detailed data transformation info' do - config = { response_mode: 'verbose' } + config = {response_mode: 'verbose'} handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_object_mapper, client: @anthro_client, cache: @anthro_cache, @@ -283,15 +283,15 @@ end end end - + describe '#map', services_call: true do before(:all) do - @data = { 'objectNumber' => '123' } + @data = {'objectNumber' => '123'} prepper = CollectionSpace::Mapper::DataPrepper.new(@data, @anthro_object_handler) prep_response = @anthro_object_handler.prep(@data).response @result = @anthro_object_handler.map(prep_response, prepper.xphash) end - + it 'returns CollectionSpace::Mapper::Response object' do expect(@result).to be_a(CollectionSpace::Mapper::Response) end @@ -306,7 +306,7 @@ end context 'when response_mode = verbose' do it 'returned response includes detailed data transformation info' do - config = { 'response_mode'=> 'verbose' } + config = {'response_mode' => 'verbose'} handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @anthro_object_mapper, client: @anthro_client, cache: @anthro_cache, diff --git a/spec/collectionspace/mapper/data_mapper_anthro_spec.rb b/spec/collectionspace/mapper/data_mapper_anthro_spec.rb index f3dcc769..7d82e492 100644 --- a/spec/collectionspace/mapper/data_mapper_anthro_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_anthro_spec.rb @@ -12,7 +12,7 @@ @client = anthro_client @cache = anthro_cache end - + context 'claim record' do # Tests for claim record are pending because changes must be made to # handling of repeating field groups which contain more than one diff --git a/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb b/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb index 3f9f1e31..eb039a47 100644 --- a/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_bonsai_spec.rb @@ -12,7 +12,7 @@ @client = bonsai_client @cache = bonsai_cache end - + context 'objectexit record' do before(:all) do @objectexitmapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_objectexit.json') diff --git a/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb b/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb index 60cc6afa..1394e95d 100644 --- a/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_botgarden_spec.rb @@ -12,7 +12,7 @@ @client = botgarden_client @cache = botgarden_cache end - + context 'pottag record' do # before(:all) do # @pottag_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/botgarden/botgarden_2-0-1_pottag.json') @@ -67,7 +67,7 @@ # these tests are waiting for namespace uri fixes in CCU RecordMappers xit 'does not map unexpected fields' do diff = @mapped_xpaths - @fixture_xpaths - #puts diff + # puts diff expect(diff).to eq([]) end @@ -80,7 +80,7 @@ end end end - + context 'taxon record' do before(:all) do @taxon_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/botgarden/botgarden_2-0-1_taxon-local.json') @@ -107,7 +107,7 @@ it 'maps as expected' do @fixture_xpaths.each do |xpath| - #puts xpath + # puts xpath fixture_node = standardize_value(@fixture_doc.xpath(xpath).text) mapped_node = standardize_value(@mapped_doc.xpath(xpath).text) expect(mapped_node).to eq(fixture_node) diff --git a/spec/collectionspace/mapper/data_mapper_core_spec.rb b/spec/collectionspace/mapper/data_mapper_core_spec.rb index e131a78c..68a89ae6 100644 --- a/spec/collectionspace/mapper/data_mapper_core_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_core_spec.rb @@ -3,48 +3,48 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::DataMapper do - let(:config) { {delimiter: ';'} } + let(:config){ {delimiter: ';'} } context 'core profile' do - let(:client) { core_client } - let(:cache) { core_cache } + let(:client){ core_client } + let(:cache){ core_cache } let(:handler) { CollectionSpace::Mapper::DataHandler.new(record_mapper: mapper, client: client, cache: cache, config: config) } - let(:datahash) { get_datahash(path: hashpath) } - let(:response) { handler.process(datahash) } - let(:mapped_doc) { remove_namespaces(response.doc) } - let(:mapped_xpaths) { list_xpaths(mapped_doc) } - let(:fixture_doc) { get_xml_fixture(fixturepath) } - let(:fixture_xpaths) { test_xpaths(fixture_doc, handler.mapper.mappings) } - let(:diff) { mapped_xpaths - fixture_xpaths } + let(:datahash){ get_datahash(path: hashpath) } + let(:response){ handler.process(datahash) } + let(:mapped_doc){ remove_namespaces(response.doc) } + let(:mapped_xpaths){ list_xpaths(mapped_doc) } + let(:fixture_doc){ get_xml_fixture(fixturepath) } + let(:fixture_xpaths){ test_xpaths(fixture_doc, handler.mapper.mappings) } + let(:diff){ mapped_xpaths - fixture_xpaths } context 'non-hierarchical relationship record', services_call: true do # NOTE! # These tests are prone to failing if one of the records used in the test in core.dev is deleted # If a UUID is expected but you get blank, recreate the record in core.dev, rerun the test to - # get the UUID for the new record, and replace the old UUID in both fixture XML files used. + # get the UUID for the new record, and replace the old UUID in both fixture XML files used. let(:mapper) { get_json_record_mapper( 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_nonhierarchicalrelationship.json' ) } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/nonHierarchicalRelationship1.json' } - let(:mapped_doc1) { remove_namespaces(response[0].doc) } - let(:mapped_doc2) { remove_namespaces(response[1].doc) } - let(:mapped_xpaths1) { list_xpaths(mapped_doc1) } - let(:mapped_xpaths2) { list_xpaths(mapped_doc2) } - let(:fixture_doc1) { get_xml_fixture('core/nonHierarchicalRelationship1A.xml') } - let(:fixture_xpaths1) { test_xpaths(fixture_doc1, handler.mapper.mappings) } - let(:fixture_doc2) { get_xml_fixture('core/nonHierarchicalRelationship1B.xml') } - let(:fixture_xpaths2) { test_xpaths(fixture_doc2, handler.mapper.mappings) } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/nonHierarchicalRelationship1.json' } + let(:mapped_doc1){ remove_namespaces(response[0].doc) } + let(:mapped_doc2){ remove_namespaces(response[1].doc) } + let(:mapped_xpaths1){ list_xpaths(mapped_doc1) } + let(:mapped_xpaths2){ list_xpaths(mapped_doc2) } + let(:fixture_doc1){ get_xml_fixture('core/nonHierarchicalRelationship1A.xml') } + let(:fixture_xpaths1){ test_xpaths(fixture_doc1, handler.mapper.mappings) } + let(:fixture_doc2){ get_xml_fixture('core/nonHierarchicalRelationship1B.xml') } + let(:fixture_xpaths2){ test_xpaths(fixture_doc2, handler.mapper.mappings) } context 'with original data' do it 'sets response id field as expected' do expect(response[0].identifier).to eq('2020.1.107 TEST (collectionobjects) -> LOC2020.1.24 (movements)') end - + it 'does not map unexpected fields' do thisdiff = mapped_xpaths1 - fixture_xpaths1 expect(thisdiff).to eq([]) @@ -63,7 +63,7 @@ it 'sets response id field as expected' do expect(response[1].identifier).to eq('LOC2020.1.24 (movements) -> 2020.1.107 TEST (collectionobjects)') end - + it 'does not map unexpected fields' do thisdiff = mapped_xpaths2 - fixture_xpaths2 expect(thisdiff).to eq([]) @@ -81,18 +81,18 @@ end context 'authority hierarchy record', services_call: true do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_authorityhierarchy.json') } + let(:mapper){ + get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_authorityhierarchy.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/authorityHierarchy1.json' } - let(:fixturepath) { 'core/authorityHierarchy1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/authorityHierarchy1.json' } + let(:fixturepath){ 'core/authorityHierarchy1.xml' } it 'sets response id field as expected' do expect(response.identifier).to eq('Cats > Siamese cats') end - + it 'does not map unexpected fields' do - expect(diff).to eq([]) end @@ -107,16 +107,17 @@ end context 'object hierarchy record', services_call: true do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_objecthierarchy.json') } + let(:mapper){ + get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_objecthierarchy.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/objectHierarchy1.json' } - let(:fixturepath) { 'core/objectHierarchy1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/objectHierarchy1.json' } + let(:fixturepath){ 'core/objectHierarchy1.xml' } it 'sets response id field as expected' do expect(response.identifier).to eq('2020.1.105 > 2020.1.1055') end - + it 'does not map unexpected fields' do expect(diff).to eq([]) end @@ -132,11 +133,11 @@ end context 'acquisition record', services_call: true do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_acquisition.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_acquisition.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/acquisition1.json' } - let(:fixturepath) { 'core/acquisition1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/acquisition1.json' } + let(:fixturepath){ 'core/acquisition1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -151,14 +152,15 @@ end end end - + context 'collectionobject record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json') } + let(:mapper){ + get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/collectionobject1.json' } - let(:fixturepath) { 'core/collectionobject1.xml' } - + let(:hashpath){ 'spec/fixtures/files/datahashes/core/collectionobject1.json' } + let(:fixturepath){ 'core/collectionobject1.xml' } + it 'does not map unexpected fields' do expect(diff).to eq([]) end @@ -173,8 +175,8 @@ end context 'record 4 (bomb and %NULLVALUE% terms)' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/collectionobject4.json' } - let(:fixture_doc) { get_xml_fixture('core/collectionobject4.xml', false) } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/collectionobject4.json' } + let(:fixture_doc){ get_xml_fixture('core/collectionobject4.xml', false) } it 'does not map unexpected fields' do expect(diff).to eq(['/document/collectionobjects_common/namedCollections/namedCollection/text()']) @@ -190,10 +192,10 @@ end context 'record 5 (%NULLVALUE% term in repeating group)' do - let(:config) { {delimiter: '|'} } - let(:hashpath) { 'spec/fixtures/files/datahashes/core/collectionobject5.json' } - let(:fixturepath) { 'core/collectionobject5.xml' } - + let(:config){ {delimiter: '|'} } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/collectionobject5.json' } + let(:fixturepath){ 'core/collectionobject5.xml' } + it 'does not map unexpected fields' do expect(diff).to eq([]) end @@ -207,13 +209,14 @@ end end end - + context 'conditioncheck record', services_call: true do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_conditioncheck.json') } + let(:mapper){ + get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_conditioncheck.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/conditioncheck1.json' } - let(:fixturepath) { 'core/conditioncheck1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/conditioncheck1.json' } + let(:fixturepath){ 'core/conditioncheck1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -230,11 +233,12 @@ end context 'conservation record', services_call: true do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_conservation.json') } + let(:mapper){ + get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_conservation.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/conservation1.json' } - let(:fixturepath) { 'core/conservation1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/conservation1.json' } + let(:fixturepath){ 'core/conservation1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -251,11 +255,11 @@ end context 'exhibition record', services_call: true do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_exhibition.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_exhibition.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/exhibition1.json' } - let(:fixturepath) { 'core/exhibition1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/exhibition1.json' } + let(:fixturepath){ 'core/exhibition1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -270,13 +274,13 @@ end end end - + context 'group record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_group.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_group.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/group1.json'} - let(:fixturepath) { 'core/group1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/group1.json'} + let(:fixturepath){ 'core/group1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -293,11 +297,11 @@ end context 'intake record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_intake.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_intake.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/intake1.json' } - let(:fixturepath) { 'core/intake1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/intake1.json' } + let(:fixturepath){ 'core/intake1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -314,14 +318,14 @@ end context 'loanin record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_loanin.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_loanin.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/loanin1.json' } - let(:fixturepath) { 'core/loanin1.xml' } - + let(:hashpath){ 'spec/fixtures/files/datahashes/core/loanin1.json' } + let(:fixturepath){ 'core/loanin1.xml' } + it 'does not map unexpected fields' do - expect(diff).to eq([]) + expect(diff).to eq([]) end it 'maps as expected' do @@ -333,13 +337,13 @@ end end end - + context 'loanout record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_loanout.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_loanout.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/loanout1.json' } - let(:fixturepath) { 'core/loanout1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/loanout1.json' } + let(:fixturepath){ 'core/loanout1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -354,13 +358,13 @@ end end end - + context 'movement record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_movement.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_movement.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/movement1.json' } - let(:fixturepath) { 'core/movement1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/movement1.json' } + let(:fixturepath){ 'core/movement1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -377,11 +381,11 @@ end context 'media record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_media.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_media.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/media1.json' } - let(:fixturepath) { 'core/media1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/media1.json' } + let(:fixturepath){ 'core/media1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) @@ -398,20 +402,21 @@ end context 'objectexit record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_objectexit.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_objectexit.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/objectexit1.json' } - let(:fixturepath) { 'core/objectexit1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/objectexit1.json' } + let(:fixturepath){ 'core/objectexit1.xml' } it 'does not map unexpected fields' do - expect(diff).to eq([]) + expect(diff).to eq([]) end it 'maps as expected' do fixture_xpaths.each do |xpath| # todo - why is this next clause here? next if xpath.start_with?('/document/objectexit_common/exitDateGroup') + fixture_node = standardize_value(fixture_doc.xpath(xpath).text) mapped_node = standardize_value(mapped_doc.xpath(xpath).text) expect(mapped_node).to eq(fixture_node) @@ -421,11 +426,11 @@ end context 'uoc record' do - let(:mapper) { get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_uoc.json') } + let(:mapper){ get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_uoc.json') } context 'record 1' do - let(:hashpath) { 'spec/fixtures/files/datahashes/core/uoc1.json' } - let(:fixturepath) { 'core/uoc1.xml' } + let(:hashpath){ 'spec/fixtures/files/datahashes/core/uoc1.json' } + let(:fixturepath){ 'core/uoc1.xml' } it 'does not map unexpected fields' do expect(diff).to eq([]) diff --git a/spec/collectionspace/mapper/data_mapper_spec.rb b/spec/collectionspace/mapper/data_mapper_spec.rb index ee5ef077..69c15ebe 100644 --- a/spec/collectionspace/mapper/data_mapper_spec.rb +++ b/spec/collectionspace/mapper/data_mapper_spec.rb @@ -16,29 +16,30 @@ context 'acquisition record' do before(:all) do @acq_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/fcart/fcart_3-0-1_acquisition.json') - @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @acq_mapper, client: @client, cache: @cache, config: @config) + @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @acq_mapper, client: @client, cache: @cache, + config: @config) end it 'maps records as expected in sequence' do - data1 = JSON.parse("{\"creditline\":\"Gift of Frances, 1985\",\"accessiondategroup\":\"1985\",\"acquisitionmethod\":\"unknown-provenance\",\"acquisitionreferencenumber\":\"ACC216 (migrated accession)\",\"acquisitionsourceperson\":\"\",\"acquisitionsourceorganization\":\"\",\"acquisitionauthorizer\":\"\",\"acquisitionnote\":\"\"}") - data2 = JSON.parse("{\"creditline\":\"\",\"accessiondategroup\":\"\",\"acquisitionmethod\":\"unknown-provenance\",\"acquisitionreferencenumber\":\"ACC215 (migrated accession)\",\"acquisitionsourceperson\":\"\",\"acquisitionsourceorganization\":\"\",\"acquisitionauthorizer\":\"\",\"acquisitionnote\":\"\"}") - data3 = JSON.parse("{\"creditline\":\"Gift of Elizabeth, 1985\",\"accessiondategroup\":\"1985\",\"acquisitionmethod\":\"gift\",\"acquisitionreferencenumber\":\"ACC208 (migrated accession)\",\"acquisitionsourceperson\":\"Elizabeth\",\"acquisitionsourceorganization\":\"\",\"acquisitionauthorizer\":\"\",\"acquisitionnote\":\"Acquisition source role(s): Donor\"}") + data1 = JSON.parse('{"creditline":"Gift of Frances, 1985","accessiondategroup":"1985","acquisitionmethod":"unknown-provenance","acquisitionreferencenumber":"ACC216 (migrated accession)","acquisitionsourceperson":"","acquisitionsourceorganization":"","acquisitionauthorizer":"","acquisitionnote":""}') + data2 = JSON.parse('{"creditline":"","accessiondategroup":"","acquisitionmethod":"unknown-provenance","acquisitionreferencenumber":"ACC215 (migrated accession)","acquisitionsourceperson":"","acquisitionsourceorganization":"","acquisitionauthorizer":"","acquisitionnote":""}') + data3 = JSON.parse('{"creditline":"Gift of Elizabeth, 1985","accessiondategroup":"1985","acquisitionmethod":"gift","acquisitionreferencenumber":"ACC208 (migrated accession)","acquisitionsourceperson":"Elizabeth","acquisitionsourceorganization":"","acquisitionauthorizer":"","acquisitionnote":"Acquisition source role(s): Donor"}') data = [data1, data2, data3] preppers = data.map{ |d| CollectionSpace::Mapper::DataPrepper.new(d, @handler) } - mappers = preppers.map{ |prepper| CollectionSpace::Mapper::DataMapper.new(prepper.prep.response, @handler, prepper.xphash) } + mappers = preppers.map{ |prepper| + CollectionSpace::Mapper::DataMapper.new(prepper.prep.response, @handler, prepper.xphash) } docs = mappers.map{ |mapper| remove_namespaces(mapper.response.doc) } docxpaths = docs.map{ |doc| list_xpaths(doc) } fixpaths = ['fcart/acqseq1.xml', 'fcart/acqseq2.xml', 'fcart/acqseq3.xml'] fixdocs = fixpaths.map{ |path| get_xml_fixture(path) } fixxpaths = fixdocs.map{ |doc| list_xpaths(doc) } - + expect(docxpaths).to eq(fixxpaths) end - end end - + context 'core profile' do before(:all) do @client = core_client @@ -47,8 +48,8 @@ context 'collectionobject record' do before(:all) do @collectionobject_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json') - @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @collectionobject_mapper, client: @client, cache: @cache) - + @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @collectionobject_mapper, client: @client, + cache: @cache) end context 'overflow subgroup record with uneven subgroup values' do before(:all) do @@ -98,8 +99,8 @@ context 'media record' do before(:all) do @media_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_media.json') - @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @media_mapper, client: @client, cache: @cache) - + @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @media_mapper, client: @client, + cache: @cache) end context 'sending through the bomb emoji' do it 'sends through an empty node for any field containing bomb' do @@ -115,7 +116,7 @@ end end end - + context 'lhmc profile' do before(:all) do @client = lhmc_client @@ -125,7 +126,8 @@ before(:all) do @recmapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/lhmc/lhmc_3-1-1_person-local.json') @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @recmapper, client: @client, cache: @cache) - @prepper = CollectionSpace::Mapper::DataPrepper.new({'termDisplayName' => 'Xanadu', 'placeNote' => 'note'}, @handler) + @prepper = CollectionSpace::Mapper::DataPrepper.new({'termDisplayName' => 'Xanadu', 'placeNote' => 'note'}, + @handler) @datamapper = CollectionSpace::Mapper::DataMapper.new(@prepper.prep.response, @handler, @prepper.xphash) @mapped_doc = remove_namespaces(@datamapper.response.doc) end @@ -155,7 +157,6 @@ end end end - context 'botgarden profile' do before(:all) do @@ -194,7 +195,6 @@ describe '#add_short_id' do it 'adds shortIdentifier' do - end end end @@ -206,13 +206,13 @@ 'collection' => { special: %w[downcase_value], replacements: [ - { find: ' ', replace: '-', type: :plain } + {find: ' ', replace: '-', type: :plain} ] }, 'ageRange' => { special: %w[downcase_value], replacements: [ - { find: ' - ', replace: '-', type: :plain } + {find: ' - ', replace: '-', type: :plain} ] } }, @@ -223,7 +223,8 @@ } @recmapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') - @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @recmapper, client: @client, cache: @cache, config: config) + @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @recmapper, client: @client, cache: @cache, + config: config) @prepper = CollectionSpace::Mapper::DataPrepper.new(anthro_co_1, @handler) @datamapper = CollectionSpace::Mapper::DataMapper.new(@prepper.prep.response, @handler, @prepper.xphash) end @@ -245,7 +246,7 @@ expect(res).to be_a(Nokogiri::XML::Document) end end - + describe '#add_namespaces' do it 'adds namespace definitions' do urihash = @datamapper.handler.mapper.config.ns_uri.clone diff --git a/spec/collectionspace/mapper/data_prepper_spec.rb b/spec/collectionspace/mapper/data_prepper_spec.rb index 82693793..2bd3e1d9 100644 --- a/spec/collectionspace/mapper/data_prepper_spec.rb +++ b/spec/collectionspace/mapper/data_prepper_spec.rb @@ -6,7 +6,7 @@ before(:all) do @config = {delimiter: ';'} end - + context 'anthro profile' do before(:all) do @client = anthro_client @@ -16,7 +16,7 @@ 'collection' => { special: %w[downcase_value], replacements: [ - { find: ' ', replace: '-', type: :plain } + {find: ' ', replace: '-', type: :plain} ] }, 'ageRange' => { @@ -29,7 +29,7 @@ }, force_defaults: false }) - + @collectionobject_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @collectionobject_mapper, client: @client, @@ -51,7 +51,7 @@ context 'and no value is given for that field in the incoming data' do it 'maps the default values' do res = @prepper.prep.response.merged_data['publishto'] - ex = "DPLA;Omeka" + ex = 'DPLA;Omeka' expect(res).to eq(ex) end end @@ -71,7 +71,8 @@ }, force_defaults: true, } - dh = CollectionSpace::Mapper::DataHandler.new(record_mapper: @collectionobject_mapper, client: @client, cache: @cache, config: config) + dh = CollectionSpace::Mapper::DataHandler.new(record_mapper: @collectionobject_mapper, client: @client, + cache: @cache, config: config) dp = CollectionSpace::Mapper::DataPrepper.new(anthro_co_1, dh) res = dp.prep.response.merged_data['collection'] ex = 'library-collection' @@ -91,7 +92,8 @@ context 'when authority record' do before(:all) do @place_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_place-local.json') - @place_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @place_mapper, client: @client, cache: @cache, config: @config) + @place_handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @place_mapper, client: @client, + cache: @cache, config: @config) data = get_datahash(path: 'spec/fixtures/files/datahashes/core/place001.json') @place_prepper = CollectionSpace::Mapper::DataPrepper.new(data, @place_handler) end @@ -166,7 +168,8 @@ context 'and one or more combined field values is blank' do before(:all) do @core_conservation_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_conservation.json') - @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @core_conservation_mapper, client: @client, cache: @cache, config: @config) + @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @core_conservation_mapper, + client: @client, cache: @cache, config: @config) data = get_datahash(path: 'spec/fixtures/files/datahashes/core/conservation0_1.json') @prepper = CollectionSpace::Mapper::DataPrepper.new(data, @handler) @xpath = 'conservation_common/conservationStatusGroupList/conservationStatusGroup' @@ -185,9 +188,10 @@ context 'when multi-authority field is part of repeating field subgroup' do before(:all) do @core_media_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_media.json') - @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @core_media_mapper, client: @client, cache: @cache, config: @config) + @handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @core_media_mapper, client: @client, + cache: @cache, config: @config) end - + context 'when there is more than one group' do before(:all) do data = get_datahash(path: 'spec/fixtures/files/datahashes/core/media1_1.json') @@ -202,11 +206,11 @@ "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Gomongo1599463746195)'Gomongo'", "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Comodore1599463826401)'Comodore'", "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Cuckoo1599463786824)'Cuckoo'", - ""], + ''], [ "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Gomongo1599463746195)'Gomongo'", "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Cuckoo1599463786824)'Cuckoo'", - ] + ] ] expect(result).to eq(expected) end @@ -224,11 +228,11 @@ "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Gomongo1599463746195)'Gomongo'", "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Comodore1599463826401)'Comodore'", "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Cuckoo1599463786824)'Cuckoo'", - ""], + ''], ] expect(result).to eq(expected) end - end + end end end diff --git a/spec/collectionspace/mapper/data_quality_checker_spec.rb b/spec/collectionspace/mapper/data_quality_checker_spec.rb index 67558a11..dc71776b 100644 --- a/spec/collectionspace/mapper/data_quality_checker_spec.rb +++ b/spec/collectionspace/mapper/data_quality_checker_spec.rb @@ -3,9 +3,9 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::DataQualityChecker do - let(:recordmapper) { instance_double('CS::Mapper::RecordMapper') } - let(:mapping) { CollectionSpace::Mapper::ColumnMapping.new(maphash, recordmapper) } - + let(:recordmapper){ instance_double('CS::Mapper::RecordMapper') } + let(:mapping){ CollectionSpace::Mapper::ColumnMapping.new(maphash, recordmapper) } + context 'when source_type = optionlist' do let(:maphash) { { fieldname: 'collection', diff --git a/spec/collectionspace/mapper/data_splitter_spec.rb b/spec/collectionspace/mapper/data_splitter_spec.rb index 0935408c..0ff7d64d 100644 --- a/spec/collectionspace/mapper/data_splitter_spec.rb +++ b/spec/collectionspace/mapper/data_splitter_spec.rb @@ -4,9 +4,9 @@ RSpec.describe CollectionSpace::Mapper::SimpleSplitter do before(:all) do - @config = CS::Mapper::Config.new(config: { delimiter: ';', subgroup_delimiter: '^^' }) + @config = CS::Mapper::Config.new(config: {delimiter: ';', subgroup_delimiter: '^^'}) end - + describe '#result' do context 'when "a"' do it 'returns ["a"]' do @@ -48,34 +48,34 @@ end RSpec.describe CollectionSpace::Mapper::SubgroupSplitter do - before(:all) do - @config = CS::Mapper::Config.new(config: { delimiter: ';', subgroup_delimiter: '^^' }) - end + before(:all) do + @config = CS::Mapper::Config.new(config: {delimiter: ';', subgroup_delimiter: '^^'}) + end - describe '#result' do - context 'when "a^^b;c^^d"' do - it 'returns [["a", "b"], ["c", "d"]]' do - s = CollectionSpace::Mapper::SubgroupSplitter.new('a^^b;c^^d', @config) - expect(s.result).to eq([%w[a b], %w[c d]]) - end - end - context 'when "a;c"' do - it 'returns [["a"], ["c"]]' do - s = CollectionSpace::Mapper::SubgroupSplitter.new('a;c', @config) - expect(s.result).to eq([%w[a], %w[c]]) - end - end - context 'when "a;c^^d"' do - it 'returns [["a"], ["c", "d"]]' do - s = CollectionSpace::Mapper::SubgroupSplitter.new('a;c^^d', @config) - expect(s.result).to eq([%w[a], %w[c d]]) - end - end - context 'when "a^^;c^^d"' do - it 'returns [["a", ""], ["c", "d"]]' do - s = CollectionSpace::Mapper::SubgroupSplitter.new('a^^;c^^d', @config) - expect(s.result).to eq([['a', ''], %w[c d]]) - end - end - end + describe '#result' do + context 'when "a^^b;c^^d"' do + it 'returns [["a", "b"], ["c", "d"]]' do + s = CollectionSpace::Mapper::SubgroupSplitter.new('a^^b;c^^d', @config) + expect(s.result).to eq([%w[a b], %w[c d]]) + end + end + context 'when "a;c"' do + it 'returns [["a"], ["c"]]' do + s = CollectionSpace::Mapper::SubgroupSplitter.new('a;c', @config) + expect(s.result).to eq([%w[a], %w[c]]) + end + end + context 'when "a;c^^d"' do + it 'returns [["a"], ["c", "d"]]' do + s = CollectionSpace::Mapper::SubgroupSplitter.new('a;c^^d', @config) + expect(s.result).to eq([%w[a], %w[c d]]) + end + end + context 'when "a^^;c^^d"' do + it 'returns [["a", ""], ["c", "d"]]' do + s = CollectionSpace::Mapper::SubgroupSplitter.new('a^^;c^^d', @config) + expect(s.result).to eq([['a', ''], %w[c d]]) + end + end + end end diff --git a/spec/collectionspace/mapper/data_validator_spec.rb b/spec/collectionspace/mapper/data_validator_spec.rb index f56bd57c..9f1b96f1 100644 --- a/spec/collectionspace/mapper/data_validator_spec.rb +++ b/spec/collectionspace/mapper/data_validator_spec.rb @@ -8,13 +8,13 @@ describe '#present_in?' do context 'when data has field key' do it 'returns true' do - data = { 'objectnumber' => '123' } + data = {'objectnumber' => '123'} expect(@rf.present_in?(data)).to be true end end context 'when data lacks field key' do it 'returns false' do - data = { 'objectid' => '123' } + data = {'objectid' => '123'} expect(@rf.present_in?(data)).to be false end end @@ -22,13 +22,13 @@ describe '#populated_in?' do context 'when field is populated' do it 'returns true' do - data = { 'objectnumber' => '123' } + data = {'objectnumber' => '123'} expect(@rf.populated_in?(data)).to be true end end context 'when field is not populated' do it 'returns false' do - data = { 'objectnumber' => '' } + data = {'objectnumber' => ''} expect(@rf.populated_in?(data)).to be false end end @@ -53,13 +53,13 @@ describe '#present_in?' do context 'when data contains one of the field datacolumns' do it 'returns true' do - data = { 'currentLocationLocationLocal' => 'Big Room' } + data = {'currentLocationLocationLocal' => 'Big Room'} expect(@rf.present_in?(data)).to be true end end context 'when data lacks any of the field datacolumns' do it 'returns false' do - data = { 'objectid' => '123' } + data = {'objectid' => '123'} expect(@rf.present_in?(data)).to be false end end @@ -67,13 +67,13 @@ describe '#populated_in?' do context 'when data contains one of the field datacolumns' do it 'returns true' do - data = { 'currentLocationLocationLocal' => 'Big Room' } + data = {'currentLocationLocationLocal' => 'Big Room'} expect(@rf.populated_in?(data)).to be true end end context 'when data lacks any of the field datacolumns' do it 'returns false' do - data = { 'currentLocationLocationLocal' => '' } + data = {'currentLocationLocationLocal' => ''} expect(@rf.populated_in?(data)).to be false end end @@ -93,36 +93,41 @@ RSpec.describe CollectionSpace::Mapper::DataValidator do before(:all) do @anthro_object_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') - @anthro_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @anthro_object_mapper, termcache: anthro_cache), anthro_cache) + @anthro_dv = CollectionSpace::Mapper::DataValidator.new( +CollectionSpace::Mapper::RecordMapper.new(mapper: @anthro_object_mapper, termcache: anthro_cache), anthro_cache) @botgarden_loanout_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/botgarden/botgarden_2-0-1_loanout.json') - @botgarden_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @botgarden_loanout_mapper, termcache: botgarden_cache), botgarden_cache) + @botgarden_dv = CollectionSpace::Mapper::DataValidator.new( +CollectionSpace::Mapper::RecordMapper.new(mapper: @botgarden_loanout_mapper, + termcache: botgarden_cache), botgarden_cache) @core_authhier_mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_authorityhierarchy.json') - @core_authhier_dv = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @core_authhier_mapper, termcache: core_cache), core_cache) + @core_authhier_dv = CollectionSpace::Mapper::DataValidator.new( +CollectionSpace::Mapper::RecordMapper.new(mapper: @core_authhier_mapper, termcache: core_cache), core_cache) end describe '#validate' do it 'returns a CollectionSpace::Mapper::Response' do - data = { 'objectNumber' => '123' } + data = {'objectNumber' => '123'} expect(@anthro_dv.validate(data)).to be_a(CollectionSpace::Mapper::Response) end context 'when recordtype has multiauthority required field' do before(:all) do @mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_movement.json') - @validator = CollectionSpace::Mapper::DataValidator.new(CollectionSpace::Mapper::RecordMapper.new(mapper: @mapper, termcache: core_cache), core_cache) + @validator = CollectionSpace::Mapper::DataValidator.new( +CollectionSpace::Mapper::RecordMapper.new(mapper: @mapper, termcache: core_cache), core_cache) end it 'validates' do - data = { 'movementReferenceNumber' => '1', 'currentLocationLocationLocal' => 'Loc' } + data = {'movementReferenceNumber' => '1', 'currentLocationLocationLocal' => 'Loc'} v = @validator.validate(data) expect(v.valid?).to be true end end - + context 'when recordtype has required field(s)' do context 'and when required field present' do context 'and required field populated' do it 'no required field error returned' do - data = { 'objectNumber' => '123' } + data = {'objectNumber' => '123'} v = @anthro_dv.validate(data) err = v.errors.select{ |errhash| errhash[:type].start_with?('required field') } expect(err.size).to eq(0) @@ -131,7 +136,7 @@ context 'and required field present but empty' do it 'required field error returned with message "required field empty"' do - data = { 'objectNumber' => '' } + data = {'objectNumber' => ''} v = @anthro_dv.validate(data) err = v.errors.select{ |err| err.start_with?('required field empty') } expect(err.size).to eq(1) @@ -141,7 +146,7 @@ context 'when required field not present in data' do it 'required field error returned with message "required field missing"' do - data = { 'randomField' => 'random value' } + data = {'randomField' => 'random value'} v = @anthro_dv.validate(data) err = v.errors.select{ |err| err.start_with?('required field missing') } expect(err.size).to eq(1) @@ -151,8 +156,8 @@ context 'when required field not present in data but provided by defaults' do it 'no required field error returned', services_call: true do handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: @core_authhier_mapper, - client: core_client, - cache: core_cache) + client: core_client, + cache: core_cache) data = get_datahash(path: 'spec/fixtures/files/datahashes/core/authorityHierarchy1.json') v = handler.validate(data) err = v.errors.select{ |err| err.start_with?('required field') } @@ -166,7 +171,7 @@ context 'and when record id field present' do context 'and record id field populated' do it 'no required field error returned' do - data = { 'loanOutNumber' => '123' } + data = {'loanOutNumber' => '123'} v = @botgarden_dv.validate(data) err = v.errors.select{ |err| err.start_with?('required field') } expect(err.size).to eq(0) @@ -175,7 +180,7 @@ context 'and record id field present but empty' do it 'required field error returned with message "required field empty"' do - data = { 'loanOutNumber' => '' } + data = {'loanOutNumber' => ''} v = @botgarden_dv.validate(data) err = v.errors.select{ |err| err.start_with?('required field empty') } expect(err.size).to eq(1) @@ -185,7 +190,7 @@ context 'when record id field not present in data' do it 'required field error returned with message "required field missing"' do - data = { 'randomField' => 'random value' } + data = {'randomField' => 'random value'} v = @botgarden_dv.validate(data) err = v.errors.select{ |err| err.start_with?('required field missing') } expect(err.size).to eq(1) diff --git a/spec/collectionspace/mapper/find_replace_operation_spec.rb b/spec/collectionspace/mapper/find_replace_operation_spec.rb index 7ef9b262..bc0c4579 100644 --- a/spec/collectionspace/mapper/find_replace_operation_spec.rb +++ b/spec/collectionspace/mapper/find_replace_operation_spec.rb @@ -3,20 +3,20 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::FindReplaceOperation do - let(:operation) { described_class.new(opspec) } + let(:operation){ described_class.new(opspec) } describe '.create' do - let(:creator) { described_class.create(opspec) } - + let(:creator){ described_class.create(opspec) } + context 'given a plain operation' do - let(:opspec) { {find: ' ', replace:'-', type: 'plain'} } + let(:opspec){ {find: ' ', replace:'-', type: 'plain'} } it 'returns a FindReplaceOperation' do expect(creator).to be_a(CS::Mapper::FindReplaceOperation) end end context 'given a regex operation' do - let(:opspec) { {find: '(\d)-A', replace: '\1 A', type: 'regex'} } + let(:opspec){ {find: '(\d)-A', replace: '\1 A', type: 'regex'} } it 'returns a RegexFindReplaceOperation' do expect(creator).to be_a(CS::Mapper::RegexFindReplaceOperation) end @@ -24,17 +24,17 @@ end describe '#perform' do - let(:opspec) { {find: ' ', replace:'-', type: 'plain'} } - let(:result) { operation.perform(value) } + let(:opspec){ {find: ' ', replace:'-', type: 'plain'} } + let(:result){ operation.perform(value) } context 'given blank value' do - let(:value) { '' } + let(:value){ '' } it 'returns empty string' do expect(result).to eq('') end end context 'given value with multiple occurrences of find pattern' do - let(:value) { 'a b c d' } + let(:value){ 'a b c d' } it 'replaces all of them' do expect(result).to eq('a-b-c-d') end diff --git a/spec/collectionspace/mapper/find_replace_transformer_spec.rb b/spec/collectionspace/mapper/find_replace_transformer_spec.rb index 0c220567..9b015b73 100644 --- a/spec/collectionspace/mapper/find_replace_transformer_spec.rb +++ b/spec/collectionspace/mapper/find_replace_transformer_spec.rb @@ -7,7 +7,7 @@ {find: ' ', replace:'-', type: 'plain'}, {find: '(\d)-A', replace: '\1 A', type: 'regex'} ] } - let(:transformer) { described_class.new(transform: transform) } + let(:transformer){ described_class.new(transform: transform) } describe '#precedence' do it 'returns 0' do @@ -16,17 +16,17 @@ end describe '#transform' do - let(:result) { transformer.transform(value) } + let(:result){ transformer.transform(value) } context 'given "boo baz1 A"' do - let(:value) { 'boo baz1 A' } + let(:value){ 'boo baz1 A' } it 'returns "boo-baz1 A"' do expect(result).to eq('boo-baz1 A') end end context 'given blank value' do - let(:value) { '' } + let(:value){ '' } it 'returns ""' do expect(result).to eq('') end diff --git a/spec/collectionspace/mapper/group_column_value_spec.rb b/spec/collectionspace/mapper/group_column_value_spec.rb index 7fac15a6..a6833fc0 100644 --- a/spec/collectionspace/mapper/group_column_value_spec.rb +++ b/spec/collectionspace/mapper/group_column_value_spec.rb @@ -3,20 +3,20 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::GroupColumnValue do - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } - let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } + let(:config){ {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), batchconfig: config, - termcache: core_cache) } - let(:mapping) { recmapper.mappings.lookup(colname) } + termcache: core_cache) } + let(:mapping){ recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, recmapper: recmapper, mapping: mapping) } describe '#split' do - let(:colname) { 'title' } - let(:colvalue) { 'blah| blah' } + let(:colname){ 'title' } + let(:colvalue){ 'blah| blah' } it 'returns value as stripped element(s) in Array' do expect(colval.split).to eq(['blah', 'blah']) end diff --git a/spec/collectionspace/mapper/group_multival_column_value_spec.rb b/spec/collectionspace/mapper/group_multival_column_value_spec.rb index 3091b576..cfcb807a 100644 --- a/spec/collectionspace/mapper/group_multival_column_value_spec.rb +++ b/spec/collectionspace/mapper/group_multival_column_value_spec.rb @@ -3,23 +3,23 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::GroupMultivalColumnValue do - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json' } - let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/bonsai/bonsai_4-1-1_conservation.json' } + let(:config){ {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), batchconfig: config, - termcache: bonsai_cache) } - let(:mapping) { recmapper.mappings.lookup(colname) } + termcache: bonsai_cache) } + let(:mapping){ recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, recmapper: recmapper, mapping: mapping) } describe '#split' do - let(:colname) { 'fertilizerToBeUsed' } - let(:colvalue) { 'a|b^^c' } + let(:colname){ 'fertilizerToBeUsed' } + let(:colvalue){ 'a|b^^c' } it 'returns value(s) as Hash where group occurrences are the keys' do - expected = { 1=> ['a'], - 2=> ['b', 'c'] } + expected = {1 => ['a'], + 2 => ['b', 'c']} expect(colval.split).to eq(expected) end end diff --git a/spec/collectionspace/mapper/multival_column_value_spec.rb b/spec/collectionspace/mapper/multival_column_value_spec.rb index 89e64145..215d7377 100644 --- a/spec/collectionspace/mapper/multival_column_value_spec.rb +++ b/spec/collectionspace/mapper/multival_column_value_spec.rb @@ -3,20 +3,20 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::MultivalColumnValue do - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } - let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } + let(:config){ {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), batchconfig: config, - termcache: core_cache) } - let(:mapping) { recmapper.mappings.lookup(colname) } + termcache: core_cache) } + let(:mapping){ recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, recmapper: recmapper, mapping: mapping) } describe '#split' do - let(:colname) { 'collection' } - let(:colvalue) { 'blah| blah' } + let(:colname){ 'collection' } + let(:colvalue){ 'blah| blah' } it 'returns value as stripped element(s) in Array' do expect(colval.split).to eq(['blah', 'blah']) end diff --git a/spec/collectionspace/mapper/record_mapper_config_spec.rb b/spec/collectionspace/mapper/record_mapper_config_spec.rb index fc9347e2..5011d1cf 100644 --- a/spec/collectionspace/mapper/record_mapper_config_spec.rb +++ b/spec/collectionspace/mapper/record_mapper_config_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::RecordMapperConfig do - let(:hash) { { 'ns_uri' => { + let(:hash) { {'ns_uri' => { 'collectionobjects_common' => 'http://collectionspace.org/services/collectionobject', 'collectionobjects_anthro' => 'http://collectionspace.org/services/collectionobject/domain/anthro', 'collectionobjects_annotation' => 'http://collectionspace.org/services/collectionobject/domain/annotation', @@ -12,7 +12,7 @@ 'collectionobjects_naturalhistory_extension' => 'http://collectionspace.org/services/collectionobject/domain/naturalhistory_extension', 'somethingelse_common' => 'http://collectionspace.org/services/collectionobject/domain/nagpra' }} } - let(:config) { described_class.new(hash) } + let(:config){ described_class.new(hash) } describe '#namespaces' do it 'returns Array of namespace names' do expect(config.namespaces.sort).to eq(hash['ns_uri'].keys.sort) diff --git a/spec/collectionspace/mapper/record_mapper_spec.rb b/spec/collectionspace/mapper/record_mapper_spec.rb index 935a9c03..a035962f 100644 --- a/spec/collectionspace/mapper/record_mapper_spec.rb +++ b/spec/collectionspace/mapper/record_mapper_spec.rb @@ -3,26 +3,26 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::RecordMapper do - let(:path) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json' } - let(:jsonmapper) { get_json_record_mapper(path) } - let(:client) { anthro_client } - let(:mapper) { mapr = described_class.new(mapper: jsonmapper, csclient: client, termcache: anthro_cache) } + let(:path){ 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json' } + let(:jsonmapper){ get_json_record_mapper(path) } + let(:client){ anthro_client } + let(:mapper){ mapr = described_class.new(mapper: jsonmapper, csclient: client, termcache: anthro_cache) } it 'has expected instance variables' do - expected = [:@xpath, :@config, :@xml_template, :@mappings, :@batchconfig, :@csclient, :@termcache].sort + expected = %i[@xpath @config @xml_template @mappings @batchconfig @csclient @termcache].sort expect(mapper.instance_variables.sort).to eq(expected) end describe '#service_type' do context 'when initialized with authority mapper' do - let(:path) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_citation-local.json' } + let(:path){ 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_citation-local.json' } it 'returns Authority module name' do expect(mapper.service_type).to eq(CS::Mapper::Authority) end end context 'when initialized with relationship mapper' do - let(:path) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_authorityhierarchy.json' } + let(:path){ 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_authorityhierarchy.json' } it 'returns Relationship module name' do expect(mapper.service_type).to eq(CS::Mapper::Relationship) end diff --git a/spec/collectionspace/mapper/regex_find_replace_operation_spec.rb b/spec/collectionspace/mapper/regex_find_replace_operation_spec.rb index 4a9bc269..faca1d79 100644 --- a/spec/collectionspace/mapper/regex_find_replace_operation_spec.rb +++ b/spec/collectionspace/mapper/regex_find_replace_operation_spec.rb @@ -3,35 +3,35 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::RegexFindReplaceOperation do - let(:operation) { described_class.new(opspec) } + let(:operation){ described_class.new(opspec) } describe '#perform' do - let(:opspec) { {find: '(az|oo) ', replace:'\1-', type: 'regexp'} } - let(:result) { operation.perform(value) } + let(:opspec){ {find: '(az|oo) ', replace:'\1-', type: 'regexp'} } + let(:result){ operation.perform(value) } context 'given blank value' do - let(:value) { '' } + let(:value){ '' } it 'returns empty string' do expect(result).to eq('') end end context 'given value with no occurrences of find pattern' do - let(:value) { 'a b c d' } + let(:value){ 'a b c d' } it 'returns original value' do expect(result).to eq('a b c d') end end context 'given value with multiple occurrences of find pattern' do - let(:value) { 'mazel book foo baz raz' } + let(:value){ 'mazel book foo baz raz' } it 'replaces them all' do expect(result).to eq('mazel book foo-baz-raz') end end context 'given anchored find pattern' do - let(:opspec) { {find: '^mazel ', replace: 'Mazel ', type: 'regexp'} } - let(:value) { 'mazel book foo baz raz' } + let(:opspec){ {find: '^mazel ', replace: 'Mazel ', type: 'regexp'} } + let(:value){ 'mazel book foo baz raz' } it 'replaces as expected' do expect(result).to eq('Mazel book foo baz raz') end diff --git a/spec/collectionspace/mapper/response_spec.rb b/spec/collectionspace/mapper/response_spec.rb index 801d17dc..3ae15ab6 100644 --- a/spec/collectionspace/mapper/response_spec.rb +++ b/spec/collectionspace/mapper/response_spec.rb @@ -16,14 +16,14 @@ describe '#valid?' do context 'when there are no errors' do it 'returns true' do - data = { 'termDisplayName' => 'Tanacetum' } + data = {'termDisplayName' => 'Tanacetum'} validation_response = @handler.validate(data) expect(validation_response.valid?).to be true end end context 'when there is one or more errors' do it 'returns false' do - data = { 'taxonName' => 'Tanacetum' } + data = {'taxonName' => 'Tanacetum'} validation_response = @handler.validate(data) expect(validation_response.valid?).to be false end @@ -33,7 +33,7 @@ describe '#normal', services_call: true do context 'when response_mode = normal in config' do before(:all) do - @data = { 'termDisplayName' => 'Tanacetum;Tansy', 'termStatus' => 'made up' } + @data = {'termDisplayName' => 'Tanacetum;Tansy', 'termStatus' => 'made up'} vresponse = @handler.validate(@data) @response = @handler.process(vresponse) end @@ -67,7 +67,7 @@ describe '#xml' do context 'when there is a doc', services_call: true do it 'returns string' do - data = { 'termDisplayName' => 'Tanacetum;Tansy', 'termStatus' => 'made up' } + data = {'termDisplayName' => 'Tanacetum;Tansy', 'termStatus' => 'made up'} vresponse = @handler.validate(data) response = @handler.process(vresponse).xml expect(response).to be_a(String) @@ -75,7 +75,7 @@ end context 'when there is no doc' do it 'returns nil' do - data = { 'termDisplayName' => 'Tanacetum;Tansy', 'termStatus' => 'made up' } + data = {'termDisplayName' => 'Tanacetum;Tansy', 'termStatus' => 'made up'} vresponse = @handler.validate(data) response = vresponse.xml expect(response).to be_nil diff --git a/spec/collectionspace/mapper/row_data_spec.rb b/spec/collectionspace/mapper/row_data_spec.rb index 3bd2198c..ffb8f521 100644 --- a/spec/collectionspace/mapper/row_data_spec.rb +++ b/spec/collectionspace/mapper/row_data_spec.rb @@ -3,15 +3,15 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::RowData do - let(:recmapper) { core_object_mapper} + let(:recmapper){ core_object_mapper} let(:data_hash) { { - 'objectNumber'=>'123', - 'comment'=>'blah', - 'title'=>'The title', - 'titleTranslation'=>'La title' + 'objectNumber' => '123', + 'comment' => 'blah', + 'title' => 'The title', + 'titleTranslation' => 'La title' } } - let(:row) { CollectionSpace::Mapper::RowData.new(data_hash, recmapper) } + let(:row){ CollectionSpace::Mapper::RowData.new(data_hash, recmapper) } describe '#columns' do it 'returns Array' do diff --git a/spec/collectionspace/mapper/subgroup_column_value_spec.rb b/spec/collectionspace/mapper/subgroup_column_value_spec.rb index e71052ef..6da9b59e 100644 --- a/spec/collectionspace/mapper/subgroup_column_value_spec.rb +++ b/spec/collectionspace/mapper/subgroup_column_value_spec.rb @@ -3,23 +3,23 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::SubgroupColumnValue do - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } - let(:config) { {delimiter: '|', subgroup_delimiter: '^^'} } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } + let(:config){ {delimiter: '|', subgroup_delimiter: '^^'} } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper(mapperpath), batchconfig: config, - termcache: core_cache) } - let(:mapping) { recmapper.mappings.lookup(colname) } + termcache: core_cache) } + let(:mapping){ recmapper.mappings.lookup(colname) } let(:colval) { described_class.new(column: colname, value: colvalue, recmapper: recmapper, mapping: mapping) } describe '#split' do - let(:colname) { 'titleTranslation' } - let(:colvalue) { 'a|b^^c' } + let(:colname){ 'titleTranslation' } + let(:colvalue){ 'a|b^^c' } it 'returns value(s) as Hash where group occurrences are the keys' do - expected = { 1=> ['a'], - 2=> ['b', 'c'] } + expected = {1 => ['a'], + 2 => ['b', 'c']} expect(colval.split).to eq(expected) end end diff --git a/spec/collectionspace/mapper/term_handler_spec.rb b/spec/collectionspace/mapper/term_handler_spec.rb index 97250f9e..b71ce449 100644 --- a/spec/collectionspace/mapper/term_handler_spec.rb +++ b/spec/collectionspace/mapper/term_handler_spec.rb @@ -3,13 +3,13 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::TermHandler do - let(:client) { core_client } - let(:termcache) { core_cache } - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } + let(:client){ core_client } + let(:termcache){ core_cache } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_collectionobject.json' } let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: File.read(mapperpath), csclient: client, termcache: termcache) } - let(:colmapping) { recmapper.mappings.lookup(colname) } + let(:colmapping){ recmapper.mappings.lookup(colname) } let(:th) { CS::Mapper::TermHandler.new(mapping: colmapping, data: data, client: client, @@ -53,48 +53,48 @@ # end describe '#result' do - context 'titletranslationlanguage (vocabulary, field subgroup)' do - let(:colname) { 'titleTranslationLanguage' } - let(:data) { [['%NULLVALUE%', 'Swahili'], ['Klingon', 'Spanish'], [CS::Mapper::THE_BOMB]] } + context 'titletranslationlanguage (vocabulary, field subgroup)' do + let(:colname){ 'titleTranslationLanguage' } + let(:data){ [['%NULLVALUE%', 'Swahili'], ['Klingon', 'Spanish'], [CS::Mapper::THE_BOMB]] } - it 'result is the transformed value for mapping' do - expected = [['', - "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(swa)'Swahili'"], - ["urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(Klingon)'Klingon'", - "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(spa)'Spanish'"], - [CS::Mapper::THE_BOMB]] - expect(th.result).to eq(expected) - end - it 'all values are refnames, blanks, or the bomb' do - chk = th.result.flatten.select{ |v| v.start_with?('urn:') || v.empty? || v = CS::Mapper::THE_BOMB } - expect(chk.length).to eq(5) + it 'result is the transformed value for mapping' do + expected = [['', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(swa)'Swahili'"], + ["urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(Klingon)'Klingon'", + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(spa)'Spanish'"], + [CS::Mapper::THE_BOMB]] + expect(th.result).to eq(expected) + end + it 'all values are refnames, blanks, or the bomb' do + chk = th.result.flatten.select{ |v| v.start_with?('urn:') || v.empty? || v = CS::Mapper::THE_BOMB } + expect(chk.length).to eq(5) + end end - end - context 'reference (authority, field group)' do - let(:colname) { 'referenceLocal' } - let(:data) { ['Reference 1', 'Reference 2', '%NULLVALUE%'] } - - it 'result is the transformed value for mapping' do - expected = [ - "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Reference11143445083)'Reference 1'", - "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Reference22573957271)'Reference 2'", - '' - ] - expect(th.result).to eq(expected) - end - it 'all values are refnames' do - chk = th.result.flatten.select{ |v| v.start_with?('urn:') } - expect(chk.length).to eq(2) + context 'reference (authority, field group)' do + let(:colname){ 'referenceLocal' } + let(:data){ ['Reference 1', 'Reference 2', '%NULLVALUE%'] } + + it 'result is the transformed value for mapping' do + expected = [ + "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Reference11143445083)'Reference 1'", + "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Reference22573957271)'Reference 2'", + '' + ] + expect(th.result).to eq(expected) + end + it 'all values are refnames' do + chk = th.result.flatten.select{ |v| v.start_with?('urn:') } + expect(chk.length).to eq(2) + end end end - end - + describe '#terms' do - let(:terms) { th.terms } + let(:terms){ th.terms } context 'titletranslationlanguage (vocabulary, field subgroup)' do - let(:colname) { 'titleTranslationLanguage' } - let(:data) { [['%NULLVALUE%', 'Swahili'], ['Sanza', 'Spanish'], [CS::Mapper::THE_BOMB]] } + let(:colname){ 'titleTranslationLanguage' } + let(:data){ [['%NULLVALUE%', 'Swahili'], ['Sanza', 'Spanish'], [CS::Mapper::THE_BOMB]] } context 'when new term (Sanza) is initially encountered' do it 'returns terms as expected' do @@ -115,8 +115,8 @@ end context 'reference (authority, field group)' do - let(:colname) { 'referenceLocal' } - let(:data) { ['Reference 3', 'Reference 3', 'Reference 4', '%NULLVALUE%'] } + let(:colname){ 'referenceLocal' } + let(:data){ ['Reference 3', 'Reference 3', 'Reference 4', '%NULLVALUE%'] } context 'when new term (Reference 3) is initially encountered' do it 'contains a term Hash for each value' do diff --git a/spec/collectionspace/mapper/tools/dates_spec.rb b/spec/collectionspace/mapper/tools/dates_spec.rb index 2c087c68..60cd5ed1 100644 --- a/spec/collectionspace/mapper/tools/dates_spec.rb +++ b/spec/collectionspace/mapper/tools/dates_spec.rb @@ -14,7 +14,7 @@ before(:all) do @res = CollectionSpace::Mapper::Tools::Dates::CspaceDate.new('2020-09-30', @client, @cache, @config) end - + it 'populates .timestamp' do res = @res.timestamp.to_s expect(res).to start_with('2020-09-30 12:00:00') @@ -62,19 +62,21 @@ context 'when no date_format specified in config' do it 'defaults to M/D/Y interpretation' do - res = CollectionSpace::Mapper::Tools::Dates::CspaceDate.new(@string, @client, @cache, @config).timestamp.to_s + res = CollectionSpace::Mapper::Tools::Dates::CspaceDate.new(@string, @client, @cache, + @config).timestamp.to_s expect(res).to start_with('2020-01-02 12:00:00') end end context 'when date_format in config = month day year' do it 'interprets as M/D/Y' do - res = CollectionSpace::Mapper::Tools::Dates::CspaceDate.new(@string, @client, @cache, @config).timestamp.to_s + res = CollectionSpace::Mapper::Tools::Dates::CspaceDate.new(@string, @client, @cache, + @config).timestamp.to_s expect(res).to start_with('2020-01-02 12:00:00') end end context 'when date_format in config = day month year' do it 'interprets as D/M/Y' do - config = CS::Mapper::Config.new(config: { date_format: 'day month year' }) + config = CS::Mapper::Config.new(config: {date_format: 'day month year'}) res = CollectionSpace::Mapper::Tools::Dates::CspaceDate.new(@string, @client, @cache, config).timestamp.to_s expect(res).to start_with('2020-02-01 12:00:00') end @@ -108,7 +110,7 @@ end end end - + context 'when date string is not Chronic parseable (e.g. 1/2/2000 - 12/21/2001)', services_call: true do before(:all) do @string = '1/2/2000 - 12/21/2001' @@ -175,7 +177,7 @@ it 'dateEarliestSingleMonth = 3' do expect(@res.mappable['dateEarliestSingleMonth']).to eq('3') end - + it 'dateLatestMonth = 3' do expect(@res.mappable['dateLatestMonth']).to eq('3') end @@ -183,7 +185,7 @@ it 'dateEarliestSingleDay = 1' do expect(@res.mappable['dateEarliestSingleDay']).to eq('1') end - + it 'dateLatestDay = 31' do expect(@res.mappable['dateLatestDay']).to eq('31') end @@ -191,7 +193,7 @@ it 'dateEarliestSingleYear = 2020' do expect(@res.mappable['dateEarliestSingleYear']).to eq('2020') end - + it 'dateLatestYear = 2020' do expect(@res.mappable['dateLatestYear']).to eq('2020') end @@ -214,7 +216,7 @@ it 'dateEarliestSingleMonth = 3' do expect(@res.mappable['dateEarliestSingleMonth']).to eq('3') end - + it 'dateLatestMonth = 3' do expect(@res.mappable['dateLatestMonth']).to eq('3') end @@ -222,7 +224,7 @@ it 'dateEarliestSingleDay = 1' do expect(@res.mappable['dateEarliestSingleDay']).to eq('1') end - + it 'dateLatestDay = 31' do expect(@res.mappable['dateLatestDay']).to eq('31') end @@ -230,7 +232,7 @@ it 'dateEarliestSingleYear = 2020' do expect(@res.mappable['dateEarliestSingleYear']).to eq('2020') end - + it 'dateLatestYear = 2020' do expect(@res.mappable['dateLatestYear']).to eq('2020') end @@ -253,7 +255,7 @@ it 'dateEarliestSingleMonth = 1' do expect(@res.mappable['dateEarliestSingleMonth']).to eq('1') end - + it 'dateLatestMonth = 12' do expect(@res.mappable['dateLatestMonth']).to eq('12') end @@ -261,7 +263,7 @@ it 'dateEarliestSingleDay = 1' do expect(@res.mappable['dateEarliestSingleDay']).to eq('1') end - + it 'dateLatestDay = 31' do expect(@res.mappable['dateLatestDay']).to eq('31') end @@ -269,7 +271,7 @@ it 'dateEarliestSingleYear = 2002' do expect(@res.mappable['dateEarliestSingleYear']).to eq('2002') end - + it 'dateLatestYear = 2002' do expect(@res.mappable['dateLatestYear']).to eq('2002') end diff --git a/spec/collectionspace/mapper/tools/record_status_service_spec.rb b/spec/collectionspace/mapper/tools/record_status_service_spec.rb index 417d9296..f1119f6b 100644 --- a/spec/collectionspace/mapper/tools/record_status_service_spec.rb +++ b/spec/collectionspace/mapper/tools/record_status_service_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::Tools::RecordStatusService, services_call: true do - let(:client) { core_client } - let(:service) { CollectionSpace::Mapper::Tools::RecordStatusService.new(client, mapper) } + let(:client){ core_client } + let(:service){ CollectionSpace::Mapper::Tools::RecordStatusService.new(client, mapper) } context 'when mapper service_path not handled by collectionspace-client' do let(:mapper) { CS::Mapper::RecordMapper.new(mapper: get_json_record_mapper( @@ -12,21 +12,20 @@ ), termcache: core_cache) } it 'raises NoClientServiceError' do - expect{ CS::Mapper::Tools::RecordStatusService.new(client, mapper) }.to raise_error(CS::Mapper::NoClientServiceError) + expect{ + CS::Mapper::Tools::RecordStatusService.new(client, mapper) }.to raise_error(CS::Mapper::NoClientServiceError) end end - - describe '#lookup' do context 'when mapper is for an authority' do let(:mapper) { CollectionSpace::Mapper::RecordMapper.new(mapper: get_json_record_mapper( 'spec/fixtures/files/mappers/release_6_1/core/core_6-1-0_person-local.json' ), termcache: core_cache) } - + context 'and one result is found' do - let(:report) { service.lookup('John Doe') } - + let(:report){ service.lookup('John Doe') } + it 'status = :existing' do expect(report[:status]).to eq(:existing) end @@ -54,7 +53,8 @@ # in core.dev # you may need to re-create them if they have been removed it 'raises error because we cannot know what to do with imported record' do - expect{ service.lookup('Inkpot Guineafowl') }.to raise_error(CollectionSpace::Mapper::MultipleCsRecordsFoundError) + expect{ + service.lookup('Inkpot Guineafowl') }.to raise_error(CollectionSpace::Mapper::MultipleCsRecordsFoundError) end end end diff --git a/spec/collectionspace/mapper/tools/refname_spec.rb b/spec/collectionspace/mapper/tools/refname_spec.rb index 323ffc4e..5ef27032 100644 --- a/spec/collectionspace/mapper/tools/refname_spec.rb +++ b/spec/collectionspace/mapper/tools/refname_spec.rb @@ -63,7 +63,7 @@ context 'with urn for movement' do it 'builds refname from URN' do args = { - urn: "urn:cspace:core.collectionspace.org:movements:id(8e74756f-38f5-4dee-90d4)" + urn: 'urn:cspace:core.collectionspace.org:movements:id(8e74756f-38f5-4dee-90d4)' } result = CollectionSpace::Mapper::Tools::RefName.new(args) expect(result.domain).to eq('core.collectionspace.org') @@ -77,9 +77,10 @@ context 'with unparseable URN' do it 'raises error' do args = { - urn: "urn:cspace:core.collectionspace.org:weird" + urn: 'urn:cspace:core.collectionspace.org:weird' } - expect{ CollectionSpace::Mapper::Tools::RefName.new(args) }.to raise_error(CollectionSpace::Mapper::Tools::UnparseableUrnError) + expect{ + CollectionSpace::Mapper::Tools::RefName.new(args) }.to raise_error(CollectionSpace::Mapper::Tools::UnparseableUrnError) end end end @@ -90,7 +91,8 @@ urn: "urn:cspace:anthro.collectionspace.org:personauthorities:name(person):item:name(MaryPoole1796320156)'Mary Poole'", cache: @cache } - expect { CollectionSpace::Mapper::Tools::RefName.new(args) }.to raise_error(CollectionSpace::Mapper::Tools::RefNameArgumentError) + expect{ + CollectionSpace::Mapper::Tools::RefName.new(args) }.to raise_error(CollectionSpace::Mapper::Tools::RefNameArgumentError) end end end diff --git a/spec/collectionspace/mapper/tools/symbolizable_spec.rb b/spec/collectionspace/mapper/tools/symbolizable_spec.rb index 7a59e876..96c1d734 100644 --- a/spec/collectionspace/mapper/tools/symbolizable_spec.rb +++ b/spec/collectionspace/mapper/tools/symbolizable_spec.rb @@ -31,7 +31,7 @@ }') } - let(:symconfig) { CS::Mapper::Tools::Symbolizable.symbolize(config) } + let(:symconfig){ CS::Mapper::Tools::Symbolizable.symbolize(config) } describe '#symbolize' do it 'turns hash keys into symbols' do expected = %i[delimiter subgroup_delimiter response_mode force_defaults check_record_status @@ -41,9 +41,9 @@ end describe '#symbolize_transforms' do - let(:transforms) { symconfig[:transforms] } - let(:expected) { {"collection"=>{:special=>["downcase_value"], - :replacements=>[{:find=>" ", :replace=>"-", :type=>"plain"}] + let(:transforms){ symconfig[:transforms] } + let(:expected) { {'collection' => {special: ['downcase_value'], + replacements: [{find: ' ', replace: '-', type: 'plain'}] }} } it 'transforms as expected' do diff --git a/spec/collectionspace/mapper/transformer_spec.rb b/spec/collectionspace/mapper/transformer_spec.rb index 4d4207f8..aeadd034 100644 --- a/spec/collectionspace/mapper/transformer_spec.rb +++ b/spec/collectionspace/mapper/transformer_spec.rb @@ -3,9 +3,9 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::Transformer do - let(:client) { anthro_client } - let(:cache) { anthro_cache } - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject_transforms.json'} + let(:client){ anthro_client } + let(:cache){ anthro_cache } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject_transforms.json'} let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: File.read(mapperpath), csclient: client, termcache: cache) } @@ -14,10 +14,10 @@ let(:creator) { described_class.create(recmapper: recmapper, type: type, transform: transform) } - + context 'given an authority transform' do - let(:type) { :authority } - let(:transform) { ['personauthorities', 'person'] } + let(:type){ :authority } + let(:transform){ ['personauthorities', 'person'] } it 'returns an AuthorityTransformer' do expect(creator).to be_a(CS::Mapper::AuthorityTransformer) @@ -25,16 +25,16 @@ end context 'given a vocabulary transform' do - let(:type) { :vocabulary } - let(:transform) { 'behrensmeyer' } + let(:type){ :vocabulary } + let(:transform){ 'behrensmeyer' } it 'returns a VocabularyTransformer' do expect(creator).to be_a(CS::Mapper::VocabularyTransformer) end end context 'given special transforms' do - let(:type) { :special } - let(:transform) { ['downcase_value', 'boolean', 'behrensmeyer_translate'] } + let(:type){ :special } + let(:transform){ ['downcase_value', 'boolean', 'behrensmeyer_translate'] } it 'returns array of expected transformers' do expected = [CS::Mapper::DowncaseTransformer, CS::Mapper::BooleanTransformer, CS::Mapper::BehrensmeyerTransformer] @@ -43,8 +43,8 @@ end context 'given replacement transforms' do - let(:type) { :replacements } - let(:transform) { [{:find=>" ", :replace=>"-", :type=>"plain"}] } + let(:type){ :replacements } + let(:transform){ [{find: ' ', replace: '-', type: 'plain'}] } it 'returns a FindReplaceTransformer' do expect(creator).to be_a(CS::Mapper::FindReplaceTransformer) end diff --git a/spec/collectionspace/mapper/transformers_spec.rb b/spec/collectionspace/mapper/transformers_spec.rb index 6e0c2b60..229dec1d 100644 --- a/spec/collectionspace/mapper/transformers_spec.rb +++ b/spec/collectionspace/mapper/transformers_spec.rb @@ -3,29 +3,29 @@ require 'spec_helper' RSpec.describe CollectionSpace::Mapper::Transformers do - let(:client) { anthro_client } - let(:cache) { anthro_cache } - let(:mapperpath) { 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject_transforms.json'} + let(:client){ anthro_client } + let(:cache){ anthro_cache } + let(:mapperpath){ 'spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject_transforms.json'} let(:recmapper) { CS::Mapper::RecordMapper.new(mapper: File.read(mapperpath), csclient: client, termcache: cache) } - let(:mapping) { recmapper.mappings.lookup(colname) } + let(:mapping){ recmapper.mappings.lookup(colname) } let(:xforms) { described_class.new(colmapping: mapping, transforms: mapping.transforms, recmapper: recmapper) } describe '#queue' do context 'when measuredByPerson column' do - let(:colname) { 'measuredByPerson' } + let(:colname){ 'measuredByPerson' } it 'contains only AuthorityTransformer' do expect(xforms.queue.map(&:class)).to eq([CS::Mapper::AuthorityTransformer]) end end context 'when behrensmeyerSingleLower column' do - let(:colname) { 'behrensmeyerSingleLower' } - #let(:result) { xforms.queue } - let(:result) { xforms.queue.map(&:class) } + let(:colname){ 'behrensmeyerSingleLower' } + # let(:result) { xforms.queue } + let(:result){ xforms.queue.map(&:class) } it 'expected elements are in expected order' do expect(result).to eq([CS::Mapper::BehrensmeyerTransformer, CS::Mapper::VocabularyTransformer]) end diff --git a/spec/collectionspace/mapper/value_transformer_spec.rb b/spec/collectionspace/mapper/value_transformer_spec.rb index d05a7ad7..9c85d7a5 100644 --- a/spec/collectionspace/mapper/value_transformer_spec.rb +++ b/spec/collectionspace/mapper/value_transformer_spec.rb @@ -4,21 +4,21 @@ RSpec.describe CollectionSpace::Mapper::ValueTransformer do before(:all) do - client = anthro_client - cache = anthro_cache - mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') - handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: mapper, - client: client, - cache: cache, - config: {}) - @prepper = CollectionSpace::Mapper::DataPrepper.new({}, handler) + client = anthro_client + cache = anthro_cache + mapper = get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') + handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: mapper, + client: client, + cache: cache, + config: {}) + @prepper = CollectionSpace::Mapper::DataPrepper.new({}, handler) end context 'when vocabulary' do context 'and vocabulary is behrensmeyer number' do it 'returns transformed value for retrieving refname' do value = '0' - transforms = { vocabulary: 'behrensmeyer', special: %w[behrensmeyer_translate] } + transforms = {vocabulary: 'behrensmeyer', special: %w[behrensmeyer_translate]} res = CollectionSpace::Mapper::ValueTransformer.new(value, transforms, @prepper).result ex = '0 - no cracking or flaking on bone surface' expect(res).to eq(ex) @@ -29,9 +29,9 @@ context 'and term given = Adolescent 26 - 75%' do it 'returns replaced value for retriefing refname' do value = 'Adolescent 26 - 75%' - transforms = { vocabulary: 'agerange', special: %w[downcase_value], + transforms = {vocabulary: 'agerange', special: %w[downcase_value], replacements: [ - { find: ' - ', replace: '-', type: :plain } + {find: ' - ', replace: '-', type: :plain} ] } res = CollectionSpace::Mapper::ValueTransformer.new(value, transforms, @prepper).result @@ -47,16 +47,15 @@ value = 'rice plant' transforms = { replacements: [ - { find: '[aeiou]', replace: 'y', type: :regexp }, - { find: ' ', replace: '%%', type: :plain }, - { find: '(\w)%%(\w)', replace: '\1 \2', type: :regexp } + {find: '[aeiou]', replace: 'y', type: :regexp}, + {find: ' ', replace: '%%', type: :plain}, + {find: '(\w)%%(\w)', replace: '\1 \2', type: :regexp} ] } res = CollectionSpace::Mapper::ValueTransformer.new(value, transforms, @prepper).result expect(res).to eq('rycy plynt') end end - end diff --git a/spec/collectionspace/mapper_spec.rb b/spec/collectionspace/mapper_spec.rb index e010035c..c5a3e091 100644 --- a/spec/collectionspace/mapper_spec.rb +++ b/spec/collectionspace/mapper_spec.rb @@ -10,13 +10,13 @@ describe '#setup_data' do context 'when passed a CollectionSpace::Mapper::Response' do it 'returns that Response' do - response = CollectionSpace::Mapper::Response.new({ 'objectNumber'=>'123' }) + response = CollectionSpace::Mapper::Response.new({'objectNumber' => '123'}) expect(CollectionSpace::Mapper::setup_data(response)).to eq(response) end end context 'when passed a Hash' do before(:all) do - @data = { 'objectNumber'=>'123' } + @data = {'objectNumber' => '123'} @response = CollectionSpace::Mapper::setup_data(@data) end it 'returns a CollectionSpace::Mapper::Response with expected orig_data' do @@ -27,7 +27,9 @@ context 'when passed other class of object' do it 'returns a CollectionSpace::Mapper::Response' do data = ['objectNumber', '123'] - expect{ CollectionSpace::Mapper::setup_data(data) }.to raise_error(CollectionSpace::Mapper::Errors::UnprocessableDataError, 'Cannot process a Array. Need a Hash or Mapper::Response') + expect{ + CollectionSpace::Mapper::setup_data(data) }.to raise_error(CollectionSpace::Mapper::Errors::UnprocessableDataError, + 'Cannot process a Array. Need a Hash or Mapper::Response') end end end diff --git a/spec/core_helpers.rb b/spec/core_helpers.rb index 706a8a3b..8f880e1d 100644 --- a/spec/core_helpers.rb +++ b/spec/core_helpers.rb @@ -12,7 +12,7 @@ def core_client ) ) end - + def core_cache cache_config = base_cache_config.merge({domain: 'core.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: core_client) @@ -39,187 +39,368 @@ def core_object_mapper def populate_core(cache) terms = [ - ['citationauthorities', 'citation', 'Arthur', "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Arthur62605812848)'Arthur'"], - ['citationauthorities', 'citation', 'Harding', "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Harding2510592089)'Harding'"], - ['citationauthorities', 'citation', 'Wanting', "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Wanting1599560009399)'Wanting'"], - ['citationauthorities', 'citation', 'makasi', "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(makasi1599645537547)'makasi'"], - ['citationauthorities', 'worldcat', 'Chelse', "urn:cspace:core.collectionspace.org:citationauthorities:name(worldcat):item:name(Chelse1599645525740)'Chelse'"], - ['citationauthorities', 'worldcat', 'Patiently', "urn:cspace:core.collectionspace.org:citationauthorities:name(worldcat):item:name(Patiently1599559993332)'Patiently'"], - ['conceptauthorities', 'concept', 'Test', "urn:cspace:core.collectionspace.org:conceptauthorities:name(concept):item:name(Test1599650854716)'Test'"], - ['conceptauthorities', 'concept', 'Uno', "urn:cspace:core.collectionspace.org:conceptauthorities:name(concept):item:name(Uno1599645111177)'Uno'"], - ['conceptauthorities', 'occasion', 'Computer', "urn:cspace:core.collectionspace.org:conceptauthorities:name(occasion):item:name(Computer1599734104251)'Computer'"], - ['locationauthorities', 'indeterminate', '~Indeterminate Location~', "urn:cspace:indeterminate:locationauthorities:name(indeterminate):item:name(indeterminate)'~Indeterminate Location~'"], - ['locationauthorities', 'location', 'Abardares', "urn:cspace:core.collectionspace.org:locationauthorities:name(location):item:name(Abardares1599557570049)'Abardares'"], - ['locationauthorities', 'location', 'Kalif', "urn:cspace:core.collectionspace.org:locationauthorities:name(location):item:name(Kalif1599734233745)'Kalif'"], - ['locationauthorities', 'location', 'Khago', "urn:cspace:core.collectionspace.org:locationauthorities:name(location):item:name(Khago1599559772718)'Khago'"], - ['locationauthorities', 'location', 'Stay', "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Stay1599559824865)'Stay'"], - ['locationauthorities', 'offsite_sla', 'Lavington', "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Lavington1599144699983)'Lavington'"], - ['locationauthorities', 'offsite_sla', 'Ngong', "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Ngong1599557586466)'Ngong'"], - ['locationauthorities', 'offsite_sla', 'Stay', "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Stay)'Stay'"], - ['orgauthorities', 'organization', '2021', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(20211599147173971)'2021'"], - ['orgauthorities', 'organization', 'Astroworld', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Astroworld1599650794829)'Astroworld'"], - ['orgauthorities', 'organization', 'Broker', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Broker1599221487572)'Broker'"], - ['orgauthorities', 'organization', 'But Ohh', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(ButOhh1599665031368)'But Ohh'"], - ['orgauthorities', 'organization', 'Cuckoo', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Cuckoo1599463786824)'Cuckoo'"], - ['orgauthorities', 'organization', 'Ibiza', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Ibiza1599650806827)'Ibiza'"], - ['orgauthorities', 'organization', 'Joseph Hills', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(JosephHills1599463935463)'Joseph Hills'"], - ['orgauthorities', 'organization', 'Kremling', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Kremling1599464161204)'Kremling'"], - ['orgauthorities', 'organization', 'MMG', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(MMG1599569514486)'MMG'"], - ['orgauthorities', 'organization', 'Martin', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Martin1599559712783)'Martin'"], - ['orgauthorities', 'organization', 'Ninja', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Ninja1599147339325)'Ninja'"], - ['orgauthorities', 'organization', 'Oval', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Oval1599650891221)'Oval'"], - ['orgauthorities', 'organization', 'Podoa', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Podoa1599645346399)'Podoa'"], - ['orgauthorities', 'organization', 'Rock Nation', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(RockNation1599569481908)'Rock Nation'"], - ['orgauthorities', 'organization', 'Sidarec', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Sidarec1599210955079)'Sidarec'"], - ['orgauthorities', 'organization', 'TIm Herod', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(TImHerod1599144655199)'TIm Herod'"], - ['orgauthorities', 'organization', 'Tasia', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Tasia1599734050597)'Tasia'"], - ['orgauthorities', 'organization', 'Tesla', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Tesla1599144565539)'Tesla'"], - ['orgauthorities', 'organization', 'Walai', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Walai1599645181370)'Walai'"], - ['orgauthorities', 'organization', 'breakup', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(breakup1599559909048)'breakup'"], - ['orgauthorities', 'organization', 'fggf', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(fggf1599552009173)'fggf'"], - ['orgauthorities', 'organization', 'pandemic', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(pandemic1599645036126)'pandemic'"], - ['orgauthorities', 'organization', 'pop', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(pop1599664789385)'pop'"], - ['orgauthorities', 'organization', 'pupu', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(pupu1599645415676)'pupu'"], - ['orgauthorities', 'organization', 'tent', "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(tent1599664807586)'tent'"], - ['orgauthorities', 'ulan_oa', 'Again', "urn:cspace:core.collectionspace.org:orgauthorities:name(ulan_oa):item:name(Again1599559881266)'Again'"], - ['orgauthorities', 'ulan_oa', 'Signal', "urn:cspace:core.collectionspace.org:orgauthorities:name(ulan_oa):item:name(Signal1599559737158)'Signal'"], - ['orgauthorities', 'ulan_oa', 'Very fats', "urn:cspace:core.collectionspace.org:orgauthorities:name(ulan_oa):item:name(Veryfats1599645188567)'Very fats'"], - ['personauthorities', 'person', 'Broooks', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Broooks1599221558583)'Broooks'"], - ['personauthorities', 'person', '2020', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(20201599147149106)'2020'"], - ['personauthorities', 'person', '254Glock', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(254Glock1599569494651)'254Glock'"], - ['personauthorities', 'person', 'Abel', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Abel1599464025893)'Abel'"], - ['personauthorities', 'person', 'Alexa', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Alexa1599557607978)'Alexa'"], - ['personauthorities', 'person', 'Andrew Watts', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(AndrewWatts1599144553996)'Andrew Watts'"], - ['personauthorities', 'person', 'Busy', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Busy1599559723432)'Busy'"], - ['personauthorities', 'person', 'Cardi', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Cardi1599569468209)'Cardi'"], - ['personauthorities', 'person', 'Clemo', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Clemo1599221473000)'Clemo'"], - ['personauthorities', 'person', 'Clon', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Clon1599569543362)'Clon'"], - ['personauthorities', 'person', 'Comodore', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Comodore1599463826401)'Comodore'"], - ['personauthorities', 'person', 'Comrade', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Comrade1599664745661)'Comrade'"], - ['personauthorities', 'person', 'Cooper Phil', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(CooperPhil1599144599479)'Cooper Phil'"], - ['personauthorities', 'person', 'Disturb', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Disturb1599665062738)'Disturb'"], - ['personauthorities', 'person', 'Dudu', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Dudu1599645410044)'Dudu'"], - ['personauthorities', 'person', 'Erick', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Erick1599734121151)'Erick'"], - ['personauthorities', 'person', 'First Layer', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(FirstLayer1599463905818)'First Layer'"], - ['personauthorities', 'person', 'Glock', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Glock1599580905730)'Glock'"], - ['personauthorities', 'person', 'Gomongo', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Gomongo1599463746195)'Gomongo'"], - ['personauthorities', 'person', 'Grace', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Grace1599569599918)'Grace'"], - ['personauthorities', 'person', 'Henry', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Henry1599210937770)'Henry'"], - ['personauthorities', 'person', 'Home Alone', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(HomeAlone1599144524188)'Home Alone'"], - ['personauthorities', 'person', 'James', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(James1599210943727)'James'"], - ['personauthorities', 'person', 'Jamo', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Jamo1599221465693)'Jamo'"], - ['personauthorities', 'person', 'Joel', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Joel1599557736045)'Joel'"], - ['personauthorities', 'person', 'John Allen', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(JohnAllen1599144390263)'John Allen'"], - ['personauthorities', 'person', 'John Kay', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(JohnKay1599210868122)'John Kay'"], - ['personauthorities', 'person', 'Kali', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kali1599221504661)'Kali'"], - ['personauthorities', 'person', 'Karanja', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Karanja1599211015378)'Karanja'"], - ['personauthorities', 'person', 'Kev', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kev1599058769862)'Kev'"], - ['personauthorities', 'person', 'Kimani', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kimani1599210926973)'Kimani'"], - ['personauthorities', 'person', 'Kimonda', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kimonda1599211004900)'Kimonda'"], - ['personauthorities', 'person', 'King Kosa', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(KingKosa1599569726990)'King Kosa'"], - ['personauthorities', 'person', 'Kinuthia', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kinuthia1599734017515)'Kinuthia'"], - ['personauthorities', 'person', 'Lebron', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Lebron1599557725925)'Lebron'"], - ['personauthorities', 'person', 'Lima', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Lima1599645323459)'Lima'"], - ['personauthorities', 'person', 'Loan', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Loan1599210896616)'Loan'"], - ['personauthorities', 'person', 'Mark Smith', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(MarkSmith)'Mark Smith'"], - ['personauthorities', 'person', 'Meghan', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Meghan1599569567326)'Meghan'"], - ['personauthorities', 'person', 'Nyauma', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Nyauma1599210983879)'Nyauma'"], - ['personauthorities', 'person', 'Scribe', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Scribe1599645240974)'Scribe'"], - ['personauthorities', 'person', 'Shen Yeng', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(ShenYeng1599569685887)'Shen Yeng'"], - ['personauthorities', 'person', 'Soi', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Soi1599734190999)'Soi'"], - ['personauthorities', 'person', 'Switch', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Switch1599645085995)'Switch'"], - ['personauthorities', 'person', 'Tim Joes', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(TimJoes1599144424859)'Tim Joes'"], - ['personauthorities', 'person', 'Trepoz', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Trepoz1599221497512)'Trepoz'"], - ['personauthorities', 'person', 'Trevor', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Trevor1599144536281)'Trevor'"], - ['personauthorities', 'person', 'Troy', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Troy1599144360617)'Troy'"], - ['personauthorities', 'person', 'afa', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(afa1599645004939)'afa'"], - ['personauthorities', 'person', 'cxcx', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(cxcx1599551790384)'cxcx'"], - ['personauthorities', 'person', 'dfdd', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(dfdd1599551799173)'dfdd'"], - ['personauthorities', 'person', 'dssd', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(dssd1599552004115)'dssd'"], - ['personauthorities', 'person', 'fgfgf', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(fgfgf1599551987166)'fgfgf'"], - ['personauthorities', 'person', 'giri', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(giri1599645613143)'giri'"], - ['personauthorities', 'person', 'high grade', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(highgrade1599645597889)'high grade'"], - ['personauthorities', 'person', 'malik', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(malik1599664876144)'malik'"], - ['personauthorities', 'person', 'marcus', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(marcus1599650918612)'marcus'"], - ['personauthorities', 'person', 'marley', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(marley1599650874712)'marley'"], - ['personauthorities', 'person', 'rights', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(rights1599650868011)'rights'"], - ['personauthorities', 'person', 'rudelyt', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(rudelyt1599664917218)'rudelyt'"], - ['personauthorities', 'person', 'sasa', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(sasa1599551852678)'sasa'"], - ['personauthorities', 'person', 'tint', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(tint1599664800144)'tint'"], - ['personauthorities', 'person', 'tonight', "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(tonight1599664781376)'tonight'"], - ['personauthorities', 'ulan_pa', 'Chrus', "urn:cspace:core.collectionspace.org:personauthorities:name(ulan_pa):item:name(Chrus1599559702930)'Chrus'"], - ['personauthorities', 'ulan_pa', 'We go', "urn:cspace:core.collectionspace.org:personauthorities:name(ulan_pa):item:name(Wego1599559866517)'We go'"], - ['personauthorities', 'ulan_pa', 'panda nayo', "urn:cspace:core.collectionspace.org:personauthorities:name(ulan_pa):item:name(pandanayo1599645094507)'panda nayo'"], - ['placeauthorities', 'place', 'Chillspot', "urn:cspace:core.collectionspace.org:placeauthorities:name(place):item:name(Chillspot1599145441945)'Chillspot'"], - ['placeauthorities', 'tgn_place', 'mzingga', "urn:cspace:core.collectionspace.org:placeauthorities:name(tgn_place):item:name(mzingga1599645587502)'mzingga'"], - ['vocabularies', 'agequalifier', 'older than', "urn:cspace:core.collectionspace.org:vocabularies:name(agequalifier):item:name(olderthan)'older than'"], - ['vocabularies', 'collectionmethod', 'donation', "urn:cspace:core.collectionspace.org:vocabularies:name(collectionmethod):item:name(donation)'donation'"], - ['vocabularies', 'collectionmethod', 'excavation', "urn:cspace:core.collectionspace.org:vocabularies:name(collectionmethod):item:name(excavation)'excavation'"], - ['vocabularies', 'conditioncheckmethod', 'Observed', "urn:cspace:core.collectionspace.org:vocabularies:name(conditioncheckmethod):item:name(observed)'Observed'"], - ['vocabularies', 'conditioncheckreason', 'Damaged in transit', "urn:cspace:core.collectionspace.org:vocabularies:name(conditioncheckreason):item:name(damagedintransit)'Damaged in transit'"], - ['vocabularies', 'conditionfitness', 'Reasonable', "urn:cspace:core.collectionspace.org:vocabularies:name(conditionfitness):item:name(reasonable)'Reasonable'"], - ['vocabularies', 'conservationstatus', 'Analysis complete', "urn:cspace:core.collectionspace.org:vocabularies:name(conservationstatus):item:name(analysiscomplete)'Analysis complete'"], - ['vocabularies', 'conservationstatus', 'Treatment approved', "urn:cspace:core.collectionspace.org:vocabularies:name(conservationstatus):item:name(treatmentapproved)'Treatment approved'"], - ['vocabularies', 'conservationstatus', 'Treatment in progress', "urn:cspace:core.collectionspace.org:vocabularies:name(conservationstatus):item:name(treatmentinprogress)'Treatment in progress'"], - ['vocabularies', 'currency', 'Canadian Dollar', "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(CAD)'Canadian Dollar'"], - ['vocabularies', 'currency', 'Danish Krone', "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(DKK)'Danish Krone'"], - ['vocabularies', 'currency', 'Euro', "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(EUR)'Euro'"], - ['vocabularies', 'currency', 'Pound Sterling', "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(GBP)'Pound Sterling'"], - ['vocabularies', 'currency', 'Swedish Krona', "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(SEK)'Swedish Krona'"], - ['vocabularies', 'currency', 'Swiss Franc', "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(CHF)'Swiss Franc'"], - ['vocabularies', 'datecertainty', 'Circa', "urn:cspace:core.collectionspace.org:vocabularies:name(datecertainty):item:name(circa)'Circa'"], - ['vocabularies', 'dateera', 'BCE', "urn:cspace:core.collectionspace.org:vocabularies:name(dateera):item:name(bce)'BCE'"], - ['vocabularies', 'dateera', 'CE', "urn:cspace:core.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], - ['vocabularies', 'datequalifier', 'Day(s)', "urn:cspace:core.collectionspace.org:vocabularies:name(datequalifier):item:name(days)'Day(s)'"], - ['vocabularies', 'datequalifier', 'Year(s)', "urn:cspace:core.collectionspace.org:vocabularies:name(datequalifier):item:name(years)'Year(s)'"], - ['vocabularies', 'deaccessionapprovalgroup', 'board of trustees', "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(board_of_trustees)'board of trustees'"], - ['vocabularies', 'deaccessionapprovalgroup', 'collection committee', "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(collection_committee)'collection committee'"], - ['vocabularies', 'deaccessionapprovalgroup', 'executive committee', "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(executive_committee)'executive committee'"], - ['vocabularies', 'deaccessionapprovalstatus', 'approved', "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(approved)'approved'"], - ['vocabularies', 'deaccessionapprovalstatus', 'not approved', "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(not_approved)'not approved'"], - ['vocabularies', 'deaccessionapprovalstatus', 'not required', "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(not_required)'not required'"], - ['vocabularies', 'disposalmethod', 'destruction', "urn:cspace:core.collectionspace.org:vocabularies:name(disposalmethod):item:name(destruction)'destruction'"], - ['vocabularies', 'entrymethod', 'Found on doorstep', "urn:cspace:core.collectionspace.org:vocabularies:name(entrymethod):item:name(foundondoorstep)'Found on doorstep'"], - ['vocabularies', 'entrymethod', 'Post', "urn:cspace:core.collectionspace.org:vocabularies:name(entrymethod):item:name(post)'Post'"], - ['vocabularies', 'examinationphase', 'before treatment', "urn:cspace:core.collectionspace.org:vocabularies:name(examinationphase):item:name(beforetreatment)'before treatment'"], - ['vocabularies', 'examinationphase', 'during treatment', "urn:cspace:core.collectionspace.org:vocabularies:name(examinationphase):item:name(duringtreatment)'during treatment'"], - ['vocabularies', 'exhibitionpersonrole', 'Educator', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionpersonrole):item:name(educator)'Educator'"], - ['vocabularies', 'exhibitionpersonrole', 'Public programs coordinator', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionpersonrole):item:name(publicprogramscoordinator)'Public programs coordinator'"], - ['vocabularies', 'exhibitionreferencetype', 'News article', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionreferencetype):item:name(newsarticle)'News article'"], - ['vocabularies', 'exhibitionreferencetype', 'Press release', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionreferencetype):item:name(pressrelease)'Press release'"], - ['vocabularies', 'exhibitionstatus', 'Preliminary object list created', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionstatus):item:name(preliminaryobjectlistcreated)'Preliminary object list created'"], - ['vocabularies', 'exhibitiontype', 'Temporary', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitiontype):item:name(temporary)'Temporary'"], - ['vocabularies', 'inventorystatus', 'accession status unclear', "urn:cspace:core.collectionspace.org:vocabularies:name(inventorystatus):item:name(accessionstatusunclear)'accession status unclear'"], - ['vocabularies', 'inventorystatus', 'destroyed', "urn:cspace:core.collectionspace.org:vocabularies:name(inventorystatus):item:name(destroyed)'destroyed'"], - ['vocabularies', 'inventorystatus', 'unknown', "urn:cspace:core.collectionspace.org:vocabularies:name(inventorystatus):item:name(unknown)'unknown'"], - ['vocabularies', 'languages', 'Ancient Greek', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(grc)'Ancient Greek'"], - ['vocabularies', 'languages', 'Armenian', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(hye)'Armenian'"], - ['vocabularies', 'languages', 'English', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'"], - ['vocabularies', 'languages', 'French', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(fra)'French'"], - ['vocabularies', 'languages', 'Malaysian', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(mal)'Malaysian'"], - ['vocabularies', 'languages', 'Spanish', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(spa)'Spanish'"], - ['vocabularies', 'languages', 'Swahili', "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(swa)'Swahili'"], - ['vocabularies', 'loanoutstatus', 'Authorized', "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(authorized)'Authorized'"], - ['vocabularies', 'loanoutstatus', 'Photography requested', "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(photographyrequested)'Photography requested'"], - ['vocabularies', 'loanoutstatus', 'Refused', "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(refused)'Refused'"], - ['vocabularies', 'loanoutstatus', 'Returned', "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(returned)'Returned'"], - ['vocabularies', 'newsarticle', 'News article', "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionreferencetype):item:name(newsarticle)'News article'"], - ['vocabularies', 'otherpartyrole', 'Preparator', "urn:cspace:core.collectionspace.org:vocabularies:name(otherpartyrole):item:name(preparator)'Preparator'"], - ['vocabularies', 'otherpartyrole', 'Technician', "urn:cspace:core.collectionspace.org:vocabularies:name(otherpartyrole):item:name(technician)'Technician'"], - ['vocabularies', 'publishto', 'CollectionSpace Public Browser', "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(cspacepub)'CollectionSpace Public Browser'"], - ['vocabularies', 'publishto', 'Culture Object', "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(cultureobject)'Culture Object'"], - ['vocabularies', 'publishto', 'None', "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(none)'None'"], - ['vocabularies', 'publishto', 'Omeka', "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(omeka)'Omeka'"], - ['vocabularies', 'treatmentpurpose', 'Exhibition', "urn:cspace:core.collectionspace.org:vocabularies:name(treatmentpurpose):item:name(exhibition)'Exhibition'"], - ['vocabularies', 'uocauthorizationstatuses', 'Approved', "urn:cspace:core.collectionspace.org:vocabularies:name(uocauthorizationstatuses):item:name(approved)'Approved'"], - ['vocabularies', 'uoccollectiontypes', 'archeology', "urn:cspace:core.collectionspace.org:vocabularies:name(uoccollectiontypes):item:name(uocarcheology)'archeology'"], - ['vocabularies', 'uocmaterialtypes', 'bulb', "urn:cspace:core.collectionspace.org:vocabularies:name(uocmaterialtypes):item:name(bulb)'bulb'"], - ['vocabularies', 'uocmethods', 'class', "urn:cspace:core.collectionspace.org:vocabularies:name(uocmethods):item:name(class)'class'"], - ['vocabularies', 'uocstaffroles', 'greeter', "urn:cspace:core.collectionspace.org:vocabularies:name(uocstaffroles):item:name(greeter)'greeter'"], - ['vocabularies', 'uocsubcollections', 'Asia', "urn:cspace:core.collectionspace.org:vocabularies:name(uocsubcollections):item:name(uocsubcollection02)'Asia'"], - ['vocabularies', 'uocuserroles', 'faculty', "urn:cspace:core.collectionspace.org:vocabularies:name(uocuserroles):item:name(faculty)'faculty'"], - ['vocabularies', 'uocusertypes', 'lecturer', "urn:cspace:core.collectionspace.org:vocabularies:name(uocusertypes):item:name(lecturer)'lecturer'"], - ['workauthorities', 'work', 'Makeup', "urn:cspace:core.collectionspace.org:workauthorities:name(work):item:name(Makeup1608768998350)'Makeup'"], + ['citationauthorities', 'citation', 'Arthur', + "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Arthur62605812848)'Arthur'"], + ['citationauthorities', 'citation', 'Harding', + "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Harding2510592089)'Harding'"], + ['citationauthorities', 'citation', 'Wanting', + "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(Wanting1599560009399)'Wanting'"], + ['citationauthorities', 'citation', 'makasi', + "urn:cspace:core.collectionspace.org:citationauthorities:name(citation):item:name(makasi1599645537547)'makasi'"], + ['citationauthorities', 'worldcat', 'Chelse', + "urn:cspace:core.collectionspace.org:citationauthorities:name(worldcat):item:name(Chelse1599645525740)'Chelse'"], + ['citationauthorities', 'worldcat', 'Patiently', + "urn:cspace:core.collectionspace.org:citationauthorities:name(worldcat):item:name(Patiently1599559993332)'Patiently'"], + ['conceptauthorities', 'concept', 'Test', + "urn:cspace:core.collectionspace.org:conceptauthorities:name(concept):item:name(Test1599650854716)'Test'"], + ['conceptauthorities', 'concept', 'Uno', + "urn:cspace:core.collectionspace.org:conceptauthorities:name(concept):item:name(Uno1599645111177)'Uno'"], + ['conceptauthorities', 'occasion', 'Computer', + "urn:cspace:core.collectionspace.org:conceptauthorities:name(occasion):item:name(Computer1599734104251)'Computer'"], + ['locationauthorities', 'indeterminate', '~Indeterminate Location~', + "urn:cspace:indeterminate:locationauthorities:name(indeterminate):item:name(indeterminate)'~Indeterminate Location~'"], + ['locationauthorities', 'location', 'Abardares', + "urn:cspace:core.collectionspace.org:locationauthorities:name(location):item:name(Abardares1599557570049)'Abardares'"], + ['locationauthorities', 'location', 'Kalif', + "urn:cspace:core.collectionspace.org:locationauthorities:name(location):item:name(Kalif1599734233745)'Kalif'"], + ['locationauthorities', 'location', 'Khago', + "urn:cspace:core.collectionspace.org:locationauthorities:name(location):item:name(Khago1599559772718)'Khago'"], + ['locationauthorities', 'location', 'Stay', + "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Stay1599559824865)'Stay'"], + ['locationauthorities', 'offsite_sla', 'Lavington', + "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Lavington1599144699983)'Lavington'"], + ['locationauthorities', 'offsite_sla', 'Ngong', + "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Ngong1599557586466)'Ngong'"], + ['locationauthorities', 'offsite_sla', 'Stay', + "urn:cspace:core.collectionspace.org:locationauthorities:name(offsite_sla):item:name(Stay)'Stay'"], + ['orgauthorities', 'organization', '2021', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(20211599147173971)'2021'"], + ['orgauthorities', 'organization', 'Astroworld', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Astroworld1599650794829)'Astroworld'"], + ['orgauthorities', 'organization', 'Broker', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Broker1599221487572)'Broker'"], + ['orgauthorities', 'organization', 'But Ohh', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(ButOhh1599665031368)'But Ohh'"], + ['orgauthorities', 'organization', 'Cuckoo', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Cuckoo1599463786824)'Cuckoo'"], + ['orgauthorities', 'organization', 'Ibiza', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Ibiza1599650806827)'Ibiza'"], + ['orgauthorities', 'organization', 'Joseph Hills', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(JosephHills1599463935463)'Joseph Hills'"], + ['orgauthorities', 'organization', 'Kremling', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Kremling1599464161204)'Kremling'"], + ['orgauthorities', 'organization', 'MMG', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(MMG1599569514486)'MMG'"], + ['orgauthorities', 'organization', 'Martin', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Martin1599559712783)'Martin'"], + ['orgauthorities', 'organization', 'Ninja', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Ninja1599147339325)'Ninja'"], + ['orgauthorities', 'organization', 'Oval', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Oval1599650891221)'Oval'"], + ['orgauthorities', 'organization', 'Podoa', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Podoa1599645346399)'Podoa'"], + ['orgauthorities', 'organization', 'Rock Nation', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(RockNation1599569481908)'Rock Nation'"], + ['orgauthorities', 'organization', 'Sidarec', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Sidarec1599210955079)'Sidarec'"], + ['orgauthorities', 'organization', 'TIm Herod', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(TImHerod1599144655199)'TIm Herod'"], + ['orgauthorities', 'organization', 'Tasia', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Tasia1599734050597)'Tasia'"], + ['orgauthorities', 'organization', 'Tesla', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Tesla1599144565539)'Tesla'"], + ['orgauthorities', 'organization', 'Walai', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(Walai1599645181370)'Walai'"], + ['orgauthorities', 'organization', 'breakup', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(breakup1599559909048)'breakup'"], + ['orgauthorities', 'organization', 'fggf', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(fggf1599552009173)'fggf'"], + ['orgauthorities', 'organization', 'pandemic', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(pandemic1599645036126)'pandemic'"], + ['orgauthorities', 'organization', 'pop', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(pop1599664789385)'pop'"], + ['orgauthorities', 'organization', 'pupu', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(pupu1599645415676)'pupu'"], + ['orgauthorities', 'organization', 'tent', + "urn:cspace:core.collectionspace.org:orgauthorities:name(organization):item:name(tent1599664807586)'tent'"], + ['orgauthorities', 'ulan_oa', 'Again', + "urn:cspace:core.collectionspace.org:orgauthorities:name(ulan_oa):item:name(Again1599559881266)'Again'"], + ['orgauthorities', 'ulan_oa', 'Signal', + "urn:cspace:core.collectionspace.org:orgauthorities:name(ulan_oa):item:name(Signal1599559737158)'Signal'"], + ['orgauthorities', 'ulan_oa', 'Very fats', + "urn:cspace:core.collectionspace.org:orgauthorities:name(ulan_oa):item:name(Veryfats1599645188567)'Very fats'"], + ['personauthorities', 'person', 'Broooks', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Broooks1599221558583)'Broooks'"], + ['personauthorities', 'person', '2020', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(20201599147149106)'2020'"], + ['personauthorities', 'person', '254Glock', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(254Glock1599569494651)'254Glock'"], + ['personauthorities', 'person', 'Abel', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Abel1599464025893)'Abel'"], + ['personauthorities', 'person', 'Alexa', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Alexa1599557607978)'Alexa'"], + ['personauthorities', 'person', 'Andrew Watts', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(AndrewWatts1599144553996)'Andrew Watts'"], + ['personauthorities', 'person', 'Busy', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Busy1599559723432)'Busy'"], + ['personauthorities', 'person', 'Cardi', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Cardi1599569468209)'Cardi'"], + ['personauthorities', 'person', 'Clemo', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Clemo1599221473000)'Clemo'"], + ['personauthorities', 'person', 'Clon', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Clon1599569543362)'Clon'"], + ['personauthorities', 'person', 'Comodore', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Comodore1599463826401)'Comodore'"], + ['personauthorities', 'person', 'Comrade', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Comrade1599664745661)'Comrade'"], + ['personauthorities', 'person', 'Cooper Phil', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(CooperPhil1599144599479)'Cooper Phil'"], + ['personauthorities', 'person', 'Disturb', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Disturb1599665062738)'Disturb'"], + ['personauthorities', 'person', 'Dudu', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Dudu1599645410044)'Dudu'"], + ['personauthorities', 'person', 'Erick', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Erick1599734121151)'Erick'"], + ['personauthorities', 'person', 'First Layer', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(FirstLayer1599463905818)'First Layer'"], + ['personauthorities', 'person', 'Glock', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Glock1599580905730)'Glock'"], + ['personauthorities', 'person', 'Gomongo', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Gomongo1599463746195)'Gomongo'"], + ['personauthorities', 'person', 'Grace', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Grace1599569599918)'Grace'"], + ['personauthorities', 'person', 'Henry', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Henry1599210937770)'Henry'"], + ['personauthorities', 'person', 'Home Alone', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(HomeAlone1599144524188)'Home Alone'"], + ['personauthorities', 'person', 'James', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(James1599210943727)'James'"], + ['personauthorities', 'person', 'Jamo', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Jamo1599221465693)'Jamo'"], + ['personauthorities', 'person', 'Joel', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Joel1599557736045)'Joel'"], + ['personauthorities', 'person', 'John Allen', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(JohnAllen1599144390263)'John Allen'"], + ['personauthorities', 'person', 'John Kay', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(JohnKay1599210868122)'John Kay'"], + ['personauthorities', 'person', 'Kali', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kali1599221504661)'Kali'"], + ['personauthorities', 'person', 'Karanja', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Karanja1599211015378)'Karanja'"], + ['personauthorities', 'person', 'Kev', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kev1599058769862)'Kev'"], + ['personauthorities', 'person', 'Kimani', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kimani1599210926973)'Kimani'"], + ['personauthorities', 'person', 'Kimonda', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kimonda1599211004900)'Kimonda'"], + ['personauthorities', 'person', 'King Kosa', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(KingKosa1599569726990)'King Kosa'"], + ['personauthorities', 'person', 'Kinuthia', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Kinuthia1599734017515)'Kinuthia'"], + ['personauthorities', 'person', 'Lebron', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Lebron1599557725925)'Lebron'"], + ['personauthorities', 'person', 'Lima', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Lima1599645323459)'Lima'"], + ['personauthorities', 'person', 'Loan', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Loan1599210896616)'Loan'"], + ['personauthorities', 'person', 'Mark Smith', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(MarkSmith)'Mark Smith'"], + ['personauthorities', 'person', 'Meghan', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Meghan1599569567326)'Meghan'"], + ['personauthorities', 'person', 'Nyauma', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Nyauma1599210983879)'Nyauma'"], + ['personauthorities', 'person', 'Scribe', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Scribe1599645240974)'Scribe'"], + ['personauthorities', 'person', 'Shen Yeng', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(ShenYeng1599569685887)'Shen Yeng'"], + ['personauthorities', 'person', 'Soi', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Soi1599734190999)'Soi'"], + ['personauthorities', 'person', 'Switch', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Switch1599645085995)'Switch'"], + ['personauthorities', 'person', 'Tim Joes', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(TimJoes1599144424859)'Tim Joes'"], + ['personauthorities', 'person', 'Trepoz', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Trepoz1599221497512)'Trepoz'"], + ['personauthorities', 'person', 'Trevor', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Trevor1599144536281)'Trevor'"], + ['personauthorities', 'person', 'Troy', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(Troy1599144360617)'Troy'"], + ['personauthorities', 'person', 'afa', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(afa1599645004939)'afa'"], + ['personauthorities', 'person', 'cxcx', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(cxcx1599551790384)'cxcx'"], + ['personauthorities', 'person', 'dfdd', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(dfdd1599551799173)'dfdd'"], + ['personauthorities', 'person', 'dssd', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(dssd1599552004115)'dssd'"], + ['personauthorities', 'person', 'fgfgf', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(fgfgf1599551987166)'fgfgf'"], + ['personauthorities', 'person', 'giri', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(giri1599645613143)'giri'"], + ['personauthorities', 'person', 'high grade', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(highgrade1599645597889)'high grade'"], + ['personauthorities', 'person', 'malik', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(malik1599664876144)'malik'"], + ['personauthorities', 'person', 'marcus', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(marcus1599650918612)'marcus'"], + ['personauthorities', 'person', 'marley', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(marley1599650874712)'marley'"], + ['personauthorities', 'person', 'rights', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(rights1599650868011)'rights'"], + ['personauthorities', 'person', 'rudelyt', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(rudelyt1599664917218)'rudelyt'"], + ['personauthorities', 'person', 'sasa', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(sasa1599551852678)'sasa'"], + ['personauthorities', 'person', 'tint', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(tint1599664800144)'tint'"], + ['personauthorities', 'person', 'tonight', + "urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(tonight1599664781376)'tonight'"], + ['personauthorities', 'ulan_pa', 'Chrus', + "urn:cspace:core.collectionspace.org:personauthorities:name(ulan_pa):item:name(Chrus1599559702930)'Chrus'"], + ['personauthorities', 'ulan_pa', 'We go', + "urn:cspace:core.collectionspace.org:personauthorities:name(ulan_pa):item:name(Wego1599559866517)'We go'"], + ['personauthorities', 'ulan_pa', 'panda nayo', + "urn:cspace:core.collectionspace.org:personauthorities:name(ulan_pa):item:name(pandanayo1599645094507)'panda nayo'"], + ['placeauthorities', 'place', 'Chillspot', + "urn:cspace:core.collectionspace.org:placeauthorities:name(place):item:name(Chillspot1599145441945)'Chillspot'"], + ['placeauthorities', 'tgn_place', 'mzingga', + "urn:cspace:core.collectionspace.org:placeauthorities:name(tgn_place):item:name(mzingga1599645587502)'mzingga'"], + ['vocabularies', 'agequalifier', 'older than', + "urn:cspace:core.collectionspace.org:vocabularies:name(agequalifier):item:name(olderthan)'older than'"], + ['vocabularies', 'collectionmethod', 'donation', + "urn:cspace:core.collectionspace.org:vocabularies:name(collectionmethod):item:name(donation)'donation'"], + ['vocabularies', 'collectionmethod', 'excavation', + "urn:cspace:core.collectionspace.org:vocabularies:name(collectionmethod):item:name(excavation)'excavation'"], + ['vocabularies', 'conditioncheckmethod', 'Observed', + "urn:cspace:core.collectionspace.org:vocabularies:name(conditioncheckmethod):item:name(observed)'Observed'"], + ['vocabularies', 'conditioncheckreason', 'Damaged in transit', + "urn:cspace:core.collectionspace.org:vocabularies:name(conditioncheckreason):item:name(damagedintransit)'Damaged in transit'"], + ['vocabularies', 'conditionfitness', 'Reasonable', + "urn:cspace:core.collectionspace.org:vocabularies:name(conditionfitness):item:name(reasonable)'Reasonable'"], + ['vocabularies', 'conservationstatus', 'Analysis complete', + "urn:cspace:core.collectionspace.org:vocabularies:name(conservationstatus):item:name(analysiscomplete)'Analysis complete'"], + ['vocabularies', 'conservationstatus', 'Treatment approved', + "urn:cspace:core.collectionspace.org:vocabularies:name(conservationstatus):item:name(treatmentapproved)'Treatment approved'"], + ['vocabularies', 'conservationstatus', 'Treatment in progress', + "urn:cspace:core.collectionspace.org:vocabularies:name(conservationstatus):item:name(treatmentinprogress)'Treatment in progress'"], + ['vocabularies', 'currency', 'Canadian Dollar', + "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(CAD)'Canadian Dollar'"], + ['vocabularies', 'currency', 'Danish Krone', + "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(DKK)'Danish Krone'"], + ['vocabularies', 'currency', 'Euro', + "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(EUR)'Euro'"], + ['vocabularies', 'currency', 'Pound Sterling', + "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(GBP)'Pound Sterling'"], + ['vocabularies', 'currency', 'Swedish Krona', + "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(SEK)'Swedish Krona'"], + ['vocabularies', 'currency', 'Swiss Franc', + "urn:cspace:core.collectionspace.org:vocabularies:name(currency):item:name(CHF)'Swiss Franc'"], + ['vocabularies', 'datecertainty', 'Circa', + "urn:cspace:core.collectionspace.org:vocabularies:name(datecertainty):item:name(circa)'Circa'"], + ['vocabularies', 'dateera', 'BCE', + "urn:cspace:core.collectionspace.org:vocabularies:name(dateera):item:name(bce)'BCE'"], + ['vocabularies', 'dateera', 'CE', + "urn:cspace:core.collectionspace.org:vocabularies:name(dateera):item:name(ce)'CE'"], + ['vocabularies', 'datequalifier', 'Day(s)', + "urn:cspace:core.collectionspace.org:vocabularies:name(datequalifier):item:name(days)'Day(s)'"], + ['vocabularies', 'datequalifier', 'Year(s)', + "urn:cspace:core.collectionspace.org:vocabularies:name(datequalifier):item:name(years)'Year(s)'"], + ['vocabularies', 'deaccessionapprovalgroup', 'board of trustees', + "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(board_of_trustees)'board of trustees'"], + ['vocabularies', 'deaccessionapprovalgroup', 'collection committee', + "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(collection_committee)'collection committee'"], + ['vocabularies', 'deaccessionapprovalgroup', 'executive committee', + "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalgroup):item:name(executive_committee)'executive committee'"], + ['vocabularies', 'deaccessionapprovalstatus', 'approved', + "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(approved)'approved'"], + ['vocabularies', 'deaccessionapprovalstatus', 'not approved', + "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(not_approved)'not approved'"], + ['vocabularies', 'deaccessionapprovalstatus', 'not required', + "urn:cspace:core.collectionspace.org:vocabularies:name(deaccessionapprovalstatus):item:name(not_required)'not required'"], + ['vocabularies', 'disposalmethod', 'destruction', + "urn:cspace:core.collectionspace.org:vocabularies:name(disposalmethod):item:name(destruction)'destruction'"], + ['vocabularies', 'entrymethod', 'Found on doorstep', + "urn:cspace:core.collectionspace.org:vocabularies:name(entrymethod):item:name(foundondoorstep)'Found on doorstep'"], + ['vocabularies', 'entrymethod', 'Post', + "urn:cspace:core.collectionspace.org:vocabularies:name(entrymethod):item:name(post)'Post'"], + ['vocabularies', 'examinationphase', 'before treatment', + "urn:cspace:core.collectionspace.org:vocabularies:name(examinationphase):item:name(beforetreatment)'before treatment'"], + ['vocabularies', 'examinationphase', 'during treatment', + "urn:cspace:core.collectionspace.org:vocabularies:name(examinationphase):item:name(duringtreatment)'during treatment'"], + ['vocabularies', 'exhibitionpersonrole', 'Educator', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionpersonrole):item:name(educator)'Educator'"], + ['vocabularies', 'exhibitionpersonrole', 'Public programs coordinator', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionpersonrole):item:name(publicprogramscoordinator)'Public programs coordinator'"], + ['vocabularies', 'exhibitionreferencetype', 'News article', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionreferencetype):item:name(newsarticle)'News article'"], + ['vocabularies', 'exhibitionreferencetype', 'Press release', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionreferencetype):item:name(pressrelease)'Press release'"], + ['vocabularies', 'exhibitionstatus', 'Preliminary object list created', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionstatus):item:name(preliminaryobjectlistcreated)'Preliminary object list created'"], + ['vocabularies', 'exhibitiontype', 'Temporary', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitiontype):item:name(temporary)'Temporary'"], + ['vocabularies', 'inventorystatus', 'accession status unclear', + "urn:cspace:core.collectionspace.org:vocabularies:name(inventorystatus):item:name(accessionstatusunclear)'accession status unclear'"], + ['vocabularies', 'inventorystatus', 'destroyed', + "urn:cspace:core.collectionspace.org:vocabularies:name(inventorystatus):item:name(destroyed)'destroyed'"], + ['vocabularies', 'inventorystatus', 'unknown', + "urn:cspace:core.collectionspace.org:vocabularies:name(inventorystatus):item:name(unknown)'unknown'"], + ['vocabularies', 'languages', 'Ancient Greek', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(grc)'Ancient Greek'"], + ['vocabularies', 'languages', 'Armenian', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(hye)'Armenian'"], + ['vocabularies', 'languages', 'English', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(eng)'English'"], + ['vocabularies', 'languages', 'French', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(fra)'French'"], + ['vocabularies', 'languages', 'Malaysian', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(mal)'Malaysian'"], + ['vocabularies', 'languages', 'Spanish', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(spa)'Spanish'"], + ['vocabularies', 'languages', 'Swahili', + "urn:cspace:core.collectionspace.org:vocabularies:name(languages):item:name(swa)'Swahili'"], + ['vocabularies', 'loanoutstatus', 'Authorized', + "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(authorized)'Authorized'"], + ['vocabularies', 'loanoutstatus', 'Photography requested', + "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(photographyrequested)'Photography requested'"], + ['vocabularies', 'loanoutstatus', 'Refused', + "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(refused)'Refused'"], + ['vocabularies', 'loanoutstatus', 'Returned', + "urn:cspace:core.collectionspace.org:vocabularies:name(loanoutstatus):item:name(returned)'Returned'"], + ['vocabularies', 'newsarticle', 'News article', + "urn:cspace:core.collectionspace.org:vocabularies:name(exhibitionreferencetype):item:name(newsarticle)'News article'"], + ['vocabularies', 'otherpartyrole', 'Preparator', + "urn:cspace:core.collectionspace.org:vocabularies:name(otherpartyrole):item:name(preparator)'Preparator'"], + ['vocabularies', 'otherpartyrole', 'Technician', + "urn:cspace:core.collectionspace.org:vocabularies:name(otherpartyrole):item:name(technician)'Technician'"], + ['vocabularies', 'publishto', 'CollectionSpace Public Browser', + "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(cspacepub)'CollectionSpace Public Browser'"], + ['vocabularies', 'publishto', 'Culture Object', + "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(cultureobject)'Culture Object'"], + ['vocabularies', 'publishto', 'None', + "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(none)'None'"], + ['vocabularies', 'publishto', 'Omeka', + "urn:cspace:core.collectionspace.org:vocabularies:name(publishto):item:name(omeka)'Omeka'"], + ['vocabularies', 'treatmentpurpose', 'Exhibition', + "urn:cspace:core.collectionspace.org:vocabularies:name(treatmentpurpose):item:name(exhibition)'Exhibition'"], + ['vocabularies', 'uocauthorizationstatuses', 'Approved', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocauthorizationstatuses):item:name(approved)'Approved'"], + ['vocabularies', 'uoccollectiontypes', 'archeology', + "urn:cspace:core.collectionspace.org:vocabularies:name(uoccollectiontypes):item:name(uocarcheology)'archeology'"], + ['vocabularies', 'uocmaterialtypes', 'bulb', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocmaterialtypes):item:name(bulb)'bulb'"], + ['vocabularies', 'uocmethods', 'class', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocmethods):item:name(class)'class'"], + ['vocabularies', 'uocstaffroles', 'greeter', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocstaffroles):item:name(greeter)'greeter'"], + ['vocabularies', 'uocsubcollections', 'Asia', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocsubcollections):item:name(uocsubcollection02)'Asia'"], + ['vocabularies', 'uocuserroles', 'faculty', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocuserroles):item:name(faculty)'faculty'"], + ['vocabularies', 'uocusertypes', 'lecturer', + "urn:cspace:core.collectionspace.org:vocabularies:name(uocusertypes):item:name(lecturer)'lecturer'"], + ['workauthorities', 'work', 'Makeup', + "urn:cspace:core.collectionspace.org:workauthorities:name(work):item:name(Makeup1608768998350)'Makeup'"], ] populate(cache, terms) end diff --git a/spec/fcart_helpers.rb b/spec/fcart_helpers.rb index af889957..13debc5b 100644 --- a/spec/fcart_helpers.rb +++ b/spec/fcart_helpers.rb @@ -10,7 +10,7 @@ def fcart_client ) ) end - + def fcart_cache cache_config = base_cache_config.merge({domain: 'fcart.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: fcart_client) @@ -21,7 +21,8 @@ def fcart_cache def populate_fcart(cache) terms = [ - ['personauthorities', 'person', 'Elizabeth', "urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Elizabeth123)'Elizabeth'"] ] + ['personauthorities', 'person', 'Elizabeth', + "urn:cspace:fcart.collectionspace.org:personauthorities:name(person):item:name(Elizabeth123)'Elizabeth'"] ] populate(cache, terms) end diff --git a/spec/helpers.rb b/spec/helpers.rb index 8e3819a3..01764788 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -2,7 +2,6 @@ require 'memo_wise' - module Helpers prepend MemoWise extend self @@ -22,7 +21,7 @@ def base_cache_config search_identifiers: false } end - + # returns RecordMapper hash read in from JSON file # path = String. Path to JSON file # turns strings into symbols that removed when writing to JSON @@ -39,7 +38,7 @@ def get_record_mapper_object(path, cache = nil) def get_datahash(path:) JSON.parse(File.read(path)) end - + # The way CollectionSpace uses different URIs for the same namespace prefix in the same # document is irregular and makes it impossible to query a document via xpath if # the namespaces are defined. For testing, remove them... @@ -58,11 +57,11 @@ def remove_blank_structured_dates(doc) end doc end - + def get_xml_fixture(filename, remove_blanks = true) doc = remove_namespaces(Nokogiri::XML(File.read("#{FIXTUREDIR}/#{filename}")){ |c| c.noblanks }) doc = remove_blank_structured_dates(doc) - + # fields to omit from testing across the board rejectfields = %w[computedCurrentLocation].sort doc.traverse do |node| @@ -80,7 +79,7 @@ def get_xml_fixture(filename, remove_blanks = true) def get_xpaths(doc) xpaths = [] - doc.traverse { |node| xpaths << node.path } + doc.traverse{ |node| xpaths << node.path } xpaths.sort! end @@ -106,11 +105,11 @@ def mapper_defined_paths(xpaths, mappings) mappaths.any?{ |e| path.start_with?(e) } end end - + def remove_xpath_occurrence_indicators(path) path.match(/^(.*)\//)[1].gsub(/\[\d+\]/, '') end - + def list_xpaths(doc) xpaths = get_xpaths(doc) xpaths = field_value_xpaths(xpaths) @@ -130,9 +129,7 @@ def populate(cache, terms) terms.each do |term| cache.put(*term) end - cache + cache end - - end diff --git a/spec/lhmc_helpers.rb b/spec/lhmc_helpers.rb index 96f38094..176b5a7a 100644 --- a/spec/lhmc_helpers.rb +++ b/spec/lhmc_helpers.rb @@ -10,7 +10,7 @@ def lhmc_client ) ) end - + def lhmc_cache cache_config = base_cache_config.merge({domain: 'lhmc.collectionspace.org'}) cache = CollectionSpace::RefCache.new(config: cache_config, client: lhmc_client) @@ -21,8 +21,10 @@ def lhmc_cache def populate_lhmc(cache) terms = [ - ['personauthorities', 'person', 'Ann Analyst', "urn:cspace:lhmc.collectionspace.org:personauthorities:name(person):item:name(AnnAnalyst1594848799340)'Ann Analyst'"], - ['vocabularies', 'agerange', 'adolescent 26-75%', "urn:cspace:lhmc.collectionspace.org:vocabularies:name(agerange):item:name(adolescent_26_75)'adolescent 26-75%'"], + ['personauthorities', 'person', 'Ann Analyst', + "urn:cspace:lhmc.collectionspace.org:personauthorities:name(person):item:name(AnnAnalyst1594848799340)'Ann Analyst'"], + ['vocabularies', 'agerange', 'adolescent 26-75%', + "urn:cspace:lhmc.collectionspace.org:vocabularies:name(agerange):item:name(adolescent_26_75)'adolescent 26-75%'"], ] populate(cache, terms) end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1fc753f6..8e1223aa 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,15 +1,16 @@ +# frozen_string_literal: true + require 'bundler/setup' require 'pry' - require 'collectionspace/mapper' require_relative './helpers' RSpec.configure do |config| config.include Helpers - + # Enable flags like --only-failures and --next-failure - config.example_status_persistence_file_path = ".rspec_status" + config.example_status_persistence_file_path = '.rspec_status' # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! diff --git a/utils/benchmarking/handler_with_cache.rb b/utils/benchmarking/handler_with_cache.rb index 3964124a..f8d38f3a 100644 --- a/utils/benchmarking/handler_with_cache.rb +++ b/utils/benchmarking/handler_with_cache.rb @@ -4,7 +4,6 @@ require 'time_up' require 'pry' - require 'collectionspace/mapper' require_relative '../../spec/helpers' diff --git a/utils/benchmarking/profile.rb b/utils/benchmarking/profile.rb index bb4da641..c6864da2 100644 --- a/utils/benchmarking/profile.rb +++ b/utils/benchmarking/profile.rb @@ -16,7 +16,8 @@ def mapping_workflow } rm_anthro_co = Helpers.get_json_record_mapper('spec/fixtures/files/mappers/release_6_1/anthro/anthro_4-1-2_collectionobject.json') - handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: rm_anthro_co, cache: Helpers.anthro_cache, client: Helpers.anthro_client, config: config) + handler = CollectionSpace::Mapper::DataHandler.new(record_mapper: rm_anthro_co, cache: Helpers.anthro_cache, + client: Helpers.anthro_client, config: config) datahash = Helpers.get_datahash(path: 'spec/fixtures/files/datahashes/anthro/collectionobject2.json') diff --git a/utils/csv-to-datahashes.rb b/utils/csv-to-datahashes.rb index a2311928..90b1496e 100644 --- a/utils/csv-to-datahashes.rb +++ b/utils/csv-to-datahashes.rb @@ -5,7 +5,7 @@ require 'csv' require 'json' -#other dependencies +# other dependencies require 'bundler/inline' require 'pry' @@ -14,12 +14,12 @@ gem 'pry' end - options = {} OptionParser.new{ |opts| opts.banner = 'Usage: ruby csv-to-datahashes.rb -i PATH_TO_CSV' - opts.on('-i', '--input PATH_TO_CSV', 'Path to CSV file. One JSON file will be created per row in the same directory.'){ |i| + opts.on('-i', '--input PATH_TO_CSV', + 'Path to CSV file. One JSON file will be created per row in the same directory.'){ |i| options[:input] = i unless File.file?(i) puts "File #{i} does not exist" @@ -39,7 +39,7 @@ datahashes = [] filename_stub = options[:input].sub(/^.*\//, '').sub('.csv', '') -dir = options[:input]['/'] ? options[:input].sub(/\/[^\/]+$/, '/') : '' +dir = options[:input]['/'] ? options[:input].sub(/\/[^\/]+$/, '/') : '' CSV.foreach(options[:input], headers: true) do |row| datahashes << row.to_h diff --git a/utils/datahash_to_csv.rb b/utils/datahash_to_csv.rb index c970e7eb..70186775 100644 --- a/utils/datahash_to_csv.rb +++ b/utils/datahash_to_csv.rb @@ -6,7 +6,7 @@ require 'json' require 'pp' -#other dependencies +# other dependencies require 'bundler/inline' require 'pry' @@ -15,7 +15,6 @@ gem 'pry' end - options = {} OptionParser.new{ |opts| opts.banner = 'Usage: ruby datahash-to-csv.rb -i PATH_TO_JSON' @@ -37,7 +36,7 @@ } }.parse! -dir = options[:input]['/'] ? options[:input].sub(/\/[^\/]+$/, '/') : '' +dir = options[:input]['/'] ? options[:input].sub(/\/[^\/]+$/, '/') : '' filename_stub = options[:input].sub(/^.*\//, '').sub('.json', '') csv_file = "#{dir}#{filename_stub}.csv" From a137e571e486625a8e6cebe0e958ee57727815cb Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Fri, 6 Aug 2021 22:40:16 -0400 Subject: [PATCH 16/19] minor refactoring --- .../mapper/value_transformer.rb | 71 ++++++++++--------- .../mapper/vocabulary_transformer.rb | 5 +- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/lib/collectionspace/mapper/value_transformer.rb b/lib/collectionspace/mapper/value_transformer.rb index 95e4868a..01994d61 100644 --- a/lib/collectionspace/mapper/value_transformer.rb +++ b/lib/collectionspace/mapper/value_transformer.rb @@ -20,15 +20,30 @@ def initialize(value, transforms, prepper) @result = @value end + BOOLEAN_LOOKUP = { + 'true' => 'true', + 'false' => 'false', + '' => 'false', + 'yes' => 'true', + 'no' => 'false', + 'y' => 'true', + 'n' => 'false', + 't' => 'true', + 'f' => 'false' + } + def process_replacements return if @value.empty? - @transforms[:replacements].each do |r| - case r[:type] + @transforms[:replacements].each do |rule| + find = rule[:find] + replace = rule[:replace] + + case rule[:type] when :plain - @value = @value.gsub(r[:find], r[:replace]) + @value = @value.gsub(find, replace) when :regexp - @value = @value.gsub(Regexp.new(r[:find]), r[:replace]) + @value = @value.gsub(Regexp.new(find), replace) end end end @@ -46,38 +61,24 @@ def process_special def process_boolean if @value.blank? @value = 'false' - else - case @value.downcase - when 'true' - @value = 'true' - when 'false' - @value = 'false' - when '' - @value = 'false' - when 'yes' - @value = 'true' - when 'no' - @value = 'false' - when 'y' - @value = 'true' - when 'n' - @value = 'false' - when 't' - @value = 'true' - when 'f' - @value = 'false' - else - @value = 'false' - @warnings << { - category: :boolean_value_transform, - field: nil, - type: nil, - subtype: nil, - value: @value, - message: "#{@value} cannot be converted to boolean. Defaulting to false" - } - end + return + end + + chkval = @value.downcase + if BOOLEAN_LOOKUP.key?(chkval) + @value = BOOLEAN_LOOKUP[chkval] + return end + + @value = 'false' + @warnings << { + category: :boolean_value_transform, + field: nil, + type: nil, + subtype: nil, + value: @value, + message: "#{@value} cannot be converted to boolean. Defaulting to false" + } end def obj_num_to_csid diff --git a/lib/collectionspace/mapper/vocabulary_transformer.rb b/lib/collectionspace/mapper/vocabulary_transformer.rb index d24f2843..d438236c 100644 --- a/lib/collectionspace/mapper/vocabulary_transformer.rb +++ b/lib/collectionspace/mapper/vocabulary_transformer.rb @@ -12,8 +12,9 @@ def initialize(opts) super @type = 'vocabularies' @subtype = opts[:transform] - @termcache = opts[:recmapper].termcache - @csclient = opts[:recmapper].csclient + mapper = opts[:recmapper] + @termcache = mapper.termcache + @csclient = mapper.csclient end def transform(value) From 52bfe4ce05588fd31c4e3e80b03e254575a31759 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Fri, 6 Aug 2021 22:56:15 -0400 Subject: [PATCH 17/19] start breaking up xpatb hash --- lib/collectionspace/mapper/data_handler.rb | 35 +++++++++++++++------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/lib/collectionspace/mapper/data_handler.rb b/lib/collectionspace/mapper/data_handler.rb index a39738b1..e7208b2e 100644 --- a/lib/collectionspace/mapper/data_handler.rb +++ b/lib/collectionspace/mapper/data_handler.rb @@ -78,6 +78,27 @@ def validate(data) validator.validate(response) end + def mappings + @mapper.mappings + end + + def setup_xpath_hash_structure + xhash = {} + # create key for each xpath containing fields, and set up structure of its value + mappings.each do |mapping| + xhash[mapping.fullpath] = + {parent: '', children: [], is_group: false, is_subgroup: false, subgroups: [], mappings: []} + end + xhash + end + + def associate_mappings_with_xpaths(xhash) + mappings.each do |mapping| + xhash[mapping.fullpath][:mappings] << mapping + end + xhash + end + # builds hash containing information to be used in mapping the fields that are # children of each xpath # keys - the XML doc xpaths that contain child fields @@ -90,17 +111,9 @@ def validate(data) # that itself contains direct child fields # :mappings - Array, of fieldmappings that are children of this xpath def xpath_hash - h = {} - # create key for each xpath containing fields, and set up structure of its value - @mapper.mappings.each do |mapping| - h[mapping.fullpath] = -{parent: '', children: [], is_group: false, is_subgroup: false, subgroups: [], mappings: []} - end - # add fieldmappings for children of each xpath - @mapper.mappings.each do |mapping| - h[mapping.fullpath][:mappings] << mapping - end - # populate other attributes + xhash = setup_xpath_hash_structure + h = associate_mappings_with_xpaths(xhash) + # populate parent of all non-top xpaths h.each do |xpath, ph| if xpath['/'] From 34fac001833ee90177a4cbdc88db47bcbc9c76eb Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Mon, 27 Sep 2021 15:06:34 -0400 Subject: [PATCH 18/19] remove https prefix and cspace-services path from refcache domain --- lib/collectionspace/mapper/tools/refname.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/collectionspace/mapper/tools/refname.rb b/lib/collectionspace/mapper/tools/refname.rb index 343d4048..fc6fbe71 100644 --- a/lib/collectionspace/mapper/tools/refname.rb +++ b/lib/collectionspace/mapper/tools/refname.rb @@ -24,7 +24,7 @@ def initialize(args) new_from_urn elsif args_given == term_args cache = args[:cache] - @domain = cache.domain + @domain = cache.domain.sub(/https?:\/\//, '').sub('/cspace-services', '') @type = args[:type] @subtype = args[:subtype] @display_name = args[:term] From cf6193b103dcbb9c9dcbf1ecbada840a91bb4d8b Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Wed, 13 Oct 2021 10:54:44 -0400 Subject: [PATCH 19/19] bump version and clean gemspec --- CHANGELOG.md | 6 ++++++ collectionspace-mapper.gemspec | 6 ++++-- lib/collectionspace/mapper/version.rb | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c81977e7..09c718cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ This project bumps the version number for any changes (including documentation u ## [Unreleased] - i.e. pushed to main branch but not yet tagged as a release - nothing +## [2.5.1] - 2021-10-13 +### Changed +- accept and handle collectionspace-refcache passed in from collectionspace-csv-importer +- bug fixes for dealing with cached data +- refactoring + ## [2.5.0] - 2021-09-23 ### Added - `multiple_recs_found` batch configuration option added to allow batch deletion of duplicate records. This defaults to `fail`, which means if there are two or more existing records sharing the same ID, the batch importer will not transfer anything for that ID. In rare cases, however, you may really need to delete duplicates, and now you can. The batch importer will transfer your update or delete to the first result found via a search for the record ID. See [the batch configuration options documentation](https://github.com/collectionspace/collectionspace-mapper/blob/main/doc/batch_configuration.adoc) for more information. diff --git a/collectionspace-mapper.gemspec b/collectionspace-mapper.gemspec index 2f5250b9..5a357960 100644 --- a/collectionspace-mapper.gemspec +++ b/collectionspace-mapper.gemspec @@ -49,6 +49,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '>= 13.0.1' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'rubocop', '~> 1.18.3' - spec.add_development_dependency 'ruby-prof', '~> 1.4.3' - spec.add_development_dependency 'time_up', '~> 0.0.7' + + # Uncomment these if you need to use the scripts in utils/benchmarking + #spec.add_development_dependency 'ruby-prof', '~> 1.4.3' + #spec.add_development_dependency 'time_up', '~> 0.0.7' end diff --git a/lib/collectionspace/mapper/version.rb b/lib/collectionspace/mapper/version.rb index 3e8b8d33..f18a8890 100644 --- a/lib/collectionspace/mapper/version.rb +++ b/lib/collectionspace/mapper/version.rb @@ -2,6 +2,6 @@ module CollectionSpace module Mapper - VERSION = '2.5.0' + VERSION = '2.5.1' end end