NekUpload.metadata.user module
- class NekUpload.metadata.user.InvenioOrgInfo(name: str)[source]
Bases:
InvenioUserInfoHolds information about an organisation in the format expected from InvenioRDM. Effectively a model for the InvenioRDM Author as an Organisation field.
- classmethod from_json(data: dict[str, Any]) InvenioOrgInfo[source]
Deserialise json serialisable object to reconstruct an object of this class.
- Parameters:
data (Dict[str,Any]) – JSON serialisable object
- Returns:
Reconstructed object
- Return type:
- class NekUpload.metadata.user.InvenioPersonInfo(given_name: str, family_name: str)[source]
Bases:
InvenioUserInfoHolds information about a person in the format expected from InvenioRDM. Effectively a model for the InvenioRDM Author as a Person field.
- classmethod from_json(data: dict[str, Any]) InvenioPersonInfo[source]
Deserialise json serialisable object to reconstruct an object of this class.
- Parameters:
data (Dict[str,Any]) – JSON serialisable object
- Returns:
Reconstructed object
- Return type:
- class NekUpload.metadata.user.InvenioUserInfo[source]
Bases:
ABCBase abstract class describing information about a user
- add_identifier(identifier: Identifier) None[source]
Add a persistent identifier related to the user
- Parameters:
identifier (Identifier) – Object describing a unique identifier
- Raises:
ValueError – _description_
- abstractmethod classmethod from_json(data: dict[str, Any]) InvenioUserInfo[source]
Deserialise json serialisable object to reconstruct an object of this class. Factory method.
- Parameters:
data (Dict[str,Any]) – JSON serialisable object
- Returns:
Object
- Return type:
- class NekUpload.metadata.user.InvenioUserInfoFactory[source]
Bases:
object- classmethod create_from_json(json_data: dict[str, Any]) InvenioUserInfo[source]
Create suitable object from json. Note that to figure out which object to create, “type” is used as unique identifier
- Parameters:
json_data (dict[str,Any]) – JSON serialised data
- Raises:
ValueError – _description_
- Returns:
An object of this class or subclass
- Return type: