Traversing and Modifying a Node Hierarchy
A Wiretap server uses a hierarchy of nodes to represent the directory structure of an underlying database. These workflows are related to navigating the node hierarchy and to modifying it in generic ways (copy, modify, delete). The WireTapNodeHandle
class is important in these workflows.
Viewing the Node Hierarchy of a Wiretap Server
Related C++ Sample
listChildren.C
Related Python Sample
listChildren.py
Related Command Line Tools
wiretap_get_root_node
wiretap_get_children
wiretap_print_tree
See Understanding the IFFFS Wiretap Server Node Hierarchy for the structure and description of the IFFFFS Wiretap server hierarchy.
Node Handles
The WireTapNodeHandle
class represents a node in a Wiretap server hierarchy.
The fact that a Wiretap client can manipulate objects on a Wiretap server resembles Microsoft’s Component Object Model (COM). Unlike COM objects, Wiretap node handles are not automatically updated when there is a change in the object they point to on the server. If the Wiretap client requires the latest state of an object on the server, it must update the information explicitly by calling the appropriate accessor method on the node handle.
Node IDs
Each node has a node ID. These methods give access to the node IDs of a Wiretap server:
WireTapNodeHandle.getNodeId()
– Returns aWireTapNodeId
object.WireTapNodeId.id()
– Returns a string containing the persistent ID of a node.
Responsibility of Wiretap Servers with Respect to IDs
In addition to node IDs, other Wiretap entities have IDs: servers, storage devices, and frames. Wiretap servers are responsible for ensuring the persistence and uniqueness of:
- Server IDs (network-based server identification)
- Node IDs
- Storage IDs (persistent and network-independent server identification)
- Host UUID
Wiretap servers do not guarantee the uniqueness and persistence of frame IDs.
You should not persist connection information based on the server ID: this ID can change over time, such as when the network uses DHCP. Instead, use the server ID for the first connection and get either Storage ID or Host UUID, and then use either for the following connections.
Creating Nodes
Related C++ Samples
createClip.C
createProject.C
createUser.C
Related Python Sample
createClip.py
Related Command Line Tool
wiretap_create_node
wiretap_duplicate_node
The WireTapNodeHandle
class includes a number of methods for creating nodes and clip nodes. Use WireTapNodeHandle.createNode
to create all types of nodes (except clip nodes).
Getting and Setting Node Metadata
Related C++ Sample
createProject.C
Related Command Line Tools
wiretap_get_metadata
wiretap_set_metadata
To get and set the metadata for a node, you call the getMetaData
and setMetaData
methods on the WireTapNodeHandle
object. Metadata is a stream that can be in any format (for example, XML).
wiretap_set_metadata -commit
on the parent catalog node.For more information about the metadata that can be set on a particular type of node, see:
- Getting and Setting Metadata on a Project Node
- Getting and Setting Metadata on a User Node
- Getting and Setting Clip Format Metadata
- Getting Library Metadata
- Getting Volume Metadata
- Getting Source Metadata
Deleting Nodes
Related C++ Sample
destroyNodeHierarchy.C
Related Command Line Tool
wiretap_destroy_node
To delete a node, you call the destroyNode
method on the WireTapNodeHandle
object.
Depending on the type of node, there may be some conditions on deleting a node. For more information, see: