-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
We may want to keep some or all of this functionality of publish_update when we switch over to using dataone::uploadDataPackage. We should consider the following:
- consider having a function to easily create file names based on the title like
arcticdatauitls::reformat_file_nameto make sure we have meaningful file names as noted in issue 248 in arctic-data - edits the distribution, system and packageId for the user:
Lines 445 to 474 in eb633eb
| # Update the metadata | |
| # Replace packageId | |
| doc$packageId <- metadata_updated_pid | |
| # Add landing page | |
| if (use_doi == T){ | |
| doc$dataset$distribution$offline <- NULL | |
| doc$dataset$distribution$online$url <- paste0("http://doi.org/", metadata_updated_pid) | |
| } | |
| else if (use_doi == F & mn@identifier == "urn:node:ARCTIC"){ | |
| doc$dataset$distribution$offline <- NULL | |
| doc$dataset$distribution$online$url <- list(url = paste0("http://arcticdata.io/catalog/view/", metadata_updated_pid), | |
| `function` = "information") | |
| } | |
| else if (use_doi == F & mn@identifier == "urn:node:KNB"){ | |
| doc$dataset$distribution$offline <- NULL | |
| doc$dataset$distribution$online$url <- list(url = paste0("http://knb.ecoinformatics.org/view/", metadata_updated_pid), | |
| `function` = "information") | |
| } | |
| else if (use_doi == F & mn@identifier == "urn:node:mnTestARCTIC"){ | |
| doc$dataset$distribution$offline <- NULL | |
| doc$dataset$distribution$online$url <- list(url = paste0("http://test.arcticdata.io/view/", metadata_updated_pid), | |
| `function` = "information") | |
| } | |
| # Replace system | |
| doc$system <- get_system_uri(doc$packageId) |
- look into if the above can be generalized to the dataone package instead
amoeba