Source code for tdw_catalog.metadata.attachment

import tdw_catalog.metadata.field as field

from tdw_catalog.utils import MetadataFieldType


[docs]class Field(field.MetadataField[str]): """ Attach any metadata files directly to the :class:`.Dataset`. Attributes ---------- value : str The id of the attachment resource this field represents """ def __init__(self, key: str, value: str) -> None: super().__init__(key, value=value) def serialize(self) -> dict: res = super().serialize() res["value"] = self.value res["field_type"] = MetadataFieldType.FT_ATTACHMENT return res