| ZenodoRecord {zen4R} | R Documentation |
ZenodoRecord
Description
ZenodoRecord
ZenodoRecord
Format
R6Class object.
Value
Object of R6Class for modelling an ZenodoRecord
Super class
zen4R::zen4RLogger -> ZenodoRecord
Public fields
createdrecord creation date
updatedrecord update date
revision_idrevision id
is_draftis draft
is_publishedis published
statusrecord status
versionsversions
accessaccess policies
fileslist of files associated to the record
idrecord id
linkslist of links associated to the record
metadatametadata elements associated to the record
parentparent record
pidspids
statsstats
Methods
Public methods
Inherited methods
Method new()
method is used to instantiate a ZenodoRecord
Usage
ZenodoRecord$new(obj = NULL, logger = "INFO")
Arguments
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)
Method getStats()
Get record statistics
Usage
ZenodoRecord$getStats()
Returns
statistics as data.frame
Method getId()
Get the record Id
Usage
ZenodoRecord$getId()
Returns
the Id, object of class character
Method getParentId()
Get the parent record Id
Usage
ZenodoRecord$getParentId()
Returns
the parent Id, object of class character
Method getConceptId()
Get the concept record Id
Usage
ZenodoRecord$getConceptId()
Returns
the concept Id, object of class character
Method setDOI()
Set the DOI. This method can be used if a DOI has been already assigned outside Zenodo.
Usage
ZenodoRecord$setDOI(doi, provider = NULL, client = NULL)
Arguments
doiDOI to set for the record
providerDOI provider
clientDOI client
Method getDOI()
Get the record DOI.
Usage
ZenodoRecord$getDOI()
Returns
the DOI, object of class character
Method getConceptDOI()
Get the concept (generic) DOI. The concept DOI is a generic DOI common to all versions of a Zenodo record.
Usage
ZenodoRecord$getConceptDOI()
Returns
the concept DOI, object of class character
Method setAccessPolicyRecord()
Set the access policy for record, among values "public" (default) or "restricted" In Zenodo, in principle, the access policy 'restricted' is not available for records.
Usage
ZenodoRecord$setAccessPolicyRecord(access = c("public", "restricted"))Arguments
accessaccess policy ('public' or 'restricted')
Method setAccessPolicyFiles()
Set the access policy for files, among values "public" (default) or "restricted"
Usage
ZenodoRecord$setAccessPolicyFiles(access = c("public", "restricted"))Arguments
accessaccess policy ('public' or 'restricted')
Method setAccessPolicyEmbargo()
Set access policy embargo options
Usage
ZenodoRecord$setAccessPolicyEmbargo(active = FALSE, until = NULL, reason = "")
Arguments
activewhether embargo is active or not. Default is
FALSEuntilembargo date, object of class
Date. Default isNULL. Must be provided if embargo is activereasonembargo reason, object of class
character. Default is an empty string
Method setResourceType()
Set the resource type (mandatory).
Usage
ZenodoRecord$setResourceType(resourceType)
Arguments
resourceTyperecord resource type
Method setUploadType()
Set the upload type (mandatory). Deprecated since zen4R 1.0
Usage
ZenodoRecord$setUploadType(uploadType)
Arguments
uploadTyperecord upload type among the following values: 'publication', 'poster', 'presentation', 'dataset', 'image', 'video', 'software', 'lesson', 'physicalobject', 'other'
Method setPublicationType()
Set the publication type (mandatory if upload type is 'publication'). Deprecated since zen4R 1.0
Usage
ZenodoRecord$setPublicationType(publicationType)
Arguments
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'
Method setImageType()
Set the image type (mandatory if image type is 'image'). Deprecated since zen4R 1.0
Usage
ZenodoRecord$setImageType(imageType)
Arguments
imageTyperecord publication type among the following values: 'figure','plot', 'drawing','diagram','photo', or 'other'
Method setPublisher()
Set the publisher
Usage
ZenodoRecord$setPublisher(publisher)
Arguments
publisherpublisher object of class
character
Method setPublicationDate()
Set the publication date. For more information on the accepted format, please check https://inveniordm.docs.cern.ch/reference/metadata/#publication-date-1
Usage
ZenodoRecord$setPublicationDate(publicationDate)
Arguments
publicationDateobject of class
character
Method addDate()
Add date
Usage
ZenodoRecord$addDate(date, type, description = NULL)
Arguments
datedate
typetype of date, among following values: 'accepted', 'available', 'collected', 'copyrighted', 'created', 'issued', 'other', 'submitted', 'updated', 'valid', 'withdrawn'
descriptionfree text, specific information about the date
Method removeDate()
Remove a date
Usage
ZenodoRecord$removeDate(date, type)
Arguments
datethe date to remove
typethe date type of the date to be removed
Returns
TRUE if removed, FALSE otherwise
Method setTitle()
Set the record title.
Usage
ZenodoRecord$setTitle(title)
Arguments
titleobject of class
character
Method addAdditionalTitle()
Add additional record title
Usage
ZenodoRecord$addAdditionalTitle(title, type, lang = "eng")
Arguments
titletitle free text
typetype of title, among following values: alternative-title, subtitle, translated-title, other
langlanguage id
Returns
TRUE if added, FALSE otherwise
Method removeAdditionalTitle()
Removes additional record title.
Usage
ZenodoRecord$removeAdditionalTitle(title, type, lang = "eng")
Arguments
titletitle free text
typetype of title, among following values: abstract, methods, series-information, table-of-contents, technical-info, other
langlanguage id
Returns
TRUE if removed, FALSE otherwise
Method setDescription()
Set the record description
Usage
ZenodoRecord$setDescription(description)
Arguments
descriptionobject of class
character
Method addAdditionalDescription()
Add additional record description
Usage
ZenodoRecord$addAdditionalDescription(description, type, lang = "eng")
Arguments
descriptiondescription free text
typetype of description, among following values: abstract, methods, series-information, table-of-contents, technical-info, other
langlanguage id
Returns
TRUE if added, FALSE otherwise
Method removeAdditionalDescription()
Removes additional record description
Usage
ZenodoRecord$removeAdditionalDescription(description, type, lang = "eng")
Arguments
descriptiondescription free text
typetype of description, among following values: abstract, methods, series-information, table-of-contents, technical-info, other
langlanguage id
Returns
TRUE if removed, FALSE otherwise
Method addPersonOrOrg()
Add a person or organization for the record. For persons, the approach is to use the firstname and
lastname arguments, that by default will be concatenated for Zenodo as lastname, firstname.
For organizations, use the name argument.
Usage
ZenodoRecord$addPersonOrOrg( firstname = NULL, lastname = NULL, name = paste(lastname, firstname, sep = ", "), orcid = NULL, gnd = NULL, isni = NULL, ror = NULL, role = NULL, affiliations = NULL, sandbox = FALSE, type )
Arguments
firstnameperson first name
lastnameperson last name
nameorganization name
orcidperson or organization ORCID (optional)
gndperson or organization GND (optional)
isniperson or organization ISNI (optional)
rorperson or organization ROR (optional)
rolerole, values among: contactperson, datacollector, datacurator, datamanager, distributor, editor, funder, hostinginstitution, producer, projectleader, projectmanager, projectmember, registrationagency, registrationauthority, relatedperson, researcher, researchgroup, rightsholder, supervisor, sponsor, workpackageleader, other
affiliationsperson or organization affiliations (optional)
sandboxUse the Zenodo sandbox infrastructure as basis to control available affiliations. Default is
FALSEtypetype of person or org (creators/contributors)
Returns
TRUE if added, FALSE otherwise
Method removePersonOrOrg()
Removes a person or organization by a property. The by parameter should be the name
of the person or organization property ('name', 'affiliation','orcid','gnd','isni','ror').
Usage
ZenodoRecord$removePersonOrOrg(by, property, type)
Arguments
byproperty used as criterion to remove the person or organization
propertyproperty value used to remove the person or organization
typetype of person or org (creators / contributors)
Returns
TRUE if removed, FALSE otherwise
Method addCreator()
Add a creator for the record. For persons, the approach is to use the firstname and
lastname arguments, that by default will be concatenated for Zenodo as lastname, firstname.
For organizations, use the name argument.
Usage
ZenodoRecord$addCreator( firstname = NULL, lastname = NULL, name = paste(lastname, firstname, sep = ", "), orcid = NULL, gnd = NULL, isni = NULL, ror = NULL, role = NULL, affiliations = NULL, sandbox = FALSE )
Arguments
firstnameperson first name
lastnameperson last name
nameorganization name
orcidcreator ORCID (optional)
gndcreator GND (optional)
isnicreator ISNI (optional)
rorcreator ROR (optional)
rolerole, values among: contactperson, datacollector, datacurator, datamanager, distributor, editor, funder, hostinginstitution, producer, projectleader, projectmanager, projectmember, registrationagency, registrationauthority, relatedperson, researcher, researchgroup, rightsholder, supervisor, sponsor, workpackageleader, other
affiliationscreator affiliations (optional)
sandboxUse the Zenodo sandbox infrastructure as basis to control available affiliations. Default is
FALSE
Returns
TRUE if added, FALSE otherwise
Method removeCreatorByName()
Removes a creator by name.
Usage
ZenodoRecord$removeCreatorByName(name)
Arguments
namecreator name
Returns
TRUE if removed, FALSE otherwise
Method removeCreatorByAffiliation()
Removes a creator by affiliation.
Usage
ZenodoRecord$removeCreatorByAffiliation(affiliation)
Arguments
affiliationcreator affiliation
Returns
TRUE if removed, FALSE otherwise
Method removeCreatorByORCID()
Removes a creator by ORCID.
Usage
ZenodoRecord$removeCreatorByORCID(orcid)
Arguments
orcidcreator ORCID
Returns
TRUE if removed, FALSE otherwise
Method removeCreatorByGND()
Removes a creator by GND.
Usage
ZenodoRecord$removeCreatorByGND(gnd)
Arguments
gndcreator GND
Returns
TRUE if removed, FALSE otherwise
Method removeCreatorByISNI()
Removes a creator by ISNI.
Usage
ZenodoRecord$removeCreatorByISNI(isni)
Arguments
isnicreator ISNI
Returns
TRUE if removed, FALSE otherwise
Method removeCreatorByROR()
Removes a creator by ROR.
Usage
ZenodoRecord$removeCreatorByROR(ror)
Arguments
rorcreator ROR
Returns
TRUE if removed, FALSE otherwise
Method addContributor()
Add a contributor for the record. For persons, the approach is to use the firstname and
lastname arguments, that by default will be concatenated for Zenodo as lastname, firstname.
For organizations, use the name argument.
Usage
ZenodoRecord$addContributor( firstname = NULL, lastname = NULL, name = paste(lastname, firstname, sep = ", "), orcid = NULL, gnd = NULL, isni = NULL, ror = NULL, role = NULL, affiliations = NULL, sandbox = FALSE )
Arguments
firstnameperson first name
lastnameperson last name
nameorganization name
orcidcontributor ORCID (optional)
gndcontributor GND (optional)
isnicontributor ISNI (optional)
rorcontributor ROR (optional)
rolerole, values among: contactperson, datacollector, datacurator, datamanager, distributor, editor, funder, hostinginstitution, producer, projectleader, projectmanager, projectmember, registrationagency, registrationauthority, relatedperson, researcher, researchgroup, rightsholder, supervisor, sponsor, workpackageleader, other
affiliationscontributor affiliations (optional)
sandboxUse the Zenodo sandbox infrastructure as basis to control available affiliations. Default is
FALSE
Returns
TRUE if added, FALSE otherwise
Method removeContributorByName()
Removes a contributor by name.
Usage
ZenodoRecord$removeContributorByName(name)
Arguments
namecontributor name
Returns
TRUE if removed, FALSE otherwise
Method removeContributorByAffiliation()
Removes a contributor by affiliation.
Usage
ZenodoRecord$removeContributorByAffiliation(affiliation)
Arguments
affiliationcontributor affiliation
Returns
TRUE if removed, FALSE otherwise
Method removeContributorByORCID()
Removes a contributor by ORCID.
Usage
ZenodoRecord$removeContributorByORCID(orcid)
Arguments
orcidcontributor ORCID
Returns
TRUE if removed, FALSE otherwise
Method removeContributorByGND()
Removes a contributor by GND.
Usage
ZenodoRecord$removeContributorByGND(gnd)
Arguments
gndcontributor GND
Returns
TRUE if removed, FALSE otherwise
Method removeContributorByISNI()
Removes a contributor by ISNI.
Usage
ZenodoRecord$removeContributorByISNI(isni)
Arguments
isnicontributor ISNI
Returns
TRUE if removed, FALSE otherwise
Method removeContributorByROR()
Removes a contributor by ROR.
Usage
ZenodoRecord$removeContributorByROR(ror)
Arguments
rorcontributor ROR
Returns
TRUE if removed, FALSE otherwise
Method addRight()
Add right/license. Please see https://inveniordm.docs.cern.ch/reference/metadata/#rights-licenses-0-n
Usage
ZenodoRecord$addRight( id = NULL, title = NULL, description = NULL, link = NULL, sandbox = FALSE )
Arguments
idlicense id
titlelicense title
descriptiona multi-lingual list
linklicense link
sandboxUse the Zenodo sandbox infrastructure as basis to control available licenses. Default is
FALSE
Method 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().
Usage
ZenodoRecord$setLicense(licenseId, sandbox = FALSE)
Arguments
licenseIda license Id
sandboxUse the Zenodo sandbox infrastructure as basis to control available licenses. Default is
FALSE
Returns
TRUE if set, FALSE otherwise
Method setVersion()
Set record version.
Usage
ZenodoRecord$setVersion(version)
Arguments
versionthe record version to set
Method addLanguage()
Adds a language.
Usage
ZenodoRecord$addLanguage(language)
Arguments
languageISO 639-2 or 639-3 code
Method setLanguage()
Set the language
Usage
ZenodoRecord$setLanguage(language)
Arguments
languageISO 639-2 or 639-3 code
Method addRelatedIdentifier()
Adds a related identifier with a given scheme and relation type.
Usage
ZenodoRecord$addRelatedIdentifier( identifier, scheme, relation_type, resource_type = NULL )
Arguments
identifieridentifier
schemescheme among following values: ark, arxiv, bibcode, doi, ean13, eissn, handle, igsn, isbn, issn, istc, lissn, lsid, pubmed id, purl, upc, url, urn, w3id
relation_typerelation 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
resource_typeoptional resource type
Returns
TRUE if added, FALSE otherwise
Method removeRelatedIdentifier()
Removes a related identifier with a given scheme/relation_type
Usage
ZenodoRecord$removeRelatedIdentifier(identifier, scheme, relation_type)
Arguments
identifieridentifier
schemescheme among following values: ark, arxiv, bibcode, doi, ean13, eissn, handle, igsn, isbn, issn, istc, lissn, lsid, pubmed id, purl, upc, url, urn, w3id
relation_typerelation 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
Returns
TRUE if removed, FALSE otherwise
Method setReferences()
Set references
Usage
ZenodoRecord$setReferences(references)
Arguments
referencesa vector or list of references to set for the record
Method addReference()
Add a reference
Usage
ZenodoRecord$addReference(reference)
Arguments
referencethe reference to add
Returns
TRUE if added, FALSE otherwise
Method removeReference()
Remove a reference
Usage
ZenodoRecord$removeReference(reference)
Arguments
referencethe reference to remove
Returns
TRUE if removed, FALSE otherwise
Method setSubjects()
Set subjects
Usage
ZenodoRecord$setSubjects(subjects)
Arguments
subjectsa vector or list of subjects to set for the record
Method setKeywords()
Set keywords
Usage
ZenodoRecord$setKeywords(keywords)
Arguments
keywordsa vector or list of keywords to set for the record
Method addSubject()
Add a subject
Usage
ZenodoRecord$addSubject(subject)
Arguments
subjectthe subject to add
Returns
TRUE if added, FALSE otherwise
Method addKeyword()
Add a keyword
Usage
ZenodoRecord$addKeyword(keyword)
Arguments
keywordthe keyword to add
Returns
TRUE if added, FALSE otherwise
Method removeSubject()
Remove a subject
Usage
ZenodoRecord$removeSubject(subject)
Arguments
subjectthe subject to remove
Returns
TRUE if removed, FALSE otherwise
Method removeKeyword()
Remove a keyword
Usage
ZenodoRecord$removeKeyword(keyword)
Arguments
keywordthe keyword to remove
Returns
TRUE if removed, FALSE otherwise
Method setNotes()
Set notes. HTML is not allowed
Usage
ZenodoRecord$setNotes(notes)
Arguments
notesobject of class
character
Method addFunding()
Adds funding. Used internally, prefer using addGrant instead.
Usage
ZenodoRecord$addFunding(funder = NULL, grant = NULL, sandbox = FALSE)
Arguments
funderfunder id or name
grantgrant id or title
sandboxUse the Zenodo sandbox infrastructure as basis to control available grants. Default is
FALSE
Method addGrant()
Adds a grant to the record metadata.
Usage
ZenodoRecord$addGrant(grant, sandbox = FALSE)
Arguments
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
ZenodoManagerand the function$getAwards().sandboxUse the Zenodo sandbox infrastructure as basis to control available grants. Default is
FALSE
Returns
TRUE if added, FALSE otherwise
Method setGrants()
Set a vector of character strings identifying grants
Usage
ZenodoRecord$setGrants(grants, sandbox = FALSE)
Arguments
grantsa vector or list of grants Values should among known grants The list of grants can fetched with the
ZenodoManagerand the function$getAwards(). 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
Method removeGrant()
Removes a grant from the record metadata.
Usage
ZenodoRecord$removeGrant(grant)
Arguments
grantgrant to remove. The grant should be set with the Zenodo id of the grant
Returns
TRUE if removed, FALSE otherwise
Method setJournalTitle()
Set Journal title to the record metadata
Usage
ZenodoRecord$setJournalTitle(title)
Arguments
titlea title, object of class
character
Method setJournalVolume()
Set Journal volume to the record metadata
Usage
ZenodoRecord$setJournalVolume(volume)
Arguments
volumea volume
Method setJournalIssue()
Set Journal issue to the record metadata
Usage
ZenodoRecord$setJournalIssue(issue)
Arguments
issuean issue
Method setJournalPages()
Set Journal pages to the record metadata
Usage
ZenodoRecord$setJournalPages(pages)
Arguments
pagesnumber of pages
Method setConferenceTitle()
Set conference title to the record metadata
Usage
ZenodoRecord$setConferenceTitle(title)
Arguments
titleconference title, object of class
character
Method setConferenceAcronym()
Set conference acronym to the record metadata
Usage
ZenodoRecord$setConferenceAcronym(acronym)
Arguments
acronymconference acronym, object of class
character
Method setConferenceDates()
Set conference dates to the record metadata
Usage
ZenodoRecord$setConferenceDates(dates)
Arguments
datesconference dates, object of class
character
Method setConferencePlace()
Set conference place to the record metadata
Usage
ZenodoRecord$setConferencePlace(place)
Arguments
placeconference place, object of class
character
Method setConferenceUrl()
Set conference url to the record metadata
Usage
ZenodoRecord$setConferenceUrl(url)
Arguments
urlconference url, object of class
character
Method setConferenceSession()
Set conference session to the record metadata
Usage
ZenodoRecord$setConferenceSession(session)
Arguments
sessionconference session, object of class
character
Method setConferenceSessionPart()
Set conference session part to the record metadata
Usage
ZenodoRecord$setConferenceSessionPart(part)
Arguments
partconference session part, object of class
character
Method setImprintPublisher()
Set imprint publisher to the record metadata
Usage
ZenodoRecord$setImprintPublisher(publisher)
Arguments
publisherthe publisher, object of class
character
Method setImprintISBN()
Set imprint ISBN to the record metadata
Usage
ZenodoRecord$setImprintISBN(isbn)
Arguments
isbnthe ISBN, object of class
character
Method setImprintPlace()
Set imprint place to the record metadata
Usage
ZenodoRecord$setImprintPlace(place)
Arguments
placethe place, object of class
character
Method setPartofTitle()
Set title to which record is part of
Usage
ZenodoRecord$setPartofTitle(title)
Arguments
titlethe title, object of class
character
Method setPartofPages()
Set pages to which record is part of
Usage
ZenodoRecord$setPartofPages(pages)
Arguments
pagesthe pages, object of class
character
Method setThesisUniversity()
Set thesis university
Usage
ZenodoRecord$setThesisUniversity(university)
Arguments
universitythe university, object of class
character
Method addThesisSupervisor()
Adds thesis supervisor
Usage
ZenodoRecord$addThesisSupervisor( firstname, lastname, affiliation = NULL, orcid = NULL, gnd = NULL )
Arguments
firstnamesupervisor first name
lastnamesupervisor last name
affiliationsupervisor affiliation (optional)
orcidsupervisor ORCID (optional)
gndsupervisor GND (optional)
Method 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').
Usage
ZenodoRecord$removeThesisSupervisor(by, property)
Arguments
byproperty used as criterion to remove the thesis supervisor
propertyproperty value used to remove the thesis supervisor
Returns
TRUE if removed, FALSE otherwise
Method removeThesisSupervisorByName()
Removes a thesis supervisor by name.
Usage
ZenodoRecord$removeThesisSupervisorByName(name)
Arguments
namethesis supervisor name
Returns
TRUE if removed, FALSE otherwise
Method removeThesisSupervisorByAffiliation()
Removes a thesis supervisor by affiliation
Usage
ZenodoRecord$removeThesisSupervisorByAffiliation(affiliation)
Arguments
affiliationthesis supervisor affiliation
Returns
TRUE if removed, FALSE otherwise
Method removeThesisSupervisorByORCID()
Removes a thesis supervisor by ORCID
Usage
ZenodoRecord$removeThesisSupervisorByORCID(orcid)
Arguments
orcidthesis supervisor ORCID
Returns
TRUE if removed, FALSE otherwise
Method removeThesisSupervisorByGND()
Removes a thesis supervisor by GND
Usage
ZenodoRecord$removeThesisSupervisorByGND(gnd)
Arguments
gndthesis supervisor GND
Returns
TRUE if removed, FALSE otherwise
Method addLocation()
Adds a location to the record metadata.
Usage
ZenodoRecord$addLocation(place, description = NULL, lat = NULL, lon = NULL)
Arguments
placeplace (required)
descriptiondescription
latlatitude
lonlongitude
Method removeLocation()
Removes a grant from the record metadata.
Usage
ZenodoRecord$removeLocation(place)
Arguments
placeplace (required)
Returns
TRUE if removed, FALSE otherwise
Method exportAs()
Exports record to a file by format.
Usage
ZenodoRecord$exportAs(format, filename, append_format = TRUE)
Arguments
formatthe export format to use. Possibles values are: BibTeX, CSL, DataCite, DublinCore, DCAT, JSON, JSON-LD, GeoJSON, MARCXML
filenamethe target filename (without extension)
append_formatwether format name has to be appended to the filename. Default is
TRUE(for backward compatibility reasons). Set it toFALSEif you want to use only thefilename.
Returns
the writen file name (with extension)
Method exportAsBibTeX()
Exports record as BibTeX
Usage
ZenodoRecord$exportAsBibTeX(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsCSL()
Exports record as CSL
Usage
ZenodoRecord$exportAsCSL(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsDataCite()
Exports record as DataCite
Usage
ZenodoRecord$exportAsDataCite(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsDublinCore()
Exports record as DublinCore
Usage
ZenodoRecord$exportAsDublinCore(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsDCAT()
Exports record as DCAT
Usage
ZenodoRecord$exportAsDCAT(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsJSON()
Exports record as JSON
Usage
ZenodoRecord$exportAsJSON(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsJSONLD()
Exports record as JSONLD
Usage
ZenodoRecord$exportAsJSONLD(filename)
Arguments
filenamethe target filename (without extension)
Method exportAsGeoJSON()
Exports record as GeoJSON
Usage
ZenodoRecord$exportAsGeoJSON(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsMARCXML()
Exports record as MARCXML
Usage
ZenodoRecord$exportAsMARCXML(filename)
Arguments
filenamethe target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsAllFormats()
Exports record in all Zenodo record export formats. This function will create one file per Zenodo metadata formats.
Usage
ZenodoRecord$exportAsAllFormats(filename)
Arguments
filenamethe target filename (without extension)
Method listFiles()
list files attached to the record
Usage
ZenodoRecord$listFiles(pretty = TRUE)
Arguments
prettywhether a pretty output (
data.frame) should be returned (defaultTRUE), otherwise the raw list of files is returned.
Returns
the files, as data.frame or list
Method downloadFiles()
Downloads files attached to the record
Usage
ZenodoRecord$downloadFiles( path = ".", files = list(), parallel = FALSE, parallel_handler = NULL, cl = NULL, quiet = FALSE, overwrite = TRUE, timeout = 60, ... )
Arguments
pathtarget download path (by default it will be the current working directory)
files(list of) file(s) to download. If not specified, by default all files will be downloaded.
parallelwhether download has to be done in parallel using the chosen
parallel_handler. Default isFALSEparallel_handlerThe parallel handler to use eg.
mclapply. To use a different parallel handler (such as egparLapplyorparSapply), specify its function inparallel_handlerargument. For cluster-based parallel download, this is the way to proceed. In that case, the cluster should be created earlier by the user withmakeClusterand passed asclargument. After downloading all files, the cluster will be stopped automatically.clan optional cluster for cluster-based parallel handlers
quiet(default is
FALSE) can be set to suppress informative messages (not warnings).overwrite(default is
TRUE) can be set to FALSE to avoid re-downloading existing files.timeout(default is 60s) see
download.file....arguments inherited from
parallel::mclapplyor the customparallel_handlercan be added (eg.mc.coresformclapply)
Method print()
Prints a ZenodoRecord
Usage
ZenodoRecord$print(..., format = "internal", depth = 1)
Arguments
...any other parameter. Not used
formatformat to use for printing. By default,
internaluses an zen4R internal printing method. Other methods available are those supported by Zenodo for record export, and can be used only if the record has already been published (with a DOI). Attemps to print using a Zenodo export format for a record will raise a warning message and revert to "internal" formatdepthan internal depth parameter for indentation of print statements, in case of listing or recursive use of print
Method toDCEntry()
Maps to an atom4R DCEntry. Note: applies only to published records.
Usage
ZenodoRecord$toDCEntry()
Returns
an object of class DCEntry
Method getFirstDOI()
Get DOI of the first record version.
Usage
ZenodoRecord$getFirstDOI()
Returns
the first DOI, object of class character
Method getLastDOI()
Get DOI of the latest record version.
Usage
ZenodoRecord$getLastDOI()
Returns
the last DOI, object of class character
Method getVersions()
Get record versions with creation/publication date, version (ordering number) and DOI.
Usage
ZenodoRecord$getVersions()
Returns
a data.frame with the record versions
Method clone()
The objects of this class are cloneable with this method.
Usage
ZenodoRecord$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Note
Internal method. Prefer using addCreator or addContributor
Internal method. Prefer using removeCreator or removeContributor
See examples in download_zenodo utility function.
Author(s)
Emmanuel Blondel <emmanuel.blondel1@gmail.com>