DSpace-Labs / SAFBuilder

Builds a Simple Archive Format package from files and a spreadsheet
https://wiki.duraspace.org/display/DSPACE/Simple+Archive+Format+Packager
45 stars 35 forks source link

Accept filename parameters (such as description) in body row #1

Closed peterdietz closed 12 years ago

peterdietz commented 12 years ago

For an upcoming batchload, each Item will have multiple Bitstreams, and to distinguish the Bitstreams, we'd like to associate the bitstream-level metadata of bitstream description.

Currently to do this through this tool, you can use a delimiter such as double-underscore, followed by the key, followed by the value.

The import tool additionally allows the following as extra parameters for a file.

bundle:BUNDLENAME
permissions:PERMISSIONS
description:DESCRIPTION
primary:true

For this example, we'd have to edit the column header to make it say:

filename__description:Presentation Poster
my-poster.pdf

Maybe that convention works if you've got a lot of homogenous content to ingest, but if each Bitstream might have a different description/caption, then the only way to support that is to make lots of columns:

filename__description:Presentation Poster, filename__description:Award Acceptance Photo
my-poster.pdf, big-award.png

So, what if we let the user put parameters directly into the file's name itself. filename my-poster.pdf__description:Presentation Poster

If you have multiple Bitstreams for the Item, then use the repeated entry delimeter of double-pipe.

filename
my-poster.pdf__description:Presentation Poster||big-award.png__description:Award Acceptance Photo

So, how do we mash it up and turn this up to 11 you ask? Since a user might still want to pass a "global" parameter by editing the filename column header, so that the file itself will inherit those values.

filename__bundle:PRESERVATION
my-poster.pdf__description:Presentation Poster||award.png__description:Award Photo
peterdietz commented 12 years ago

This fixed by: a90335941f5 and 5993c315b2f4