xsdata.utils.classes module¶
-
class
xsdata.utils.classes.
ClassUtils
[source]¶ Bases:
object
-
INCLUDES_NONE
= 0¶
-
INCLUDES_SOME
= 1¶
-
INCLUDES_ALL
= 2¶
-
classmethod
sanitize_restrictions
(restrictions)[source]¶ - Parameters
restrictions (
Restrictions
) –
-
classmethod
sanitize_attribute_sequence
(attrs, index)[source]¶ Reset the attribute at the given index if it has no siblings with the sequential restriction.
-
classmethod
sanitize_attribute_name
(attrs, index)[source]¶ Check if the attribute at the given index has a duplicate name and prepend if exists the attribute namespace.
-
classmethod
merge_duplicate_attributes
(target)[source]¶ Flatten duplicate attributes.
Remove duplicate fields in case of attributes or enumerations otherwise convert fields to lists.
- Parameters
target (
Class
) –
-
classmethod
clone_attribute
(attr, restrictions, prefix=None)[source]¶ - Parameters
attr (
Attr
) –restrictions (
Restrictions
) –
- Return type
-
classmethod
copy_inner_classes
(source, target)[source]¶ Copy inner classes from source to target class.
Check for duplicates by name and skip if it already exists.
-
classmethod
update_abstract_classes
(classes)[source]¶ Update classes with the same qualified name to set implied abstract flags.
If a non abstract xs:element exists in the list mark the rest xs:complexType(s) as abstract.
-