From 8b8034049a8b05707a8dd717cb7c2c7608e36070 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 18 May 2023 15:49:34 -0300 Subject: [PATCH 1/3] Add LoC ResourceType terms to the defaults tags migration. --- assets/migrate/tags.csv | 50 +++++++++++++------ ...rm.resource_types.field_authority_link.yml | 1 + ...plus.migration.islandora_defaults_tags.yml | 12 ++++- config/sync/tags.bak | 47 +++++++++++++++++ 4 files changed, 94 insertions(+), 16 deletions(-) create mode 100644 config/sync/tags.bak diff --git a/assets/migrate/tags.csv b/assets/migrate/tags.csv index 90f251812..1cacb5fb4 100644 --- a/assets/migrate/tags.csv +++ b/assets/migrate/tags.csv @@ -1,14 +1,36 @@ -vid,name,description,external_uri,authority_link_source -resource_types,"Collection","An aggregation of resources",http://purl.org/ontology/bibo/Collection,bibo -resource_types,"Dataset","Data encoded in a defined structure",http://purl.org/dc/dcmitype/Dataset,dcmi_types -resource_types,"Image","A visual representation other than text",http://purl.org/dc/dcmitype/Image,dcmi_types -resource_types,"Interactive Resource","A resource requiring interaction from the user to be understood, executed, or experienced",http://purl.org/dc/dcmitype/InteractiveResource,dcmi_types -resource_types,"Moving Image","A series of visual representations imparting an impression of motion when shown in succession",http://purl.org/dc/dcmitype/MovingImage,dcmi_types -resource_types,"Physical Object","An inanimate, three-dimensional object or substance",http://purl.org/dc/dcmitype/PhysicalObject,dcmi_types -resource_types,"Service","A system that provides one or more functions",http://purl.org/dc/dcmitype/Service,dcmi_types -resource_types,"Sound","A resource primarily intended to be heard",http://purl.org/dc/dcmitype/Sound,dcmi_types -resource_types,"Still Image","A static visual representation",http://purl.org/dc/dcmitype/StillImage,dcmi_types -resource_types,"Software","A computer program in source or compiled form",http://purl.org/dc/dcmitype/Software,dcmi_types -resource_types,"Text","A resource consisting primarily of words for reading",http://purl.org/dc/dcmitype/Text,dcmi_types -islandora_display,"OpenSeadragon","Display using the OpenSeadragon viewer",http://openseadragon.github.io, -islandora_display,"PDF.js","Display using the PDF.js viewer",http://mozilla.github.io/pdf.js, +vid,name,description,external_uri,authority_link_source,parent +resource_types,Text,Resource intended to be perceived visually and understood through the use of language in written or spoken form.,http://id.loc.gov/vocabulary/resourceTypes/txt,resourceTypes, +resource_types,Periodical,,http://id.loc.gov/vocabulary/resourceTypes/per,resourceTypes,Text +resource_types,Newspaper,,http://id.loc.gov/vocabulary/resourceTypes/nws,resourceTypes,Text +resource_types,Book,,http://id.loc.gov/vocabulary/resourceTypes/bke,resourceTypes,Text +resource_types,Legislation,,http://id.loc.gov/vocabulary/resourceTypes/leg,resourceTypes,Text +resource_types,Cartographic,"Resource that shows spatial information, including maps, atlases, globes, digital, and other cartographic resources.",http://id.loc.gov/vocabulary/resourceTypes/car,resourceTypes, +resource_types,Remote sensing image,,http://id.loc.gov/vocabulary/resourceTypes/rsi,resourceTypes,Cartographic +resource_types,Globe,,http://id.loc.gov/vocabulary/resourceTypes/glo,resourceTypes,Cartographic +resource_types,Map,,http://id.loc.gov/vocabulary/resourceTypes/map,resourceTypes,Cartographic +resource_types,Notated music,"Graphic, non-realized representations of musical works intended to be perceived visually.",http://id.loc.gov/vocabulary/resourceTypes/not,resourceTypes, +resource_types,Notated movement,,http://id.loc.gov/vocabulary/resourceTypes/nmv,resourceTypes,Notated music +resource_types,Audio,"Resources expressed in an audible form, including music or other sounds.",http://id.loc.gov/vocabulary/resourceTypes/aud,resourceTypes, +resource_types,Audio musical,,http://id.loc.gov/vocabulary/resourceTypes/aum,resourceTypes,Audio +resource_types,Audio non-musical,,http://id.loc.gov/vocabulary/resourceTypes/aun,resourceTypes,Audio +resource_types,Still Image,"Resource expressed through line, shape, shading, etc., intended to be perceived visually as a still image or images in two dimensions.",http://id.loc.gov/vocabulary/resourceTypes/img,resourceTypes, +resource_types,Print,,http://id.loc.gov/vocabulary/resourceTypes/pri,resourceTypes,Still Image +resource_types,Photograph,,http://id.loc.gov/vocabulary/resourceTypes/pho,resourceTypes,Still Image +resource_types,Drawing,,http://id.loc.gov/vocabulary/resourceTypes/dwg,resourceTypes,Still Image +resource_types,Moving Image,"Images intended to be perceived as moving, including motion pictures and video recordings.",http://id.loc.gov/vocabulary/resourceTypes/mov,resourceTypes, +resource_types,Video recording,,http://id.loc.gov/vocabulary/resourceTypes/vid,resourceTypes,Moving Image +resource_types,Motion picture,,http://id.loc.gov/vocabulary/resourceTypes/mot,resourceTypes,Moving Image +resource_types,Artifact,Resource in a form intended to be perceived visually in three dimensions. Includes man-made objects as well as naturally occurring objects such as specimens mounted for viewing.,http://id.loc.gov/vocabulary/resourceTypes/art,resourceTypes, +resource_types,Mixed Material,"Resource comprised of multiple types which is not driven by software; for instance, a manuscript collection of text, photographs and sound recordings.",http://id.loc.gov/vocabulary/resourceTypes/mix,resourceTypes, +resource_types,Kit,,http://id.loc.gov/vocabulary/resourceTypes/kit,resourceTypes,Mixed Material +resource_types,Digital,"Resource that is intended for manipulation by a computer, accessed either directly or remotely",http://id.loc.gov/vocabulary/resourceTypes/dig,resourceTypes, +resource_types,Multimedia,Electronic resource that is a computer program or which consists of multiple media types that are software driven.,http://id.loc.gov/vocabulary/resourceTypes/mul,resourceTypes, +resource_types,Software,,http://id.loc.gov/vocabulary/resourceTypes/sof,resourceTypes,Multimedia +resource_types,Website,,http://id.loc.gov/vocabulary/resourceTypes/web,resourceTypes,Multimedia +resource_types,Dataset,"Data encoded in a defined structure, but not normally displayed in its raw form.",http://id.loc.gov/vocabulary/resourceTypes/dat,resourceTypes, +resource_types,Manuscript,Resource that is written in handwriting or typescript. These are generally unique resources.,http://id.loc.gov/vocabulary/resourceTypes/man,resourceTypes, +resource_types,Collection,"Aggregation of resources, generally gathered together artificially.",http://id.loc.gov/vocabulary/resourceTypes/col,resourceTypes, +resource_types,Unspecified,The type of resource is unknown or undetermined.,http://id.loc.gov/vocabulary/resourceTypes/unk,resourceTypes, +resource_types,Tactile,Resource that is intended to be perceived by touch.,http://id.loc.gov/vocabulary/resourceTypes/tac,resourceTypes, +islandora_display,"OpenSeadragon","Display using the OpenSeadragon viewer",http://openseadragon.github.io,, +islandora_display,"PDF.js","Display using the PDF.js viewer",http://mozilla.github.io/pdf.js,, diff --git a/config/sync/field.field.taxonomy_term.resource_types.field_authority_link.yml b/config/sync/field.field.taxonomy_term.resource_types.field_authority_link.yml index f52296762..d5ff07939 100644 --- a/config/sync/field.field.taxonomy_term.resource_types.field_authority_link.yml +++ b/config/sync/field.field.taxonomy_term.resource_types.field_authority_link.yml @@ -23,6 +23,7 @@ settings: authority_sources: dcmi_types: 'DCMI Type Vocabulary' marc_resource_types: 'MARC Resource Types' + resourceTypes: 'Library of Congress Resource Types Scheme' bibo: 'Bibliographic Ontology' other: Other title: 1 diff --git a/config/sync/migrate_plus.migration.islandora_defaults_tags.yml b/config/sync/migrate_plus.migration.islandora_defaults_tags.yml index f04b95c48..8253c0bba 100644 --- a/config/sync/migrate_plus.migration.islandora_defaults_tags.yml +++ b/config/sync/migrate_plus.migration.islandora_defaults_tags.yml @@ -11,13 +11,13 @@ cck_plugin_method: null migration_tags: - islandora_defaults_tags migration_group: islandora -label: 'Tags migration for islandora_defaults feature' +label: 'Tags migration for Islandora Starter Site' source: plugin: csv path: ../assets/migrate/tags.csv header_row_count: 1 ids: - - external_uri + - name process: name: name vid: vid @@ -32,6 +32,14 @@ process: plugin: urlencode source: external_uri field_authority_link/source: authority_link_source + parent: + - + plugin: skip_on_empty + method: process + source: parent + - + plugin: migration_lookup + migration: islandora_defaults_tags destination: plugin: 'entity:taxonomy_term' migration_dependencies: diff --git a/config/sync/tags.bak b/config/sync/tags.bak new file mode 100644 index 000000000..a4152ef60 --- /dev/null +++ b/config/sync/tags.bak @@ -0,0 +1,47 @@ +uuid: bb27baaa-0ede-46ee-9cdb-60358f6b60b6 +langcode: en +status: true +dependencies: { } +_core: + default_config_hash: TSmzvdb0Ez0oyUVnrGfjmvCBZvKiddOpLiHJjJyvmYE +id: islandora_defaults_tags +class: null +field_plugin_method: null +cck_plugin_method: null +migration_tags: + - islandora_defaults_tags +migration_group: islandora +label: 'Tags migration for islandora_defaults feature' +source: + plugin: csv + path: ../assets/migrate/tags.csv + header_row_count: 1 + ids: + - external_uri +process: + name: name + vid: vid + description: description + field_external_uri: + plugin: urlencode + source: external_uri + field_authority_link/uri: + plugin: urlencode + source: external_uri + field_authority_link/title: + plugin: urlencode + source: external_uri + field_authority_link/source: authority_link_source + parent: + - + plugin: migration_lookup + migration: islandora_defaults_tags + source: parent + - + plugin: default_value + default_value: 0 +destination: + plugin: 'entity:taxonomy_term' +migration_dependencies: + required: { } + optional: { } From 11013c72754c63abbdd456e89275115b352a82b6 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Fri, 19 May 2023 17:19:03 -0300 Subject: [PATCH 2/3] Update facets to use hierarchy. --- config/sync/facets.facet.resource_type.yml | 11 ++++++++--- config/sync/facets.facet.resource_type_swc.yml | 11 ++++++++--- config/sync/search_api.index.default_solr_index.yml | 13 ++++++------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/config/sync/facets.facet.resource_type.yml b/config/sync/facets.facet.resource_type.yml index ac68235d0..5d47e9522 100644 --- a/config/sync/facets.facet.resource_type.yml +++ b/config/sync/facets.facet.resource_type.yml @@ -19,13 +19,13 @@ field_identifier: field_resource_type query_operator: or hard_limit: 0 exclude: false -use_hierarchy: false +use_hierarchy: true keep_hierarchy_parents_active: false hierarchy: type: taxonomy config: { } -expand_hierarchy: false -enable_parent_when_child_gets_disabled: true +expand_hierarchy: true +enable_parent_when_child_gets_disabled: false widget: type: links config: @@ -71,6 +71,11 @@ processor_configs: weights: build: 100 settings: { } + translate_entity: + processor_id: translate_entity + weights: + build: 5 + settings: { } url_processor_handler: processor_id: url_processor_handler weights: diff --git a/config/sync/facets.facet.resource_type_swc.yml b/config/sync/facets.facet.resource_type_swc.yml index 9f7572d58..6029e4993 100644 --- a/config/sync/facets.facet.resource_type_swc.yml +++ b/config/sync/facets.facet.resource_type_swc.yml @@ -19,13 +19,13 @@ field_identifier: field_resource_type query_operator: or hard_limit: 0 exclude: false -use_hierarchy: false +use_hierarchy: true keep_hierarchy_parents_active: false hierarchy: type: taxonomy config: { } -expand_hierarchy: false -enable_parent_when_child_gets_disabled: true +expand_hierarchy: true +enable_parent_when_child_gets_disabled: false widget: type: links config: @@ -76,6 +76,11 @@ processor_configs: weights: build: 5 settings: { } + translate_entity: + processor_id: translate_entity + weights: + build: 5 + settings: { } url_processor_handler: processor_id: url_processor_handler weights: diff --git a/config/sync/search_api.index.default_solr_index.yml b/config/sync/search_api.index.default_solr_index.yml index 16184b63a..6c21097b7 100644 --- a/config/sync/search_api.index.default_solr_index.yml +++ b/config/sync/search_api.index.default_solr_index.yml @@ -3,13 +3,12 @@ langcode: en status: true dependencies: config: - - field.storage.node.field_abstract - field.storage.node.field_alt_title - - field.storage.node.field_edtf_date_created - field.storage.node.field_member_of - field.storage.node.field_description - field.storage.node.field_dewey_classification - field.storage.node.field_edition + - field.storage.node.field_edtf_date_created - field.storage.node.field_extent - field.storage.node.field_full_title - field.storage.node.field_isbn @@ -19,12 +18,13 @@ dependencies: - field.storage.node.field_physical_form - field.storage.node.field_resource_type - field.storage.node.field_rights + - field.storage.node.field_tags + - field.storage.node.field_abstract - field.storage.node.field_subject_general - field.storage.node.field_geographic_subject - field.storage.node.field_subjects_name - field.storage.node.field_temporal_subject - field.storage.node.field_subject - - field.storage.node.field_tags - search_api.server.default_solr_server - core.entity_view_mode.node.search_index module: @@ -229,13 +229,11 @@ field_settings: field_resource_type: label: 'Resource Type' datasource_id: 'entity:node' - property_path: 'field_resource_type:entity:name' - type: string + property_path: field_resource_type + type: integer dependencies: config: - field.storage.node.field_resource_type - module: - - taxonomy field_rights: label: Rights datasource_id: 'entity:node' @@ -484,6 +482,7 @@ processor_settings: preprocess_index: -45 fields: field_descendant_of: node-field_member_of + field_resource_type: taxonomy_term-parent highlight: weights: postprocess_query: 0 From 5537eea39a6b369604405d23639b4e58279b228f Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Fri, 19 May 2023 17:26:05 -0300 Subject: [PATCH 3/3] Remove backup file. --- config/sync/tags.bak | 47 -------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 config/sync/tags.bak diff --git a/config/sync/tags.bak b/config/sync/tags.bak deleted file mode 100644 index a4152ef60..000000000 --- a/config/sync/tags.bak +++ /dev/null @@ -1,47 +0,0 @@ -uuid: bb27baaa-0ede-46ee-9cdb-60358f6b60b6 -langcode: en -status: true -dependencies: { } -_core: - default_config_hash: TSmzvdb0Ez0oyUVnrGfjmvCBZvKiddOpLiHJjJyvmYE -id: islandora_defaults_tags -class: null -field_plugin_method: null -cck_plugin_method: null -migration_tags: - - islandora_defaults_tags -migration_group: islandora -label: 'Tags migration for islandora_defaults feature' -source: - plugin: csv - path: ../assets/migrate/tags.csv - header_row_count: 1 - ids: - - external_uri -process: - name: name - vid: vid - description: description - field_external_uri: - plugin: urlencode - source: external_uri - field_authority_link/uri: - plugin: urlencode - source: external_uri - field_authority_link/title: - plugin: urlencode - source: external_uri - field_authority_link/source: authority_link_source - parent: - - - plugin: migration_lookup - migration: islandora_defaults_tags - source: parent - - - plugin: default_value - default_value: 0 -destination: - plugin: 'entity:taxonomy_term' -migration_dependencies: - required: { } - optional: { }