metacat icon indicating copy to clipboard operation
metacat copied to clipboard

Using the package title as the downloaded zip file name on the getPackage method

Open taojing2002 opened this issue 7 years ago • 2 comments

Val Hendrix reported: I f /v2/packages/application%2Fbagit-097/ is accessed the name of the Zip file should be <Dataset Title>.zip but instead it is urn_uuid_.zip. While this is not a show stopper it is not very user friendly.

Currently we are using the package id as the zip file. So using the title of the data set (which will be extracted from the metadata object) is making more sense. However, it may be hard to get the data set title since the diversity of the metadata standards.

We may think about this approach.

taojing2002 avatar Jan 29 '18 19:01 taojing2002

I agree this can be made more user-friendly. Even calling it something more descriptive like package.zip, or datapackage.zip would be an improvement over just using the resource map's PID.

Some notes...

  • We may not have to add in special support for each metadata standard because the Solr index's title field already contains this information and MetacatUI has already requested it by the time the user clicks the download button

  • Data Packages may have more than on metadata record and we haven't developed a heuristic for determining a single title from many (though maybe we should because this has been a serious pain for me for some time)

  • Titles can be very long and contain special characters, e.g.,

    Riparian Shrub expansion: soil analysis data, microbial communities and microarray gene data from the North Slope of Alaska, 2016

    We'd have to truncate and possibly modify the titles increase the chance the user doesn't make the connection between what they saw on the web and what they see on their filesystem

amoeba avatar Jan 29 '18 21:01 amoeba

I like the idea of using a truncated title rather than the resource map ID. This should be 100% possible since we have a reference to the EML document when downloading (and we're already parsing information out of it).

I'll bring this up on the next development call meeting for a wider discussion.

ThomasThelen avatar Oct 09 '19 16:10 ThomasThelen