Class: SubstanceMetadataUpdate

SubstanceMetadataUpdate(oldName, newMetadata)

Container for substance metadata updates with old and new information. Used to distinguish between inserting new substances and updating existing ones. The oldName corresponds to the key column in CSV files and identifies which existing substance should be updated.

Constructor

new SubstanceMetadataUpdate(oldName, newMetadata)

Create a new SubstanceMetadataUpdate instance.
Parameters:
Name Type Description
oldName string The name of the existing substance to update (from CSV key column)
newMetadata SubstanceMetadata The new metadata to apply
Source:

Methods

getNewMetadata() → {SubstanceMetadata}

Get the new metadata to apply to the substance.
Source:
Returns:
The new metadata object
Type
SubstanceMetadata

getOldName() → {string}

Get the old name (key) that identifies which existing substance to update.
Source:
Returns:
The old name from CSV key column
Type
string