EntitySet
class compolyx.EntitySet(graph, obj, parent=None)
Base class for entity sets.
Attributes
| Name | Description |
|---|---|
EntitySet.active | Active status of object |
EntitySet.enabled | Whether this object is currently enabled or not |
EntitySet.id | ID of object |
EntitySet.is_dict_item | Specifies whether the object is an item of a dict |
EntitySet.is_list_item | Specifies whether the object is an item of a list |
EntitySet.link_path | Root path of the current node in the tree for links to this object |
EntitySet.name | Name of object |
EntitySet.parent | Parent object in tree |
EntitySet.root_path | Root path of the current node in the tree |
EntitySet.size | Number of entities |
EntitySet.status | Status of the object |
EntitySet.status_changed | Boolean flag which is set to true in C++ when up-to-date status of object changes. |
EntitySet.uid | UID of object |
EntitySet.vertex | Throws an error if the object has been removed from the graph |
Methods
| Name | Description |
|---|---|
EntitySet.add(entity) | Add entity to the set |
EntitySet.clear() | |
EntitySet.find_parent(type) | Function steps up the tree and returns the first parent with given type |
EntitySet.obj_exists() | Checks if __obj still references the C++ object (i.e. has not been reset to None by self._delete) and exists in the graph |
EntitySet.remove(entity) | Remove entity from the set |
EntitySet.serialize_name_and_id() | Helper function to serialize name and ID |
EntitySet.update() | |
EntitySet.visit(visitor) | Walk through the tree and let the visitor perform action on every descendant node |