mt_metadata.common.citation =========================== .. py:module:: mt_metadata.common.citation Classes ------- .. autoapisummary:: mt_metadata.common.citation.Citation Module Contents --------------- .. py:class:: Citation(**data) Bases: :py:obj:`mt_metadata.base.MetadataBase` Base class for all metadata objects with Pydantic validation. MetadataBase extends DotNotationBaseModel (which inherits from Pydantic's BaseModel) to provide automatic validation according to metadata standards. It adds functionality beyond dictionaries, supporting JSON, XML, pandas Series, and other formats for metadata interchange. .. attribute:: _skip_equals Private attribute listing fields to skip in equality comparisons :type: list[str] .. attribute:: _fields Private attribute caching field information :type: dict[str, Any] .. rubric:: Notes - All field assignments are validated automatically via Pydantic - None values are converted to appropriate defaults (empty string or 0.0) - Supports nested attribute access via dot notation - Thread-safe for read operations after initialization .. py:attribute:: doi :type: Annotated[pydantic.HttpUrl | str | None, Field(default=None, description='full url of the doi number', validation_alias=AliasChoices('doi', 'survey_doi'), json_schema_extra={'units': None, 'required': False, 'examples': ['http://doi.###']})] .. py:attribute:: authors :type: Annotated[str | None, Field(default=None, description='author names', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['M.Tee A. Roura']})] .. py:attribute:: title :type: Annotated[str | None, Field(default=None, description='Full title of the citation', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['Paper Title']})] .. py:attribute:: year :type: Annotated[str | None, Field(default=None, description='Year of citation', alias=None, pattern='^\\d{4}(-\\d{4})?$', json_schema_extra={'units': None, 'required': False, 'examples': ['2020']})] .. py:attribute:: volume :type: Annotated[str | None, Field(default=None, description='Journal volume of the citation', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['12']})] .. py:attribute:: pages :type: Annotated[str | None, Field(default=None, description='Page numbers of the citation', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['10-15']})] .. py:attribute:: journal :type: Annotated[str | None, Field(default=None, description='Journal title of citation', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['Journal of Geophysical Research']})] .. py:attribute:: url :type: Annotated[pydantic.HttpUrl | str | None, Field(default=None, description='URL of the citation', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['https://example.com/citation']})] .. py:method:: validate_doi(value) :classmethod: Validate the DOI. :param value: The DOI value to validate. :type value: str | None :param info: Additional validation information. :type info: ValidationInfo :returns: The validated DOI or None if not provided. :rtype: str | None