Skip to content

Commit

Permalink
Update headers for the downloadable CSV template
Browse files Browse the repository at this point in the history
* Remove system fields that should not be used
* Add a `files` header
  • Loading branch information
mark-dce committed Oct 16, 2019
1 parent dbdc19d commit e62b9ff
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/zizia/hyrax/hyrax_basic_metadata_mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class HyraxBasicMetadataMapper < HashMapper
##
# @return [Enumerable<Symbol>] The fields the mapper can process.
def fields
core_fields + basic_fields + [:visibility]
core_fields + basic_fields + [:visibility, :files]
end

# Properties defined with `multiple: false` in
Expand Down Expand Up @@ -131,18 +131,21 @@ def matching_header(field_name)
end

# Properties defined in Hyrax::CoreMetadata
# Note that date_uploaded is NOT set here, even though it is defined in
# Hyrax::CoreMetadata. Hyrax expects to set date_uploaded itself, and
# sending a metadata value for that field interferes with Hyrax expected
# behavior.
# Note that depositor, date_uploaded and date_modified are NOT set here,
# even though they are defined in Hyrax::CoreMetadata.
# Hyrax expects to set these fields itself, and
# sending a metadata value for these fields interferes with
# Hyrax expected behavior.
def core_fields
[:depositor, :title, :date_modified]
[:title]
end

# Properties defined in Hyrax::BasicMetadata
# System related fields like :relative_path, and :import_url
# are not included here because we don't expect users to directly
# import them.
def basic_fields
[:label, :relative_path, :import_url,
:resource_type, :creator, :contributor,
[:resource_type, :creator, :contributor,
:description, :keyword, :license,
:rights_statement, :publisher, :date_created,
:subject, :language, :identifier,
Expand Down

0 comments on commit e62b9ff

Please sign in to comment.