Skip to content

Deserialised¤

Deserialised dataclass ¤

Deserialised(value: Any, comment: str = '')

Represents the opposite of the serialised element in an equipment register.

Parameters:

Name Type Description Default
value Any

The value of the deserialised object.

required
comment str

A comment to associate with the (de)serialised object.

''

comment class-attribute instance-attribute ¤

comment: str = ''

A comment associated with the (de)serialised object.

value instance-attribute ¤

value: Any

The value of the deserialised object. For example, an Archive object from GTC.

from_xml classmethod ¤

from_xml(element: Element[str]) -> Deserialised

Convert a serialised XML element into a Deserialised instance.

Parameters:

Name Type Description Default
element Element[str]

A serialised XML element from an equipment register.

required

Returns:

Type Description
Deserialised

The Deserialised instance.

to_xml ¤

to_xml() -> Element[str]

Convert the Deserialised class into a serialised XML element.

Returns:

Type Description
Element[str]

The serialised XML element.