Tekvel Magic
|
Namespace definition processing. More...
Public Member Functions | |
def | __init__ (self, nsd_path) |
def | get_trgops_da_names (self, str trgname) |
Get grouped Data Attribute names with a specific trigger operation. More... | |
def | get_dchg_da_names (self) |
Get Data Attribute names with dchg trigger operation. More... | |
def | get_qchg_da_names (self) |
Get Data Attribute names with qchg trigger operation. More... | |
def | get_dupd_da_names (self) |
Get Data Attribute names with dupd trigger operation. More... | |
def | get_ln_class_list (self) |
Get LN class list. More... | |
def | get_ln_name_list (self) |
DEPRECATED! Get LN class list. More... | |
def | get_do_dict_list (self, str ln_class, bool mandatory_only=False, bool optional_only=False, str condition=None) |
Get list of DOs as dictionaries by condition. More... | |
def | get_do_name_list (self, str ln_class, bool mandatory_only=False, bool optional_only=False, str condition=None) |
Get DO name list for specific LN class. More... | |
def | get_do_spec_by_path (self, str do_path) |
Get DO specification by path. More... | |
def | get_lnclass_spec (self, str lnClass) |
Get LN class specification. More... | |
def | get_cdc_spec (self, str cdcName, str variant=None) |
Get CDC specification. More... | |
def | get_constructedAttribute_spec (self, str datype) |
Get Constructed Attribute specification. More... | |
def | get_enumtype_spec (self, enumtype) |
Get Enumeration type specification. More... | |
Public Attributes | |
namespaces | |
default_namespace | |
dom | |
Namespace definition processing.
This class allows to work with namespace definition files. The class shall be initialized with nsd_path
specifing the path to specific namespace definition file.
def __init__ | ( | self, | |
nsd_path | |||
) |
def get_cdc_spec | ( | self, | |
str | cdcName, | ||
str | variant = None |
||
) |
Get CDC specification.
Retrieves the specification of a Common Data Class (CDC) by its name. If a variant is provided, it retrieves the specification for that particular variant.
cdcName | CDC name. |
variant | Optional parameter specifying the variant of the CDC. |
def get_constructedAttribute_spec | ( | self, | |
str | datype | ||
) |
Get Constructed Attribute specification.
Retrieves the specification of a Constructed Attribute by its type name.
datype | Constructed Attribute type name. |
def get_dchg_da_names | ( | self | ) |
Get Data Attribute names with dchg
trigger operation.
This function retrieves Data Attribute names grouped by functional constraints (fc
) where the dchg
trigger operation is set to true
in the NSD DOM.
def get_do_dict_list | ( | self, | |
str | ln_class, | ||
bool | mandatory_only = False , |
||
bool | optional_only = False , |
||
str | condition = None |
||
) |
Get list of DOs as dictionaries by condition.
Retrieves a list of Data Objects (DOs) for a specific Logical Node (LN) class based on the given conditions. The DOs are returned as dictionaries containing their attributes.
ln_class | The class of the Logical Node to retrieve the DOs for. |
mandatory_only | If True, only mandatory DOs are included in the list. Default is False. |
optional_only | If True, only optional DOs are included in the list. Default is False. |
condition | An optional condition string to filter the DOs. Default is None. |
def get_do_name_list | ( | self, | |
str | ln_class, | ||
bool | mandatory_only = False , |
||
bool | optional_only = False , |
||
str | condition = None |
||
) |
Get DO name list for specific LN class.
Retrieves a list of Data Object (DO) names for a specific Logical Node (LN) class based on the given conditions.
ln_class | LN class identification |
mandatory_only | Condition for mandatory only attributes to be extracted |
optional_only | Condition for optional only attributes to be extracted |
condition | Specifies a condition for extracted DOs as a string (eg. "M", "O", "Omulti", etc.) |
def get_do_spec_by_path | ( | self, | |
str | do_path | ||
) |
Get DO specification by path.
Retrieves the specification of a Data Object (DO) by its path, which includes the LN class and DO name.
do_path | Path to DO, including LN class and DO name in the following format: LNclass.DOname (e.g.: XCBR.Pos). |
Exception | Raised if the specified do_path is incorrect or if no DO with the specified name is found. |
def get_dupd_da_names | ( | self | ) |
Get Data Attribute names with dupd
trigger operation.
This function retrieves Data Attribute names grouped by functional constraints (fc
) where the dupd
trigger operation is set to true
in the NSD DOM.
def get_enumtype_spec | ( | self, | |
enumtype | |||
) |
Get Enumeration type specification.
Retrieves the specification of an Enumeration type by its name.
enumtype | Enumeration type name. |
Exception | Raised if the method is not implemented. |
def get_ln_class_list | ( | self | ) |
Get LN class list.
def get_ln_name_list | ( | self | ) |
DEPRECATED! Get LN class list.
def get_lnclass_spec | ( | self, | |
str | lnClass | ||
) |
Get LN class specification.
Retrieves the specification of a Logical Node (LN) class, which is represented by a 4-symbol string.
lnClass | LN class, a 4-symbol string. |
def get_qchg_da_names | ( | self | ) |
Get Data Attribute names with qchg
trigger operation.
This function retrieves Data Attribute names grouped by functional constraints (fc
) where the qchg
trigger operation is set to true
in the NSD DOM.
def get_trgops_da_names | ( | self, | |
str | trgname | ||
) |
Get grouped Data Attribute names with a specific trigger operation.
Retrieves names of DataAttribute
elements from the NSD DOM, grouped by their fc
(functional constraint), that are marked as true
for the specified trigger operation attribute (e.g., dchg
, qchg
, dupd
). The result is returned as a sorted list of tuples where each tuple contains the functional constraint (fc
) and a sorted list of corresponding names.
Example:
trgname | The name of the trigger operation attribute to search for (dchg , qchg , dupd ). |
fc
: Functional constraint (string)default_namespace |
dom |
namespaces |