Skip to content

Commit

Permalink
Updates migrations with using field_unique_id as default for parse_en…
Browse files Browse the repository at this point in the history
…tity_lookups (#204)

Makes it so any taxonomy field that references a user managed taxonomy (which is anything but Media Use, Display and Model) uses the quad formatting and has field_unique_id as the default field for the quad. 
Updates CSV files accordingly. 

Fixes util.js doMigration code to not fail when the drupal update messages on the page.
  • Loading branch information
bseeger authored Aug 16, 2021
1 parent ef87573 commit 418083a
Show file tree
Hide file tree
Showing 64 changed files with 396 additions and 321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_original_name: original_name
field_media_audio_file/target_id:
plugin: file_import
Expand All @@ -92,7 +93,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_media_use:
-
plugin: skip_on_empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_original_name: original_name
field_media_document/target_id:
plugin: file_import
Expand All @@ -92,7 +93,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_media_use:
-
plugin: skip_on_empty
Expand All @@ -105,9 +106,9 @@ process:
-
plugin: entity_lookup
entity_type: taxonomy_term
value_key: name
bundle_key: vid
bundle: islandora_media_use
bundle_key: vid
value_key: name
status: constants/STATUS
destination:
plugin: 'entity:media'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_media_file/target_id:
plugin: file_import
source: '@_download_filepath'
Expand All @@ -92,7 +93,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_media_use:
-
plugin: skip_on_empty
Expand All @@ -105,9 +106,9 @@ process:
-
plugin: entity_lookup
entity_type: taxonomy_term
value_key: name
bundle_key: vid
bundle: islandora_media_use
bundle_key: vid
value_key: name
status: constants/STATUS
destination:
plugin: 'entity:media'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_original_name: original_name
field_media_file/target_id:
plugin: file_import
Expand All @@ -92,7 +93,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_media_use:
-
plugin: skip_on_empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_original_name: original_name
field_media_image/target_id:
plugin: file_import
Expand All @@ -93,7 +94,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_media_use:
-
plugin: skip_on_empty
Expand All @@ -105,9 +106,9 @@ process:
-
plugin: entity_lookup
entity_type: taxonomy_term
value_key: name
bundle_key: vid
bundle: islandora_media_use
bundle_key: vid
value_key: name
status: constants/STATUS
destination:
plugin: 'entity:media'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_media_oembed_video: url
field_media_of:
plugin: parse_entity_lookup
Expand All @@ -46,7 +47,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
status: constants/STATUS
destination:
plugin: 'entity:media'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_original_name: original_name
field_media_video_file/target_id:
plugin: file_import
Expand All @@ -92,7 +93,7 @@ process:
entity_type: node
bundle: islandora_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_media_use:
-
plugin: skip_on_empty
Expand All @@ -104,9 +105,9 @@ process:
-
plugin: entity_lookup
entity_type: taxonomy_term
value_key: name
bundle_key: vid
bundle: islandora_media_use
bundle_key: vid
value_key: name
status: constants/STATUS
destination:
plugin: 'entity:media'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ process:
entity_type: node
bundle: collection_object
bundle_key: type
value_key: title
value_key: field_unique_id
field_access_terms:
-
plugin: skip_on_empty
Expand All @@ -110,22 +110,24 @@ process:
delimiter: '||'
strict: false
-
plugin: entity_lookup
bundle_key: vid
bundle: islandora_access
entity_type: taxonomy_term
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: islandora_access
bundle_key: vid
value_key: field_unique_id
field_title_language:
-
plugin: skip_on_empty
method: process
source: title_language
-
plugin: entity_lookup
entity_type: taxonomy_term
bundle: language
bundle_key: vid
value_key: name
plugin: parse_entity_lookup
defaults:
entity_type: taxonomy_term
bundle: language
bundle_key: vid
value_key: field_unique_id
field_alternative_title:
-
plugin: skip_on_empty
Expand Down
Loading

0 comments on commit 418083a

Please sign in to comment.