ZenodoRecord
ZenodoRecord
Object of R6Class for modelling an ZenodoRecord
R6Class object.
Emmanuel Blondel <emmanuel.blondel1@gmail.com>
zen4R::zen4RLogger -> ZenodoRecord
conceptdoirecord Concept DOI (common to all record versions)
conceptrecidrecord concept id
createdrecord creation date
doirecord doi
doi_urlrecord doi URL
fileslist of files associated to the record
idrecord id
linkslist of links associated to the record
metadatametadata elements associated to the record
modifiedrecord modification date
ownerrecord owner
record_idrecord_id
staterecord state
submittedrecord submission status
titlerecord title
versionrecord version
statsstats
new()method is used to instantiate a ZenodoRecord
ZenodoRecord$new(obj = NULL, logger = "INFO")objan optional list object to create the record
loggera logger to print log messages. It can be either NULL, "INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)
prereserveDOI()Set prereserve_doi if TRUE, FALSE otherwise to create a record without
prereserved DOI by Zenodo. By default, this method will be called to prereserve a DOI assuming
the record created doesn't yet handle a DOI. To avoid prereserving a DOI call $prereserveDOI(FALSE)
on your record.
ZenodoRecord$prereserveDOI(prereserve)prereservewhether a DOI has to be pre-reserved by Zenodo
setDOI()Set the DOI. This method can be used if a DOI has been already assigned outside Zenodo.
This method will call the method $prereserveDOI(FALSE).
ZenodoRecord$setDOI(doi)doiDOI to set for the record
getConceptDOI()Get the concept (generic) DOI. The concept DOI is a generic DOI common to all versions of a Zenodo record. When a deposit is unsubmitted, this concept DOI is inherited based on the prereserved DOI of the first record version.
ZenodoRecord$getConceptDOI()the concept DOI, object of class character
getFirstDOI()Get DOI of the first record version.
ZenodoRecord$getFirstDOI()the first DOI, object of class character
getLastDOI()Get DOI of the latest record version.
ZenodoRecord$getLastDOI()the last DOI, object of class character
getVersions()Get record versions with creation/publication date, version (ordering number) and DOI.
ZenodoRecord$getVersions()a data.frame with the record versions
getStats()Get record statistics
ZenodoRecord$getStats()statistics as data.frame
setUploadType()Set the upload type (mandatory).
ZenodoRecord$setUploadType(uploadType)uploadTyperecord upload type among the following values: 'publication', 'poster', 'presentation', 'dataset', 'image', 'video', 'software', 'lesson', 'physicalobject', 'other'
setPublicationType()Set the publication type (mandatory if upload type is 'publication').
ZenodoRecord$setPublicationType(publicationType)publicationTyperecord publication type among the following values: 'annotationcollection', 'book', 'section', 'conferencepaper', 'datamanagementplan', 'article', 'patent', 'preprint', 'deliverable', 'milestone', 'proposal', 'report', 'softwaredocumentation', 'taxonomictreatment', 'technicalnote', 'thesis', 'workingpaper', 'other'
setImageType()Set the image type (mandatory if image type is 'image').
ZenodoRecord$setImageType(imageType)imageTyperecord publication type among the following values: 'figure','plot', 'drawing','diagram','photo', or 'other'
setPublicationDate()Set the publication date.
ZenodoRecord$setPublicationDate(publicationDate)publicationDateobject of class Date
setEmbargoDate()Set the embargo date.
ZenodoRecord$setEmbargoDate(embargoDate)embargoDateobject of class Date
setTitle()Set the record title.
ZenodoRecord$setTitle(title)titleobject of class character
setDescription()Set the record description
ZenodoRecord$setDescription(description)descriptionobject of class character
setAccessRight()Set the access right.
ZenodoRecord$setAccessRight(accessRight)accessRightrecord access right among the following values: 'open','embargoed', 'restricted','closed'
setAccessConditions()set the access conditions.
ZenodoRecord$setAccessConditions(accessConditions)accessConditionsobject of class character
addCreator()Add a creator for the record. One approach is to use the firstname and
lastname arguments, that by default will be concatenated for Zenodo as
lastname, firstname. For more flexibility over this, the name
argument can be directly used.
ZenodoRecord$addCreator(
firstname,
lastname,
name = paste(lastname, firstname, sep = ", "),
affiliation = NULL,
orcid = NULL,
gnd = NULL
)firstnamecreator first name
lastnamecreator last name
namecreator name
affiliationcreator affiliation (optional)
orcidcreator ORCID (optional)
gndcreator GND (optional)
TRUE if added, FALSE otherwise
removeCreator()Removes a creator by a property. The by parameter should be the name
of the creator property ('name' - in the form 'lastname, firstname', 'affiliation',
'orcid' or 'gnd').
ZenodoRecord$removeCreator(by, property)byproperty used as criterion to remove the creator
propertyproperty value used to remove the creator
TRUE if removed, FALSE otherwise
removeCreatorByName()Removes a creator by name.
ZenodoRecord$removeCreatorByName(name)namecreator name
TRUE if removed, FALSE otherwise
removeCreatorByAffiliation()Removes a creator by affiliation.
ZenodoRecord$removeCreatorByAffiliation(affiliation)affiliationcreator affiliation
TRUE if removed, FALSE otherwise
removeCreatorByORCID()Removes a creator by ORCID.
ZenodoRecord$removeCreatorByORCID(orcid)orcidcreator ORCID
TRUE if removed, FALSE otherwise
removeCreatorByGND()Removes a creator by GND.
ZenodoRecord$removeCreatorByGND(gnd)gndcreator GND
TRUE if removed, FALSE otherwise
addContributor()Add a contributor for the record. One approach is to use the firstname and
lastname arguments, that by default will be concatenated for Zenodo as
lastname, firstname. For more flexibility over this, the name
argument can be directly used.
ZenodoRecord$addContributor(
firstname,
lastname,
name = paste(lastname, firstname, sep = ", "),
type,
affiliation = NULL,
orcid = NULL,
gnd = NULL
)firstnamecontributor first name
lastnamecontributor last name
namecontributor name
typecontributor type, among values: ContactPerson, DataCollector, DataCurator, DataManager, Distributor, Editor, Funder, HostingInstitution, Producer, ProjectLeader, ProjectManager, ProjectMember, RegistrationAgency, RegistrationAuthority, RelatedPerson, Researcher, ResearchGroup, RightsHolder, Supervisor, Sponsor, WorkPackageLeader, Other.
affiliationcontributor affiliation (optional)
orcidcontributor orcid (optional)
gndcontributor gnd (optional)
TRUE if added, FALSE otherwise
removeContributor()Removes a contributor by a property. The by parameter should be the name
of the contributor property ('name' - in the form 'lastname, firstname', 'affiliation',
'orcid' or 'gnd').
FALSE otherwise.
ZenodoRecord$removeContributor(by, property)byproperty used as criterion to remove the contributor
propertyproperty value used to remove the contributor
TRUE if removed, FALSE otherwise
removeContributorByName()Removes a contributor by name.
ZenodoRecord$removeContributorByName(name)namecontributor name
TRUE if removed, FALSE otherwise
removeContributorByAffiliation()Removes a contributor by affiliation.
ZenodoRecord$removeContributorByAffiliation(affiliation)affiliationcontributor affiliation
TRUE if removed, FALSE otherwise
removeContributorByORCID()Removes a contributor by ORCID.
ZenodoRecord$removeContributorByORCID(orcid)orcidcontributor ORCID
TRUE if removed, FALSE otherwise
removeContributorByGND()Removes a contributor by GND.
ZenodoRecord$removeContributorByGND(gnd)gndcontributor GND
TRUE if removed, FALSE otherwise
setLicense()Set license. The license should be set with the Zenodo id of the license. If not
recognized by Zenodo, the function will return an error. The list of licenses can
fetched with the ZenodoManager and the function $getLicenses().
ZenodoRecord$setLicense(licenseId, sandbox = FALSE)licenseIda license Id
sandboxUse the Zenodo sandbox infrastructure as basis to control available licenses. Default is FALSE
setVersion()Set record version.
ZenodoRecord$setVersion(version)versionthe record version to set
setLanguage()Set the language.
ZenodoRecord$setLanguage(language)languageISO 639-2 or 639-3 code
addRelatedIdentifier()Adds a related identifier with a given relation.
ZenodoRecord$addRelatedIdentifier(relation, identifier, resource_type = NULL)relationrelation type among following values: isCitedBy, cites, isSupplementTo, isSupplementedBy, isContinuedBy, continues, isDescribedBy, describes, hasMetadata, isMetadataFor, isNewVersionOf, isPreviousVersionOf, isPartOf, hasPart, isReferencedBy, references, isDocumentedBy, documents, isCompiledBy, compiles, isVariantFormOf, isOriginalFormof, isIdenticalTo, isAlternateIdentifier, isReviewedBy, reviews, isDerivedFrom, isSourceOf, requires, isRequiredBy, isObsoletedBy, obsoletes
identifierresource identifier
resource_typeoptional resource type, value among possible publication types, image types, or upload
types (except 'publication' and 'image' for which a publication/image has to be specified). Default is NULL
removeRelatedIdentifier()Removes a related identifier with a given relation.
ZenodoRecord$removeRelatedIdentifier(relation, identifier)relationrelation type among following values: isCitedBy, cites, isSupplementTo, isSupplementedBy, isContinuedBy, continues, isDescribedBy, describes, hasMetadata, isMetadataFor, isNewVersionOf, isPreviousVersionOf, isPartOf, hasPart, isReferencedBy, references, isDocumentedBy, documents, isCompiledBy, compiles, isVariantFormOf, isOriginalFormof, isIdenticalTo, isAlternateIdentifier, isReviewedBy, reviews, isDerivedFrom, isSourceOf, requires, isRequiredBy, isObsoletedBy, obsoletes
identifierresource identifier
setReferences()Set references
ZenodoRecord$setReferences(references)referencesa vector or list of references to set for the record
addReference()Add a reference
ZenodoRecord$addReference(reference)referencethe reference to add
TRUE if added, FALSE otherwise
removeReference()Remove a reference
ZenodoRecord$removeReference(reference)referencethe reference to remove
TRUE if removed, FALSE otherwise
setKeywords()Set keywords
ZenodoRecord$setKeywords(keywords)keywordsa vector or list of keywords to set for the record
addKeyword()Add a keyword
ZenodoRecord$addKeyword(keyword)keywordthe keyword to add
TRUE if added, FALSE otherwise
removeKeyword()Remove a keyword
ZenodoRecord$removeKeyword(keyword)keywordthe keyword to remove
TRUE if removed, FALSE otherwise
addSubject()Adds a subject given a term and identifier
ZenodoRecord$addSubject(term, identifier)termsubject term
identifiersubject identifier
removeSubject()Removes subject(s) by a property. The by parameter should be the name
of the subject property ('term' or 'identifier').
ZenodoRecord$removeSubject(by, property)byproperty used as criterion to remove subjects
propertyproperty value used to remove subjects
TRUE if at least one subject is removed, FALSE otherwise.
removeSubjectByTerm()Removes subject(s) by term.
ZenodoRecord$removeSubjectByTerm(term)termthe term to use to remove subject(s)
TRUE if at least one subject is removed, FALSE otherwise.
removeSubjectByIdentifier()Removes subject(s) by identifier
ZenodoRecord$removeSubjectByIdentifier(identifier)identifierthe identifier to use to remove subject(s)
TRUE if at least one subject is removed, FALSE otherwise.
setNotes()Set notes. HTML is not allowed
ZenodoRecord$setNotes(notes)notesobject of class character
setCommunities()Set a vector of character strings identifying communities
ZenodoRecord$setCommunities(communities, sandbox = FALSE)communitiesa vector or list of communities. Values should among known communities. The list of communities can
fetched with the ZenodoManager and the function $getCommunities(). Each community should be set with
the Zenodo id of the community. If not recognized by Zenodo, the function will return an error.
sandboxUse the Zenodo sandbox infrastructure as basis to control available communities. Default is FALSE
addCommunity()Adds a community to the record metadata.
ZenodoRecord$addCommunity(community, sandbox = FALSE)communitycommunity to add. The community should be set with the Zenodo id of the community.
If not recognized by Zenodo, the function will return an error. The list of communities can fetched
with the ZenodoManager and the function $getCommunities().
sandboxUse the Zenodo sandbox infrastructure as basis to control available communities. Default is FALSE
TRUE if added, FALSE otherwise
removeCommunity()Removes a community from the record metadata.
ZenodoRecord$removeCommunity(community)communitycommunity to remove. The community should be set with the Zenodo id of the community.
TRUE if removed, FALSE otherwise
setGrants()Set a vector of character strings identifying grants
ZenodoRecord$setGrants(grants, sandbox = FALSE)grantsa vector or list of grants Values should among known grants The list of grants can
fetched with the ZenodoManager and the function $getGrants(). Each grant should be set with
the Zenodo id of the grant If not recognized by Zenodo, the function will raise a warning only.
sandboxUse the Zenodo sandbox infrastructure as basis to control available grants. Default is FALSE
addGrant()Adds a grant to the record metadata.
ZenodoRecord$addGrant(grant, sandbox = FALSE)grantgrant to add. The grant should be set with the id of the grant. If not
recognized by Zenodo, the function will return an warning only. The list of grants can
fetched with the ZenodoManager and the function $getGrants().
sandboxUse the Zenodo sandbox infrastructure as basis to control available grants. Default is FALSE
TRUE if added, FALSE otherwise
removeGrant()Removes a grant from the record metadata.
ZenodoRecord$removeGrant(grant)grantgrant to remove. The grant should be set with the Zenodo id of the grant
TRUE if removed, FALSE otherwise
setJournalTitle()Set Journal title to the record metadata
ZenodoRecord$setJournalTitle(title)titlea title, object of class character
setJournalVolume()Set Journal volume to the record metadata
ZenodoRecord$setJournalVolume(volume)volumea volume
setJournalIssue()Set Journal issue to the record metadata
ZenodoRecord$setJournalIssue(issue)issuean issue
setJournalPages()Set Journal pages to the record metadata
ZenodoRecord$setJournalPages(pages)pagesnumber of pages
setConferenceTitle()Set conference title to the record metadata
ZenodoRecord$setConferenceTitle(title)titleconference title, object of class character
setConferenceAcronym()Set conference acronym to the record metadata
ZenodoRecord$setConferenceAcronym(acronym)acronymconference acronym, object of class character
setConferenceDates()Set conference dates to the record metadata
ZenodoRecord$setConferenceDates(dates)datesconference dates, object of class character
setConferencePlace()Set conference place to the record metadata
ZenodoRecord$setConferencePlace(place)placeconference place, object of class character
setConferenceUrl()Set conference url to the record metadata
ZenodoRecord$setConferenceUrl(url)urlconference url, object of class character
setConferenceSession()Set conference session to the record metadata
ZenodoRecord$setConferenceSession(session)sessionconference session, object of class character
setConferenceSessionPart()Set conference session part to the record metadata
ZenodoRecord$setConferenceSessionPart(part)partconference session part, object of class character
setImprintPublisher()Set imprint publisher to the record metadata
ZenodoRecord$setImprintPublisher(publisher)publisherthe publisher, object of class character
setImprintISBN()Set imprint ISBN to the record metadata
ZenodoRecord$setImprintISBN(isbn)isbnthe ISBN, object of class character
setImprintPlace()Set imprint place to the record metadata
ZenodoRecord$setImprintPlace(place)placethe place, object of class character
setPartofTitle()Set title to which record is part of
ZenodoRecord$setPartofTitle(title)titlethe title, object of class character
setPartofPages()Set pages to which record is part of
ZenodoRecord$setPartofPages(pages)pagesthe pages, object of class character
setThesisUniversity()Set thesis university
ZenodoRecord$setThesisUniversity(university)universitythe university, object of class character
addThesisSupervisor()Adds thesis supervisor
ZenodoRecord$addThesisSupervisor(
firstname,
lastname,
affiliation = NULL,
orcid = NULL,
gnd = NULL
)firstnamesupervisor first name
lastnamesupervisor last name
affiliationsupervisor affiliation (optional)
orcidsupervisor ORCID (optional)
gndsupervisor GND (optional)
removeThesisSupervisor()Removes a thesis supervisor by a property. The by parameter should be the name
of the thesis supervisor property ('name' - in the form 'lastname, firstname', 'affiliation',
'orcid' or 'gnd').
ZenodoRecord$removeThesisSupervisor(by, property)byproperty used as criterion to remove the thesis supervisor
propertyproperty value used to remove the thesis supervisor
TRUE if removed, FALSE otherwise
removeThesisSupervisorByName()Removes a thesis supervisor by name.
ZenodoRecord$removeThesisSupervisorByName(name)namethesis supervisor name
TRUE if removed, FALSE otherwise
removeThesisSupervisorByAffiliation()Removes a thesis supervisor by affiliation
ZenodoRecord$removeThesisSupervisorByAffiliation(affiliation)affiliationthesis supervisor affiliation
TRUE if removed, FALSE otherwise
removeThesisSupervisorByORCID()Removes a thesis supervisor by ORCID
ZenodoRecord$removeThesisSupervisorByORCID(orcid)orcidthesis supervisor ORCID
TRUE if removed, FALSE otherwise
removeThesisSupervisorByGND()Removes a thesis supervisor by GND
ZenodoRecord$removeThesisSupervisorByGND(gnd)gndthesis supervisor GND
TRUE if removed, FALSE otherwise
addLocation()Adds a location to the record metadata.
ZenodoRecord$addLocation(place, description = NULL, lat = NULL, lon = NULL)placeplace (required)
descriptiondescription
latlatitude
lonlongitude