NekUpload.metadata.identifier module

class NekUpload.metadata.identifier.Identifier(id: str, id_type: IdentifierType)[source]

Bases: object

Metadata object describing a persistent identifier associated with a person or organisation

classmethod from_json(data: dict[str, Any]) Identifier[source]

Deserialise json object to reconstruct object

Parameters:
  • cls (Type[Identifier]) – Class

  • data (dict[str,Any]) – JSON serialised object

Raises:

ValueError – _description_

Returns:

Reconstructed object

Return type:

Identifier

get_id() str[source]

Get the ID

Returns:

ID

Return type:

str

get_id_type() IdentifierType[source]

Get the id type

Returns:

Identifier type

Return type:

IdentifierType

to_json_serialisable() dict[str, Any][source]

Method to serialise object as JSON

Returns:

JSON serialised object

Return type:

dict[str,Any]

class NekUpload.metadata.identifier.IdentifierType(*values)[source]

Bases: Enum

Enum denoting persistent identifier types

GND = 'gnd'
ISNI = 'isni'
ORCID = 'orcid'
ROR = 'ror'