ZenodoRecord: ZenodoRecord

ZenodoRecordR Documentation

ZenodoRecord

Description

ZenodoRecord

ZenodoRecord

Format

R6Class object.

Value

Object of R6Class for modelling an ZenodoRecord

Super class

zen4R::zen4RLogger -> ZenodoRecord

Public fields

access

access policies

conceptdoi

record Concept DOI (common to all record versions)

conceptrecid

record concept id

created

record creation date

doi

record doi

doi_url

record doi URL

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

modified

record modification date

owners

record owners

recid

recid

status

record status

state

record state

submitted

record submission status

revision

record revision

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 setAccessPolicyRecord()

Set the access policy for record, among values "public" (default) or "restricted"

Usage
ZenodoRecord$setAccessPolicyRecord(access = c("public", "resticted"))
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", "resticted"))
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 is NULL. Must be provided if embargo is active

reason

embargo reason, object of class character. Default is an empty string


Method 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.

Usage
ZenodoRecord$prereserveDOI(prereserve)
Arguments
prereserve

whether a DOI has to be pre-reserved by Zenodo


Method 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).

Usage
ZenodoRecord$setDOI(doi)
Arguments
doi

DOI to set for the record


Method 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.

Usage
ZenodoRecord$getConceptDOI()
Returns

the concept DOI, object of class character


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 getStats()

Get record statistics

Usage
ZenodoRecord$getStats()
Returns

statistics as data.frame


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 setEmbargoDate()

Set the embargo date.

Usage
ZenodoRecord$setEmbargoDate(embargoDate)
Arguments
embargoDate

object of class Date


Method setTitle()

Set the record title.

Usage
ZenodoRecord$setTitle(title)
Arguments
title

object of class character


Method setDescription()

Set the record description

Usage
ZenodoRecord$setDescription(description)
Arguments
description

object of class character


Method setAccessRight()

Set the access right.

Usage
ZenodoRecord$setAccessRight(accessRight)
Arguments
accessRight

record access right among the following values: 'open','embargoed', 'restricted','closed'


Method setAccessConditions()

set the access conditions.

Usage
ZenodoRecord$setAccessConditions(accessConditions)
Arguments
accessConditions

object of class character


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 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


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 relation.

Usage
ZenodoRecord$addRelatedIdentifier(relation, identifier, resource_type = NULL)
Arguments
relation

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

identifier

resource identifier

resource_type

optional 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


Method removeRelatedIdentifier()

Removes a related identifier with a given relation.

Usage
ZenodoRecord$removeRelatedIdentifier(relation, identifier)
Arguments
relation

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

identifier

resource identifier


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 setKeywords()

Set keywords

Usage
ZenodoRecord$setKeywords(keywords)
Arguments
keywords

a vector or list of keywords to set for the record


Method addKeyword()

Add a keyword

Usage
ZenodoRecord$addKeyword(keyword)
Arguments
keyword

the keyword to add

Returns

TRUE if added, FALSE otherwise


Method removeKeyword()

Remove a keyword

Usage
ZenodoRecord$removeKeyword(keyword)
Arguments
keyword

the keyword to remove

Returns

TRUE if removed, FALSE otherwise


Method addSubject()

Adds a subject given a term and identifier

Usage
ZenodoRecord$addSubject(term, identifier)
Arguments
term

subject term

identifier

subject identifier


Method removeSubject()

Removes subject(s) by a property. The by parameter should be the name of the subject property ('term' or 'identifier').

Usage
ZenodoRecord$removeSubject(by, property)
Arguments
by

property used as criterion to remove subjects

property

property value used to remove subjects

Returns

TRUE if at least one subject is removed, FALSE otherwise.


Method removeSubjectByTerm()

Removes subject(s) by term.

Usage
ZenodoRecord$removeSubjectByTerm(term)
Arguments
term

the term to use to remove subject(s)

Returns

TRUE if at least one subject is removed, FALSE otherwise.


Method removeSubjectByIdentifier()

Removes subject(s) by identifier

Usage
ZenodoRecord$removeSubjectByIdentifier(identifier)
Arguments
identifier

the identifier to use to remove subject(s)

Returns

TRUE if at least one subject is removed, FALSE otherwise.


Method setNotes()

Set notes. HTML is not allowed

Usage
ZenodoRecord$setNotes(notes)
Arguments
notes

object of class character


Method setCommunities()

Set a vector of character strings identifying communities

Usage
ZenodoRecord$setCommunities(communities, sandbox = FALSE)
Arguments
communities

a 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.

sandbox

Use the Zenodo sandbox infrastructure as basis to control available communities. Default is FALSE


Method addCommunity()

Adds a community to the record metadata.

Usage
ZenodoRecord$addCommunity(community, sandbox = FALSE)
Arguments
community

community 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().

sandbox

Use the Zenodo sandbox infrastructure as basis to control available communities. Default is FALSE

Returns

TRUE if added, FALSE otherwise


Method removeCommunity()

Removes a community from the record metadata.

Usage
ZenodoRecord$removeCommunity(community)
Arguments
community

community to remove. The community should be set with the Zenodo id of the community.

Returns

TRUE if removed, 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 $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.

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 $getGrants().

sandbox

Use the Zenodo sandbox infrastructure as basis to control available grants. Default is FALSE

Returns

TRUE if added, FALSE otherwise


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 to FALSE if you want to use only the filename.

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 (default TRUE), 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 is FALSE

parallel_handler

The parallel handler to use eg. mclapply. To use a different parallel handler (such as eg parLapply or parSapply), specify its function in parallel_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 with makeCluster and passed as cl 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 custom parallel_handler can be added (eg. mc.cores for mclapply)


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" format

depth

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 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>


eblondel/zen4R documentation built on March 26, 2024, 4:17 p.m.