Description
This class represents an item in the data record hierarchy. If you only need to access the
data record as a flat property list (adequate for many applications), ignore this object.
This class is part of the pilotpython module, which is available in the Python (on Server)
component.
class Node(builtins.object)
| Node.__init__(node,
iCtxt=None) |
| Description |
Constructor. |
| Input parameters |
param node: wrapped iNode param
ctxt: iContext
type node: iNode |
| Return value |
None |
| Node.appendChild(node) |
| Description |
Appends the node supplied as a parameter to the node's collection of
children. |
| Input parameters |
param node: Node to append type
node: Node or swigpython3.iNode |
| Return value |
None |
| Node.clear() |
| Description |
Removes all the node's children and properties. |
| Input parameters |
None |
| Return value |
None |
| Node.findChildrenByName(name) |
| Description |
Finds all child nodes with the given name. |
| Input parameters |
param name: Name to look for type
name: str |
| Return value |
returns: List of nodes
rtype: list |
| Node.findMetaData() |
| Description |
Returns the metadata of the node (if any). |
| Input parameters |
None |
| Return value |
returns: Node metadata
rtype: PropertyCollection or None |
| Node.findParent() |
| Description |
Returns the current node's parent (if any). |
| Input parameters |
None |
| Return value |
returns: None if this node has no parent, otherwise
the parent rtype: Node |
| Node.getChildAt(index) |
| Description |
Returns the child node at the given index. An exception is thrown if the index
is invalid. |
| Input parameters |
param index: Index of child node |
| Return value |
returns: Child node
rtype: Node |
| Node.getChildIndex(node) |
| Description |
Gets the index, in the node's child collection, of the node supplied as a
parameter. |
| Input parameters |
param node: Node to query type
node: Either pilotpython.Node or swigpython3.iNode |
| Return value |
returns: Index of child node
rtype: int |
| Node.getMetaData() |
| Description |
Returns the metadata of the node. If there is none, an empty PropertyCollection
is created and returned. |
| Input parameters |
None |
| Return value |
returns: Node's metadata
rtype: PropertyCollection |
| Node.getName() |
| Description |
Returns the node's name. |
| Input parameters |
None |
| Return value |
returns: name rtype:
str |
| Node.getNumberOfChildren() |
| Description |
Returns the number of children of the node. |
| Input parameters |
None |
| Return value |
returns: Number of child nodes
rtype: int |
| Node.getProperties() |
| Description |
Returns the node's property collection. |
| Input parameters |
None |
| Return value |
returns: Node property list
rtype: PropertyCollection |
| Node.getRawNode() |
| Description |
Returns the raw wrapped iNode. |
| Input parameters |
None |
| Return value |
returns: raw iNode
rtype: iNode |
| Node.getRoot() |
| Description |
Returns the root node of the hierarchy. |
| Input parameters |
None |
| Return value |
returns: root rtype:
Node |
| Node.hasChildren() |
| Description |
Returns True if the node as children, False otherwise. |
| Input parameters |
None |
| Return value |
returns: True or False
rtype: bool |
| Node.removeAllChildren() |
| Description |
Removes all the node's child nodes. |
| Input parameters |
None |
| Return value |
None |
| Node.removeChild(node) |
| Description |
Removes the node supplied as a parameter from the node's collection of
children. An exception is thrown if an invalid child node is specified. |
| Input parameters |
param node: Node to remove type
node: Node or swigpython3.iNode |
| Return value |
None |
| Node.removeChildAt(index) |
| Description |
Removes the child node at the given index. |
| Input parameters |
param index: Index of node to remove
type index: int |
| Return value |
None |
| Node.setArrayItemFlag(flag) |
| Description |
Set or unset a flag to indicate that the node is a member of an array of nodes
with the same name.This is an optional flag since multiple nodes with the same name
are always considered an array.However, when there is only one such node, setting
this flag will force it to be an array member (e.g. for output in JSON
format). |
| Input parameters |
param flag: The array membership flag.
type name: bool |
| Return value |
None |
| Node.setName(name) |
| Description |
Sets the node's name. |
| Input parameters |
param name: The name to set type
name: str |
| Return value |
None |
Data descriptors defined here
| Node.__dict__ |
| Description |
dictionary for instance variables (if defined) |
| Node.__weakref__ |
| Description |
list of weak references to the object (if defined) |