Bug #6290
closedInclude data objects in BagIt download with intelligent file names
0%
Updated by ben leinfelder about 11 years ago
- Assignee set to Lauren Walker
This is in the getPackage() method in:
https://code.ecoinformatics.org/code/metacat/trunk/src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
Updated by Lauren Walker about 11 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
Updated by ben leinfelder about 11 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
Updated by Lauren Walker about 11 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
Updated by Lauren Walker about 11 years ago
- Status changed from In Progress to Resolved