Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

zen4R (version 0.9)

ZenodoRecord: ZenodoRecord

Description

ZenodoRecord

ZenodoRecord

Arguments

Value

Object of R6Class for modelling an ZenodoRecord

Format

R6Class object.

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super class

zen4R::zen4RLogger -> ZenodoRecord

Public fields

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

owner

record owner

record_id

record_id

state

record state

submitted

record submission status

title

record title

version

record version

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

Set the upload type (mandatory).

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

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

Usage

ZenodoRecord$setImageType(imageType)

Arguments

imageType

record publication type among the following values: 'figure','plot', 'drawing','diagram','photo', or 'other'


Method setPublicationDate()

Set the publication date.

Usage

ZenodoRecord$setPublicationDate(publicationDate)

Arguments

publicationDate

object of class Date


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

Add a creator for the record. One approach is to use the firstname and lastname arguments, that by default will be concatenated for Zenodo as lastname, firstname. For more flexibility over this, the name argument can be directly used.

Usage

ZenodoRecord$addCreator(
  firstname,
  lastname,
  name = paste(lastname, firstname, sep = ", "),
  affiliation = NULL,
  orcid = NULL,
  gnd = NULL
)

Arguments

firstname

creator first name

lastname

creator last name

name

creator name

affiliation

creator affiliation (optional)

orcid

creator ORCID (optional)

gnd

creator GND (optional)

Returns

TRUE if added, FALSE otherwise


Method removeCreator()

Removes a creator by a property. The by parameter should be the name of the creator property ('name' - in the form 'lastname, firstname', 'affiliation', 'orcid' or 'gnd').

Usage

ZenodoRecord$removeCreator(by, property)

Arguments

by

property used as criterion to remove the creator

property

property value used to remove the creator

Returns

TRUE if removed, 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 addContributor()

Add a contributor for the record. One approach is to use the firstname and lastname arguments, that by default will be concatenated for Zenodo as lastname, firstname. For more flexibility over this, the name argument can be directly used.

Usage

ZenodoRecord$addContributor(
  firstname,
  lastname,
  name = paste(lastname, firstname, sep = ", "),
  type,
  affiliation = NULL,
  orcid = NULL,
  gnd = NULL
)

Arguments

firstname

contributor first name

lastname

contributor last name

name

contributor name

type

contributor type, among values: ContactPerson, DataCollector, DataCurator, DataManager, Distributor, Editor, Funder, HostingInstitution, Producer, ProjectLeader, ProjectManager, ProjectMember, RegistrationAgency, RegistrationAuthority, RelatedPerson, Researcher, ResearchGroup, RightsHolder, Supervisor, Sponsor, WorkPackageLeader, Other.

affiliation

contributor affiliation (optional)

orcid

contributor orcid (optional)

gnd

contributor gnd (optional)

Returns

TRUE if added, FALSE otherwise


Method removeContributor()

Removes a contributor by a property. The by parameter should be the name of the contributor property ('name' - in the form 'lastname, firstname', 'affiliation', 'orcid' or 'gnd'). FALSE otherwise.

Usage

ZenodoRecord$removeContributor(by, property)

Arguments

by

property used as criterion to remove the contributor

property

property value used to remove the contributor

Returns

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