toJsonLd method
Serialize SchemaMolecularEntity to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
...super.toJsonLd(),
'@type': 'MolecularEntity',
'chemicalRole': convertToJsonLd(chemicalRole, [SchemaDefinedTerm]),
'inChI': convertToJsonLd(inChI, [String]),
'inChIKey': convertToJsonLd(inChIKey, [String]),
'iupacName': convertToJsonLd(iupacName, [String]),
'molecularFormula': convertToJsonLd(molecularFormula, [String]),
'molecularWeight':
convertToJsonLd(molecularWeight, [SchemaQuantitativeValue, String]),
'monoisotopicMolecularWeight': convertToJsonLd(
monoisotopicMolecularWeight, [SchemaQuantitativeValue, String]),
'potentialUse': convertToJsonLd(potentialUse, [SchemaDefinedTerm]),
'smiles': convertToJsonLd(smiles, [String]),
});