Skip to content

Commit

Permalink
fix identifier scheme handling
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed May 17, 2024
1 parent d012624 commit f1a6c88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/ZenodoRecord.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ZenodoRecord <- R6Class("ZenodoRecord",
allowed_date_types = c("accepted", "available", "collected", "copyrighted", "created", "issued",
"other", "submitted", "updated", "valid", "withdrawn"),
allowed_identifier_schemes = c("ark", "arxiv", "bibcode", "doi", "ean13", "eissn", "handle", "igsn", "isbn",
"issn", "istc", "lissn", "lsid", "pubmed id", "purl", "upc", "url", "urn", "w3id"),
"issn", "istc", "lissn", "lsid", "pubmed id", "purl", "upc", "url", "urn", "w3id", "other"),
allowed_relation_types = c("iscitedby", "cites", "issupplementto", "issupplementedby",
"iscontinuedby", "continues", "isdescribedby", "describes", "hasmetadata",
"ismetadatafor", "isnewversionof", "ispreviousversionof", "ispartof",
Expand Down Expand Up @@ -785,7 +785,7 @@ ZenodoRecord <- R6Class("ZenodoRecord",
#'@return \code{TRUE} if added, \code{FALSE} otherwise
addRelatedIdentifier = function(identifier, scheme, relation_type, resource_type = NULL){
if(!(scheme %in% private$allowed_identifier_schemes)){
stop(sprintf("Identifier scheme '%s%' incorrect. Use a value among the following [%s]",
stop(sprintf("Identifier scheme '%s' incorrect. Use a value among the following [%s]",
scheme, paste0(private$allowed_identifier_schemes, collapse=",")))
}
if(!(relation_type %in% private$allowed_relation_types)){
Expand Down

0 comments on commit f1a6c88

Please sign in to comment.