10.1.1.12.1. Objectivity

class Patro.Common.Xml.Objectivity.Attribute(py_attribute, xml_attribute=None, default=None)[source]

Bases: object

Class to define XML element attribtes

__init__(py_attribute, xml_attribute=None, default=None)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

default
classmethod from_xml(value)[source]

Convert a value from XML to Python

get_attribute(instance)[source]

Get an attribute of an XmlObjectAdaptator instance

py_attribute
py_cls_attribute

Return the private identifier used for XmlObjectAdaptator

set_attribute(instance, value)[source]

Set an attribute of an XmlObjectAdaptator instance

set_property(cls)[source]

Define a property for this attribute in XmlObjectAdaptator

classmethod to_xml(value)[source]

Convert a value from Python to XML

xml_attribute
class Patro.Common.Xml.Objectivity.BoolAttribute(py_attribute, xml_attribute=None, default=None)[source]

Bases: Patro.Common.Xml.Objectivity.Attribute

classmethod from_xml(value)[source]

Convert a value from XML to Python

classmethod to_xml(value)[source]

Convert a value from Python to XML

class Patro.Common.Xml.Objectivity.FloatAttribute(py_attribute, xml_attribute=None, default=None)[source]

Bases: Patro.Common.Xml.Objectivity.Attribute

classmethod from_xml(value)[source]

Convert a value from XML to Python

class Patro.Common.Xml.Objectivity.FloatListAttribute(py_attribute, xml_attribute=None, default=None)[source]

Bases: Patro.Common.Xml.Objectivity.Attribute

classmethod from_xml(value)[source]

Convert a value from XML to Python

classmethod to_xml(value)[source]

Convert a value from Python to XML

class Patro.Common.Xml.Objectivity.IntAttribute(py_attribute, xml_attribute=None, default=None)[source]

Bases: Patro.Common.Xml.Objectivity.Attribute

classmethod from_xml(value)[source]

Convert a value from XML to Python

class Patro.Common.Xml.Objectivity.StringAttribute(py_attribute, xml_attribute=None, default=None)[source]

Bases: Patro.Common.Xml.Objectivity.Attribute

classmethod from_xml(value)[source]

Convert a value from XML to Python

class Patro.Common.Xml.Objectivity.TextXmlObjectAdaptator(*args, **kwargs)[source]

Bases: Patro.Common.Xml.Objectivity.XmlObjectAdaptator

Class to implement an object oriented adaptor for text XML elements.

__attributes__ = []
__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

_init_from_xml(xml_element)[source]
to_xml(**kwargs)[source]

Return an etree element

class Patro.Common.Xml.Objectivity.XmlObjectAdaptator(*args, **kwargs)[source]

Bases: object

Class to implement an object oriented adaptor for XML elements.

__attributes__ = []
__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

__repr__()[source]

Return repr(self).

__tag__ = None
_init_from_kwargs(kwargs)[source]
_init_from_xml(xml_element)[source]
classmethod get_dict(instance, exclude=())[source]

Return a dict containing the attributes

to_dict(exclude=())[source]

Return a dict containing the attributes

to_xml(**kwargs)[source]

Return an etree element

to_xml_string()[source]

Return a XML string

class Patro.Common.Xml.Objectivity.XmlObjectAdaptatorMetaClass(class_name, super_classes, class_attribute_dict)[source]

Bases: type

Metaclass to collect attributes from super-classes and define a property for each attribute

__init__(class_name, super_classes, class_attribute_dict)[source]

Initialize self. See help(type(self)) for accurate signature.

_logger = <Logger Patro.Common.Xml.Objectivity.XmlObjectAdaptatorMetaClass (WARNING)>
register_from_super_class(super_classes)[source]

Collect attributes from super-classes