Project

General

Profile

Bug #6290

Include data objects in BagIt download with intelligent file names

Added by ben leinfelder about 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

History

#1 Updated by ben leinfelder about 6 years ago

  • Assignee set to Lauren Walker

#2 Updated by Lauren Walker about 6 years ago

  • Status changed from New to Resolved

#3 Updated by Lauren Walker about 6 years ago

The file naming methodology is now pid+object format type (RESOURCE, DATA, METADATA). I removed the randomly generated number from the end of the file names by creating a new File in the temp directory instead of using createTempFile. A downloaded package may now look like:

doi_10_5063_1
- data
- doi_10_5063_1-METADATA.xml

#4 Updated by ben leinfelder about 6 years ago

  • Status changed from Resolved to In Progress

Hey Lauren, was thinking about this temp directory - I think there's still some room for collision if two processes end up getting the same timestamp. Did you look at this approach? http://stackoverflow.com/questions/617414/create-a-temporary-directory-in-java

#5 Updated by Lauren Walker about 6 years ago

Two things to edit here:

- Add the file name from the EML to the BagIt file name instead of object format type. Look up old metacat ids in the EML and use the IdentityManager class to look up the DataONE id for that metacat docid in order to get an exact match with the pid in the ORE package. Keep the object format type as a fallback if a file name cannot be found

- Create a catch for identical temp file directories

#6 Updated by Lauren Walker almost 6 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF