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
created
record creation date
updated
record update date
revision_id
revision id
is_draft
is draft
is_published
is published
status
record status
versions
versions
access
access policies
files
list of files associated to the record
id
record id
links
list of links associated to the record
metadata
metadata elements associated to the record
parent
parent record
pids
pids
stats
stats
Methods
Public methods
Inherited methods
Method new()
method is used to instantiate a ZenodoRecord
Usage
ZenodoRecord$new(obj = NULL, logger = "INFO")
Arguments
obj
an optional list object to create the record
logger
a 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
doi
DOI to set for the record
provider
DOI provider
client
DOI 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
access
access 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
access
access policy ('public' or 'restricted')
Method setAccessPolicyEmbargo()
Set access policy embargo options
Usage
ZenodoRecord$setAccessPolicyEmbargo(active = FALSE, until = NULL, reason = "")
Arguments
active
whether embargo is active or not. Default is
FALSE
until
embargo date, object of class
Date
. Default isNULL
. Must be provided if embargo is activereason
embargo reason, object of class
character
. Default is an empty string
Method setResourceType()
Set the resource type (mandatory).
Usage
ZenodoRecord$setResourceType(resourceType)
Arguments
resourceType
record resource type
Method setUploadType()
Set the upload type (mandatory). Deprecated since zen4R 1.0
Usage
ZenodoRecord$setUploadType(uploadType)
Arguments
uploadType
record 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
publicationType
record 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
imageType
record publication type among the following values: 'figure','plot', 'drawing','diagram','photo', or 'other'
Method setPublisher()
Set the publisher
Usage
ZenodoRecord$setPublisher(publisher)
Arguments
publisher
publisher 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
publicationDate
object of class
character
Method addDate()
Add date
Usage
ZenodoRecord$addDate(date, type, description = NULL)
Arguments
date
date
type
type of date, among following values: 'accepted', 'available', 'collected', 'copyrighted', 'created', 'issued', 'other', 'submitted', 'updated', 'valid', 'withdrawn'
description
free text, specific information about the date
Method removeDate()
Remove a date
Usage
ZenodoRecord$removeDate(date, type)
Arguments
date
the date to remove
type
the 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
title
object of class
character
Method addAdditionalTitle()
Add additional record title
Usage
ZenodoRecord$addAdditionalTitle(title, type, lang = "eng")
Arguments
title
title free text
type
type of title, among following values: alternative-title, subtitle, translated-title, other
lang
language id
Returns
TRUE
if added, FALSE
otherwise
Method removeAdditionalTitle()
Removes additional record title.
Usage
ZenodoRecord$removeAdditionalTitle(title, type, lang = "eng")
Arguments
title
title free text
type
type of title, among following values: abstract, methods, series-information, table-of-contents, technical-info, other
lang
language id
Returns
TRUE
if removed, FALSE
otherwise
Method setDescription()
Set the record description
Usage
ZenodoRecord$setDescription(description)
Arguments
description
object of class
character
Method addAdditionalDescription()
Add additional record description
Usage
ZenodoRecord$addAdditionalDescription(description, type, lang = "eng")
Arguments
description
description free text
type
type of description, among following values: abstract, methods, series-information, table-of-contents, technical-info, other
lang
language id
Returns
TRUE
if added, FALSE
otherwise
Method removeAdditionalDescription()
Removes additional record description
Usage
ZenodoRecord$removeAdditionalDescription(description, type, lang = "eng")
Arguments
description
description free text
type
type of description, among following values: abstract, methods, series-information, table-of-contents, technical-info, other
lang
language 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
firstname
person first name
lastname
person last name
name
organization name
orcid
person or organization ORCID (optional)
gnd
person or organization GND (optional)
isni
person or organization ISNI (optional)
ror
person or organization ROR (optional)
role
role, values among: contactperson, datacollector, datacurator, datamanager, distributor, editor, funder, hostinginstitution, producer, projectleader, projectmanager, projectmember, registrationagency, registrationauthority, relatedperson, researcher, researchgroup, rightsholder, supervisor, sponsor, workpackageleader, other
affiliations
person or organization affiliations (optional)
sandbox
Use the Zenodo sandbox infrastructure as basis to control available affiliations. Default is
FALSE
type
type 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
by
property used as criterion to remove the person or organization
property
property value used to remove the person or organization
type
type 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
firstname
person first name
lastname
person last name
name
organization name
orcid
creator ORCID (optional)
gnd
creator GND (optional)
isni
creator ISNI (optional)
ror
creator ROR (optional)
role
role, values among: contactperson, datacollector, datacurator, datamanager, distributor, editor, funder, hostinginstitution, producer, projectleader, projectmanager, projectmember, registrationagency, registrationauthority, relatedperson, researcher, researchgroup, rightsholder, supervisor, sponsor, workpackageleader, other
affiliations
creator affiliations (optional)
sandbox
Use 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
name
creator name
Returns
TRUE
if removed, FALSE
otherwise
Method removeCreatorByAffiliation()
Removes a creator by affiliation.
Usage
ZenodoRecord$removeCreatorByAffiliation(affiliation)
Arguments
affiliation
creator affiliation
Returns
TRUE
if removed, FALSE
otherwise
Method removeCreatorByORCID()
Removes a creator by ORCID.
Usage
ZenodoRecord$removeCreatorByORCID(orcid)
Arguments
orcid
creator ORCID
Returns
TRUE
if removed, FALSE
otherwise
Method removeCreatorByGND()
Removes a creator by GND.
Usage
ZenodoRecord$removeCreatorByGND(gnd)
Arguments
gnd
creator GND
Returns
TRUE
if removed, FALSE
otherwise
Method removeCreatorByISNI()
Removes a creator by ISNI.
Usage
ZenodoRecord$removeCreatorByISNI(isni)
Arguments
isni
creator ISNI
Returns
TRUE
if removed, FALSE
otherwise
Method removeCreatorByROR()
Removes a creator by ROR.
Usage
ZenodoRecord$removeCreatorByROR(ror)
Arguments
ror
creator 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
firstname
person first name
lastname
person last name
name
organization name
orcid
contributor ORCID (optional)
gnd
contributor GND (optional)
isni
contributor ISNI (optional)
ror
contributor ROR (optional)
role
role, values among: contactperson, datacollector, datacurator, datamanager, distributor, editor, funder, hostinginstitution, producer, projectleader, projectmanager, projectmember, registrationagency, registrationauthority, relatedperson, researcher, researchgroup, rightsholder, supervisor, sponsor, workpackageleader, other
affiliations
contributor affiliations (optional)
sandbox
Use 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
name
contributor name
Returns
TRUE
if removed, FALSE
otherwise
Method removeContributorByAffiliation()
Removes a contributor by affiliation.
Usage
ZenodoRecord$removeContributorByAffiliation(affiliation)
Arguments
affiliation
contributor affiliation
Returns
TRUE
if removed, FALSE
otherwise
Method removeContributorByORCID()
Removes a contributor by ORCID.
Usage
ZenodoRecord$removeContributorByORCID(orcid)
Arguments
orcid
contributor ORCID
Returns
TRUE
if removed, FALSE
otherwise
Method removeContributorByGND()
Removes a contributor by GND.
Usage
ZenodoRecord$removeContributorByGND(gnd)
Arguments
gnd
contributor GND
Returns
TRUE
if removed, FALSE
otherwise
Method removeContributorByISNI()
Removes a contributor by ISNI.
Usage
ZenodoRecord$removeContributorByISNI(isni)
Arguments
isni
contributor ISNI
Returns
TRUE
if removed, FALSE
otherwise
Method removeContributorByROR()
Removes a contributor by ROR.
Usage
ZenodoRecord$removeContributorByROR(ror)
Arguments
ror
contributor 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
id
license id
title
license title
description
a multi-lingual list
link
license link
sandbox
Use 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
licenseId
a license Id
sandbox
Use 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
version
the record version to set
Method addLanguage()
Adds a language.
Usage
ZenodoRecord$addLanguage(language)
Arguments
language
ISO 639-2 or 639-3 code
Method setLanguage()
Set the language
Usage
ZenodoRecord$setLanguage(language)
Arguments
language
ISO 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
identifier
identifier
scheme
scheme among following values: ark, arxiv, bibcode, doi, ean13, eissn, handle, igsn, isbn, issn, istc, lissn, lsid, pubmed id, purl, upc, url, urn, w3id
relation_type
relation 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_type
optional 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
identifier
identifier
scheme
scheme among following values: ark, arxiv, bibcode, doi, ean13, eissn, handle, igsn, isbn, issn, istc, lissn, lsid, pubmed id, purl, upc, url, urn, w3id
relation_type
relation 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
references
a vector or list of references to set for the record
Method addReference()
Add a reference
Usage
ZenodoRecord$addReference(reference)
Arguments
reference
the reference to add
Returns
TRUE
if added, FALSE
otherwise
Method removeReference()
Remove a reference
Usage
ZenodoRecord$removeReference(reference)
Arguments
reference
the reference to remove
Returns
TRUE
if removed, FALSE
otherwise
Method setSubjects()
Set subjects
Usage
ZenodoRecord$setSubjects(subjects)
Arguments
subjects
a vector or list of subjects to set for the record
Method setKeywords()
Set keywords
Usage
ZenodoRecord$setKeywords(keywords)
Arguments
keywords
a vector or list of keywords to set for the record
Method addSubject()
Add a subject
Usage
ZenodoRecord$addSubject(subject)
Arguments
subject
the subject to add
Returns
TRUE
if added, FALSE
otherwise
Method addKeyword()
Add a keyword
Usage
ZenodoRecord$addKeyword(keyword)
Arguments
keyword
the keyword to add
Returns
TRUE
if added, FALSE
otherwise
Method removeSubject()
Remove a subject
Usage
ZenodoRecord$removeSubject(subject)
Arguments
subject
the subject to remove
Returns
TRUE
if removed, FALSE
otherwise
Method removeKeyword()
Remove a keyword
Usage
ZenodoRecord$removeKeyword(keyword)
Arguments
keyword
the keyword to remove
Returns
TRUE
if removed, FALSE
otherwise
Method setNotes()
Set notes. HTML is not allowed
Usage
ZenodoRecord$setNotes(notes)
Arguments
notes
object of class
character
Method addFunding()
Adds funding. Used internally, prefer using addGrant
instead.
Usage
ZenodoRecord$addFunding(funder = NULL, grant = NULL, sandbox = FALSE)
Arguments
funder
funder id or name
grant
grant id or title
sandbox
Use 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
grant
grant 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$getAwards()
.sandbox
Use 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
grants
a vector or list of grants Values should among known grants The list of grants can fetched with the
ZenodoManager
and 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.sandbox
Use 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
grant
grant 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
title
a title, object of class
character
Method setJournalVolume()
Set Journal volume to the record metadata
Usage
ZenodoRecord$setJournalVolume(volume)
Arguments
volume
a volume
Method setJournalIssue()
Set Journal issue to the record metadata
Usage
ZenodoRecord$setJournalIssue(issue)
Arguments
issue
an issue
Method setJournalPages()
Set Journal pages to the record metadata
Usage
ZenodoRecord$setJournalPages(pages)
Arguments
pages
number of pages
Method setConferenceTitle()
Set conference title to the record metadata
Usage
ZenodoRecord$setConferenceTitle(title)
Arguments
title
conference title, object of class
character
Method setConferenceAcronym()
Set conference acronym to the record metadata
Usage
ZenodoRecord$setConferenceAcronym(acronym)
Arguments
acronym
conference acronym, object of class
character
Method setConferenceDates()
Set conference dates to the record metadata
Usage
ZenodoRecord$setConferenceDates(dates)
Arguments
dates
conference dates, object of class
character
Method setConferencePlace()
Set conference place to the record metadata
Usage
ZenodoRecord$setConferencePlace(place)
Arguments
place
conference place, object of class
character
Method setConferenceUrl()
Set conference url to the record metadata
Usage
ZenodoRecord$setConferenceUrl(url)
Arguments
url
conference url, object of class
character
Method setConferenceSession()
Set conference session to the record metadata
Usage
ZenodoRecord$setConferenceSession(session)
Arguments
session
conference session, object of class
character
Method setConferenceSessionPart()
Set conference session part to the record metadata
Usage
ZenodoRecord$setConferenceSessionPart(part)
Arguments
part
conference session part, object of class
character
Method setImprintPublisher()
Set imprint publisher to the record metadata
Usage
ZenodoRecord$setImprintPublisher(publisher)
Arguments
publisher
the publisher, object of class
character
Method setImprintISBN()
Set imprint ISBN to the record metadata
Usage
ZenodoRecord$setImprintISBN(isbn)
Arguments
isbn
the ISBN, object of class
character
Method setImprintPlace()
Set imprint place to the record metadata
Usage
ZenodoRecord$setImprintPlace(place)
Arguments
place
the place, object of class
character
Method setPartofTitle()
Set title to which record is part of
Usage
ZenodoRecord$setPartofTitle(title)
Arguments
title
the title, object of class
character
Method setPartofPages()
Set pages to which record is part of
Usage
ZenodoRecord$setPartofPages(pages)
Arguments
pages
the pages, object of class
character
Method setThesisUniversity()
Set thesis university
Usage
ZenodoRecord$setThesisUniversity(university)
Arguments
university
the university, object of class
character
Method addThesisSupervisor()
Adds thesis supervisor
Usage
ZenodoRecord$addThesisSupervisor( firstname, lastname, affiliation = NULL, orcid = NULL, gnd = NULL )
Arguments
firstname
supervisor first name
lastname
supervisor last name
affiliation
supervisor affiliation (optional)
orcid
supervisor ORCID (optional)
gnd
supervisor 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
by
property used as criterion to remove the thesis supervisor
property
property 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
name
thesis supervisor name
Returns
TRUE
if removed, FALSE
otherwise
Method removeThesisSupervisorByAffiliation()
Removes a thesis supervisor by affiliation
Usage
ZenodoRecord$removeThesisSupervisorByAffiliation(affiliation)
Arguments
affiliation
thesis supervisor affiliation
Returns
TRUE
if removed, FALSE
otherwise
Method removeThesisSupervisorByORCID()
Removes a thesis supervisor by ORCID
Usage
ZenodoRecord$removeThesisSupervisorByORCID(orcid)
Arguments
orcid
thesis supervisor ORCID
Returns
TRUE
if removed, FALSE
otherwise
Method removeThesisSupervisorByGND()
Removes a thesis supervisor by GND
Usage
ZenodoRecord$removeThesisSupervisorByGND(gnd)
Arguments
gnd
thesis 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
place
place (required)
description
description
lat
latitude
lon
longitude
Method removeLocation()
Removes a grant from the record metadata.
Usage
ZenodoRecord$removeLocation(place)
Arguments
place
place (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
format
the export format to use. Possibles values are: BibTeX, CSL, DataCite, DublinCore, DCAT, JSON, JSON-LD, GeoJSON, MARCXML
filename
the target filename (without extension)
append_format
wether format name has to be appended to the filename. Default is
TRUE
(for backward compatibility reasons). Set it toFALSE
if you want to use only thefilename
.
Returns
the writen file name (with extension)
Method exportAsBibTeX()
Exports record as BibTeX
Usage
ZenodoRecord$exportAsBibTeX(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsCSL()
Exports record as CSL
Usage
ZenodoRecord$exportAsCSL(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsDataCite()
Exports record as DataCite
Usage
ZenodoRecord$exportAsDataCite(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsDublinCore()
Exports record as DublinCore
Usage
ZenodoRecord$exportAsDublinCore(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsDCAT()
Exports record as DCAT
Usage
ZenodoRecord$exportAsDCAT(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsJSON()
Exports record as JSON
Usage
ZenodoRecord$exportAsJSON(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsJSONLD()
Exports record as JSONLD
Usage
ZenodoRecord$exportAsJSONLD(filename)
Arguments
filename
the target filename (without extension)
Method exportAsGeoJSON()
Exports record as GeoJSON
Usage
ZenodoRecord$exportAsGeoJSON(filename)
Arguments
filename
the target filename (without extension)
Returns
the writen file name (with extension)
Method exportAsMARCXML()
Exports record as MARCXML
Usage
ZenodoRecord$exportAsMARCXML(filename)
Arguments
filename
the 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
filename
the target filename (without extension)
Method listFiles()
list files attached to the record
Usage
ZenodoRecord$listFiles(pretty = TRUE)
Arguments
pretty
whether 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
path
target 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.
parallel
whether download has to be done in parallel using the chosen
parallel_handler
. Default isFALSE
parallel_handler
The parallel handler to use eg.
mclapply
. To use a different parallel handler (such as egparLapply
orparSapply
), specify its function inparallel_handler
argument. For cluster-based parallel download, this is the way to proceed. In that case, the cluster should be created earlier by the user withmakeCluster
and passed ascl
argument. After downloading all files, the cluster will be stopped automatically.cl
an 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::mclapply
or the customparallel_handler
can be added (eg.mc.cores
formclapply
)
Method print()
Prints a ZenodoRecord
Usage
ZenodoRecord$print(..., format = "internal", depth = 1)
Arguments
...
any other parameter. Not used
format
format to use for printing. By default,
internal
uses 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" formatdepth
an 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
deep
Whether 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>