returns parent of the node. A Node may have several parents, the first found is returned. This method uses reverse references, a node might be missing such a link, thus we will not find its parent.
(self)
| 441 | return path |
| 442 | |
| 443 | def get_parent(self): |
| 444 | """ |
| 445 | returns parent of the node. |
| 446 | A Node may have several parents, the first found is returned. |
| 447 | This method uses reverse references, a node might be missing such a link, |
| 448 | thus we will not find its parent. |
| 449 | """ |
| 450 | refs = self.get_references(refs=ua.ObjectIds.HierarchicalReferences, direction=ua.BrowseDirection.Inverse) |
| 451 | if len(refs) > 0: |
| 452 | return Node(self.server, refs[0].NodeId) |
| 453 | else: |
| 454 | return None |
| 455 | |
| 456 | def get_child(self, path): |
| 457 | """ |