Brendow Adriel
Brendow Adriel

Reputation: 434

How to set the metadata type according to the file format?

Example:

if bitstream format =

   .mp4
   .mpeg
   .avi

set dc.type = video

if bitstream format =

   .pdf
   .text
   .doc

set dc.type = text

if bitstream format =

   .png
   .jpeg
   .gif

set dc.type = image

etc...

It is possible do this for internal collections and collections collected externally via harvest?

Via database or altering source-code?

Upvotes: 2

Views: 495

Answers (2)

schweerelos
schweerelos

Reputation: 2189

I would write a curation task for this, and run it periodically over all items in the harvested collection. In fact I have one right here that does almost what you need -- it populates dc.format.mimetype with the mime types of all ORIGINAL bitstreams in the item.

Terry's suggestion of customising the submission process / the collection template mechanism may not work -- I'm not sure that harvested items go through either of these two processes.

Upvotes: 3

terrywb
terrywb

Reputation: 3956

If you want to fix your existing records, you could run a SQL query to find the item_id for items that need modification. Once you have that list of ids, you can use the following tool to add a dc.type to your items:

https://wiki.duraspace.org/display/DSDOC5x/Batch+Metadata+Editing

I do not believe that DSpace is able to assign a dc.type based on the bitstream uploaded. You would need to code that yourself.

Looking at the Submission process documentation, you can configure a submission workflow collection by collection: https://wiki.duraspace.org/display/DSDOC6x/Submission+User+Interface#SubmissionUserInterface-AssigningacustomSubmissionProcesstoaCollection

It is possible to define a default template for a collection. New items submitted to that collection will receive template values by default.

Upvotes: 2

Related Questions