lift_utils.header

Manipulate the header section.

Module Contents

Classes

FieldDefinition

Gives information about a particular field type.

FieldDefn

Gives information about a particular field type.

FieldDefns

This is a simple list of field-defn elements.

Fields

This is a simple list of field-definition elements.

Header

The header information for a LIFT file.

Range

A set of range-elements.

Range13

A set of range-elements.

RangeElement

The description of a particular range element found in a range.

RangeElement13

The description of a particular range element found in a range.

Ranges

The root element in a Lift Ranges file.

class lift_utils.header.FieldDefinition(xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

Gives information about a particular field type. It may be used by an application to add information not part of the LIFT standard.

XML_TAG = 'field'
class lift_utils.header.FieldDefn(tag: lift_utils.datatypes.Key = None, xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.Multitext

Gives information about a particular field type. It may be used by an application to add information not part of the LIFT standard.

Note

Used by LIFT v0.13 (FieldWorks) instead of FieldDefinition.

XML_TAG = 'field'
class lift_utils.header.FieldDefns(xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

This is a simple list of field-defn elements.

Note

Used by LIFT v0.13 (FieldWorks) instead of Fields.

XML_TAG = 'fields'
class lift_utils.header.Fields(xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

This is a simple list of field-definition elements.

XML_TAG
class lift_utils.header.Header(xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

The header information for a LIFT file. It includes range information and added field definitions.

Variables:
  • description (Optional[Multitext]) – Contains a multilingual description of the lexicon for information purposes only.

  • ranges (Optional[Ranges]) – Contains all the range information.

  • field_items (Optional[FieldDefns]) – Used by LIFT v0.13 (FieldWorks). Contains definitions for all the field types used in the document.

  • fields (Optional[Fields]) – Contains definitions for all the field types used in the document.

XML_TAG = 'header'
class lift_utils.header.Range(range_id: lift_utils.datatypes.Key = None, xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.Extensible

A set of range-elements. It is used to identify both the group of range-elements but also to some extent their type.

XML_TAG = 'range'
class lift_utils.header.Range13(range_id: lift_utils.datatypes.Key = None, xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

A set of range-elements. It is used to identify both the group of range-elements but also to some extent their type.

XML_TAG = 'range'
class lift_utils.header.RangeElement(elem_id: lift_utils.datatypes.Key = None, xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.Extensible

The description of a particular range element found in a range.

Note

Does not inherit from Extensible in LIFT v0.13 (FieldWorks).

XML_TAG = 'range-element'
class lift_utils.header.RangeElement13(elem_id: lift_utils.datatypes.Key = None, xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

The description of a particular range element found in a range.

XML_TAG = 'range-element'
class lift_utils.header.Ranges(xml_tree: lxml.etree._Element | None = None, **kwargs)

Bases: lift_utils.base.LIFTUtilsBase

The root element in a Lift Ranges file.

XML_TAG = 'ranges'