Skip to content

Support for switching from publish_update to dataone::uploadDataPackageΒ #187

@laijasmine

Description

@laijasmine

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:

  1. consider having a function to easily create file names based on the title like arcticdatauitls::reformat_file_name to make sure we have meaningful file names as noted in issue 248 in arctic-data
  2. edits the distribution, system and packageId for the user:

arcticdatautils/R/editing.R

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)

  1. look into if the above can be generalized to the dataone package instead

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions