Class: EMLParty

EMLParty()

EMLParty represents a single Party from the EML 2.1.1 and 2.2.0 metadata schema. This can be a person or organization.

Extends

  • Backbone.Model

Members

partyTypes :Array.<object>

Type:
  • Array.<object>
Properties:
Name Type Description
label string The name of the party category to display to the user
dataCategory string The string that is used to represent this party. This value should exactly match one of the strings listed in EMLParty typeOptions or EMLParty roleOptions.
description string An optional description to display below the label to help the user with this category.
createFromUser boolean If set to true, the information from the logged-in user will be used to create an EML party for this category if none exist already when the view loads.
limit number If the number of parties allowed for this category is not unlimited, then limit should be set to the maximum allowable number.
Since:
  • 2.21.0
Source:

Methods

getName() → {string}

getName - For an individual, returns the first and last name as a string. Otherwise, returns the organization or position name.
Since:
  • 2.15.0
Source:
Returns:
Returns the name of the party or an empty string if one cannot be found
Type
string

getUserIdArray() → {Array.<string>}

Get the userId attribute and ensure it is an array
Since:
  • 2.32.0
Source:
Returns:
- An array of userIds
Type
Array.<string>

toCSLJSON() → {object}

Return the EML Party as a CSL JSON object. See https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html#names.
Since:
  • 2.23.0
Source:
Returns:
The CSL JSON object
Type
object

validateOrcid(orcid, standardize) → {string|boolean}

Validate an ORCID string. The following formats are valid according to https://support.orcid.org/hc/en-us/articles/17697515256855-I-entered-my-ORCID-iD-in-a-form-and-it-said-it-s-invalid. - Full URL (http): http://orcid.org/0000-0000-0000-0000 - Full URL (https): https://orcid.org/0000-0000-0000-0000 - Numbers only, with hyphens: 0000-0000-0000-0000. The last character in the ORCID iD is a checksum. This checksum must be the digits 0-9 or the letter X, which represents the value 10.
Parameters:
Name Type Description
orcid string The ORCID iD to validate
standardize boolean If true, the ORCID iD will be standardized to the https://orcid.org/0000-0000-0000-0000 format.
Since:
  • 2.32.0
Source:
Returns:
- Returns false if the ORCID iD is invalid, or the string if it is valid. If standardize is true, the returned orcid will be the standardized URL.
Type
string | boolean