ZenodoRecord
ZenodoRecord
Object of R6Class
for modelling an ZenodoRecord
R6Class
object.
new()
This method is used to instantiate a Zenodo Record
prereserveDOI(prereserve)
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.
setUploadType(uploadType)
Set the upload type (mandatory). Value should be among the following: 'publication', 'poster','presentation','dataset','image','video', or 'software'
setPublicationType(publicationType)
Set the publication type (mandatory if upload type is 'publication'). Value should be among the following: 'book','section','conferencepaper','article','patent','preprint', 'report','softwaredocumentation','thesis','technicalnote','workingpaper', or 'other'
setImageType(imageType)
Set the image type (mandatory if image type is 'image'). Value should be among the following: 'figure','plot','drawing','diagram','photo', or 'other'
setPublicationDate(publicationDate)
Set the publication date, as object of class Date
setEmbargoDate(embargoDate)
Set the embargo date, as object of class Date
setTitle(title)
Set title
setDescription(description)
Set description
setAccessRight(accessRight)
Set the access right. Value should be among the following: 'open','embargoed', 'restricted','closed'
setAccessConditions(accessConditions)
Set access conditions.
addCreator(firsname, lastname, affiliation, orcid, gnd)
Add a creator for the record.
removeCreator(by,property)
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'). Returns TRUE
if some creator was removed,
FALSE
otherwise.
removeCreatorByName(name)
Removes a creator by name. Returns TRUE
if some creator was removed,
FALSE
otherwise.
removeCreatorByAffiliation(affiliation)
Removes a creator by affiliation. Returns TRUE
if some creator was removed,
FALSE
otherwise.
removeCreatorByORCID(orcid)
Removes a creator by ORCID. Returns TRUE
if some creator was removed,
FALSE
otherwise.
removeCreatorByGND(gnd)
Removes a creator by GND. Returns TRUE
if some creator was removed,
FALSE
otherwise.
addContributor(firsname, lastname, type, affiliation, orcid, gnd)
Add a contributor for the record. Firstname, lastname, and type are mandatory.
The type should be an object of class character
among values: ContactPerson,
DataCollector, DataCurator, DataManager, Distributor, Editor, Funder, HostingInstitution,
Producer, ProjectLeader, ProjectManager, ProjectMember, RegistrationAgency, RegistrationAuthority,
RelatedPerson, Researcher, ResearchGroup, RightsHolder, Supervisor, Sponsor, WorkPackageLeader, Other.
removeContributor(by,property)
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'). Returns TRUE
if some contributor was removed,
FALSE
otherwise.
removeContributorByName(name)
Removes a contributor by name. Returns TRUE
if some contributor was removed,
FALSE
otherwise.
removeContributorByAffiliation(affiliation)
Removes a contributor by affiliation. Returns TRUE
if some contributor was removed,
FALSE
otherwise.
removeContributorByORCID(orcid)
Removes a contributor by ORCID. Returns TRUE
if some contributor was removed,
FALSE
otherwise.
removeContributorByGND(gnd)
Removes a contributor by GND. Returns TRUE
if some contributor was removed,
FALSE
otherwise.
setLicense(licenseId)
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()
.
setDOI(doi)
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)
.
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.
getFirstDOI()
Get DOI of the first record version.
getLastDOI()
Get DOI of the latest record version.
getVersions()
Get a data.frame
listing record versions with publication date and DOI.
setVersion(version)
Set the version.
setLanguage(language)
Set the language ISO 639-2 or 639-3 code.
addRelatedIdentifier(relation, identifier)
Adds a related identifier with a given relation. Relation can be one of among following values: isCitedBy, cites, isSupplementTo, isSupplementedBy, isNewVersionOf, isPreviousVersionOf, isPartOf, hasPart, compiles, isCompiledBy, isIdenticalTo, isAlternateIdentifier
Remove a related identifier
setReferences(references)
Set a vector of character strings as references
addReference(reference)
Adds a reference to the record metadata. Return TRUE
if added,
FALSE
otherwise.
removedReference(reference)
Removes a reference from the record metadata. Return TRUE
if removed,
FALSE
otherwise.
setKeywords(keywords)
Set a vector of character strings as keywords
addKeyword(keyword)
Adds a keyword to the record metadata. Return TRUE
if added,
FALSE
otherwise.
removedKeyword(keyword)
Removes a keyword from the record metadata. Return TRUE
if removed,
FALSE
otherwise.
addSubject(term, identifier)
Add a Subject for the record.
removeSubject(by,property)
Removes a subject by a property. The by
parameter should be the name
of the subject property ('term' or 'identifier'). Returns TRUE
if some
subject was removed, FALSE
otherwise.
removeSubjectByTerm(term)
Removes a subject by term. Returns TRUE
if some subject was removed,
FALSE
otherwise.
removeSubjectByIdentifier(identifier)
Removes a subject by identifier. Returns TRUE
if some subject was removed,
FALSE
otherwise.
setNotes(notes)
Set notes. HTML is not allowed
setCommunities(communities)
Set a vector of character strings identifying communities
addCommunity(community)
Adds a community to the record metadata. Return TRUE
if added,
FALSE
otherwise. 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()
.
removedCommunity(community)
Removes a community from the record metadata. Return TRUE
if removed,
FALSE
otherwise.
setGrants(grants)
Set a vector of character strings identifying grants
addGrant(grant)
Adds a grant to the record metadata. Return TRUE
if added,
FALSE
otherwise. 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()
.
removeGrant(grant)
Removes a grant from the record metadata. Return TRUE
if removed,
FALSE
otherwise.
setJournalTitle(title)
Set Journal title, object of class character
, if deposition is a published article.
setJournalVolume(volume)
Set Journal volume, object of class character
, if deposition is a published article.
setJournalIssue(issue)
Set Journal issue, object of class character
, if deposition is a published article.
setJournalPages(pages)
Set Journal pages, object of class character
, if deposition is a published article.
setConferenceTitle(title)
Set Conference title, object of class character
.
setConferenceAcronym(acronym)
Set conference acronym, object of class character
.
setConferenceDates(dates)
Set conference dates, object of class character
.
setConferencePlace(place)
Set conference place, object of class character
, in the format city, country
(e.g. Kingston, Jamaica). Conference title or acronym must also be specified if this field
is specified.
setConferenceUrl(url)
Set conference url, object of class character
.
setConferenceSession(session)
Set conference session, object of class character
.
setConferenceSessionPart(part)
Set conference session part, object of class character
.
setImprintPublisher(publisher)
Set imprint publisher, object of class character
.
setImprintISBN(isbn)
Set imprint ISBN, object of class character
.
setImprintPlace(place)
Set imprint place, object of class character
.
setPartofTitle(title)
Set the book title in case of a chapter, object of class character
.
setPartofPages(pages)
Set the page numbers of book, object of class character
.
setThesisUniversity(university)
Set the thesis university, object of class character
addThesisSupervisor(firsname, lastname, affiliation, orcid, gnd)
Add a thesis supervisor for the record.
removeThesisSupervisor(by,property)
Removes a thesi 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'). Returns TRUE
if some thesis supervisor was removed,
FALSE
otherwise.
removeThesisSupervisorByName(name)
Removes a thesis supervisor by name. Returns TRUE
if some thesis supervisor was removed,
FALSE
otherwise.
removeThesisSupervisorByAffiliation(affiliation)
Removes a thesis supervisor by affiliation. Returns TRUE
if some thesis supervisor was removed,
FALSE
otherwise.
removeThesisSupervisorByORCID(orcid)
Removes a thesis supervisor by ORCID. Returns TRUE
if some thesis supervisor was removed,
FALSE
otherwise.
removeThesisSupervisorByGND(gnd)
Removes a thesis supervisor by GND. Returns TRUE
if some thesis supervisor was removed,
FALSE
otherwise.
exportAs(format, filename)
Export metadata in a format supported by Zenodo. Supported formats are: BibTeX, CSL, DataCite, DublinCore, DCAT, JSON, JSON-LD, GeoJSON, MARCXML. The exported will be named with the specified filename followed by the format name.
exportAsBibTeX(filename)
Export metadata as BibTeX (BIB) file
exportAsCSL(filename)
Export metadata as CSL (JSON) file
exportAsDataCite(filename)
Export metadata as DataCite (XML) file
exportAsDublinCore(filename)
Export metadata as Dublin Core file
exportAsDCAT(filename)
Export metadata as DCAT (RDF) file
exportAsJSON(filename)
Export metadata as JSON file
exportAsJSONLD(filename)
Export metadata as JSON-LD (JSON) file
exportAsGeoJSON(filename)
Export metadata as GeoJSON (JSON) file
exportAsMARCXML{filename}
Export metadata as MARCXML (XML) file
exportAsAllFormats(filename)
Export metadata as all Zenodo supported metadata formats. THis function will create one file per Zenodo metadata formats.