Home | Top | ← | → | Overview | Module | Class | Index | Help |
|
About |
---|
|
||||
Provides XML based read-only configuration of capabilities. This in particular comprises the priority based readout of values and defaults. The structure hereby includes specialization by subcomponents, where the missing value will be tried from the more general enclosing super component.
The access to structured data trees offers various method to access paths of nested node attributes. This comprises the creation as well as the readout.
The following equivalent creation methods are supported, where 'treenode' could be either the root node, or any subordinated branch:
treenode['subnode0']['subnode1']['subnode7'] = value # dynamic items value = treenode( 'subnode0', 'subnode1', 'subnode7', create=True, ) # dynamic items by '__call__' value = treenode.subnode0.subnode1.subnode7 # static attribute addressing style
The following equivalent readout methods are supported, where 'treenode' could be either the root node, or any subordinated branch:
value = treenode['subnode0']['subnode1']['subnode7'] # dynamic items value = treenode('subnode0', 'subnode1', 'subnode7') # dynamic items by '__call__' value = treenode.subnode0.subnode1.subnode7 # static attribute addressing style
Class Variables | |
TOsyntaxdialect = {}
|
|
Inherited from |
Method Details |
|
Validates types of own data attributes.
Returns:
|
Provides optional automatic type cast for basic atomic types and keywords by basic heuristics. For advanced generic type casts use e.g. XMLschema.
|
|
Reads a XML file. This is a simple basic method for the application on the lower layers of the software stack. It is designed for minimal dependencies. The used library is the standard xml.etree library, so in the current first release DOM based. The data is by not validated.
|
Readout the value of a node, or an attribute. The name binding of the path is provided as a tuple of path items.
|
Creates a subpath to a given node, default is from top. Reuses existing nodes, starts the creation at the first point of branch-out from the exiting tree. In general no padding of pre-required entries is done. This e.g. requires in case of a list the start with the index 0, while in case of the dict arbitrary keys could be assigned.
|
Gets the value of the path within the member 'data': self.data[key] self.data[key0][key1][key2]...
|
Superposes a JSON structure onto an existing. This is a fixed mode and strategy special case of the generic method superpose(). Implemented by recursion. The reduced parameter set provides better performance on large trees while the graph parameters still could be efficiently set by default values. The superpositioning is supported by multiple strategies defined by the parameter mode. The provided algorithm of the strategy is join, where the input data is processed on the exisiting tree by modification and creation as required.
This implements a last-wins strategy, thus in particular supports incremental load of configurations by raising priority.
|
Class Variable Details |
FROMsyntaxdialect
|
match_map
|
Home | Top | ← | → | Overview | Module | Class | Index | Help |
|
About |
---|
Copyright(C) 2019 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez | https://arnocan.wordpress.com |
Generated by Epydoc 4.0.4 / Python-3.8 / fedora27 on Wed Dec 18 13:50:09 2019 | http://epydoc.sourceforge.net |