Skip to content

Commit

Permalink
Refactor queries to not use anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismacdonaldw committed Aug 22, 2024
1 parent 38dc63b commit c7b9a52
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions modules/dgi_migrate_foxml_standard_mods/migrations/dgis_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1735,10 +1735,11 @@ process:
query: 'mods:typeOfResource'
- plugin: callback
callable: iterator_to_array
_resource_type:
- plugin: get
source: '@_resource_type_query'
- plugin: skip_on_empty
method: process
_resource_type:
- << : *_resource_type_query
- plugin: multiple_values
- plugin: dgi_migrate.sub_process
process_values: true
Expand All @@ -1749,7 +1750,10 @@ process:
<<: *generic_term_after
- <<: *generic_term_extract
_unspecified_resource_type:
- <<: *_resource_type_query
- plugin: get
source: '@_resource_type_query'
- plugin: skip_on_empty
method: process
- plugin: get
source: '@_unspecified_term'
- plugin: gate
Expand Down Expand Up @@ -2050,10 +2054,11 @@ process:
query: 'mods:extension/etd:degree/etd:level'
- plugin: callback
callable: iterator_to_array
_degree_level:
- plugin: get
source: '@_degree_level_query'
- plugin: skip_on_empty
method: process
_degree_level:
- <<: *_degree_level_query
- plugin: multiple_values
- plugin: dgi_migrate.sub_process
process_values: true
Expand All @@ -2064,7 +2069,10 @@ process:
<<: *generic_term_after
- <<: *generic_term_extract
_unspecified_degree_level:
- <<: *_degree_level_query
- plugin: get
source: '@_degree_level_query'
- plugin: skip_on_empty
method: process
- plugin: get
source: '@_unspecified_term'
- plugin: gate
Expand Down Expand Up @@ -2550,10 +2558,11 @@ process:
query: 'mods:accessCondition[@type="use and reproduction" or @type="Use and Reproduction"][@displayLabel="Creative Commons" or @displayLabe="Creative Commons"]'
- plugin: callback
callable: iterator_to_array
_use_license:
- plugin: get
source: '@_use_license_query'
- plugin: skip_on_empty
method: process
_use_license:
- <<: *_use_license_query
- plugin: multiple_values
- plugin: dgi_migrate.sub_process
process_values: true
Expand All @@ -2564,7 +2573,10 @@ process:
<<: *generic_term_after
- <<: *generic_term_extract
_unspecified_use_license:
- <<: *_use_license_query
- plugin: get
source: '@_use_license_query'
- plugin: skip_on_empty
method: process
- plugin: get
source: '@_unspecified_term'
- plugin: gate
Expand Down Expand Up @@ -2612,10 +2624,11 @@ process:
query: 'mods:accessCondition[@type="rights statement"]'
- plugin: callback
callable: iterator_to_array
_rights_statement:
- plugin: get
source: '@_rights_statement_query'
- plugin: skip_on_empty
method: process
_rights_statement:
- <<: *_rights_statement_query
- plugin: multiple_values
- plugin: dgi_migrate.sub_process
process_values: true
Expand All @@ -2630,7 +2643,10 @@ process:
callable: array_filter
- plugin: null_coalesce
_unspecified_rights_statement:
- <<: *_rights_statement_query
- plugin: get
source: '@_rights_statement_query'
- plugin: skip_on_empty
method: process
- plugin: get
source: '@_unspecified_term'
- plugin: gate
Expand Down

0 comments on commit c7b9a52

Please sign in to comment.