mt_metadata.transfer_functions.io.emtfxml.metadata.software
Classes
Base class for all metadata objects with Pydantic validation. |
Module Contents
- class mt_metadata.transfer_functions.io.emtfxml.metadata.software.ProcessingSoftware(**data)
Bases:
mt_metadata.common.SoftwareBase 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.
- _skip_equals
Private attribute listing fields to skip in equality comparisons
- Type:
list[str]
- _fields
Private attribute caching field information
- Type:
dict[str, Any]
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
- last_mod: Annotated[mt_metadata.common.mttime.MTime | str | float | int | numpy.datetime64 | pandas.Timestamp | None, Field(default_factory=lambda: MTime(time_stamp=None), description='Date the software was last modified', alias=None, json_schema_extra={'units': None, 'required': False, 'examples': ['2020-01-01']})]
- classmethod validate_last_mod(field_value)
- read_dict(input_dict)
Read processing software information from a dictionary.
- Parameters:
input_dict (dict) – A dictionary containing processing software information.
- to_xml(string=False, required=True)
Convert the processing software information to XML format.
- Parameters:
string (bool, optional) – If True, return the XML as a string. If False, return an ElementTree element.
required (bool, optional) – If True, include all required fields in the XML.
- Returns:
The XML representation of the processing software information.
- Return type:
str | et.Element