This class implements a Zarr node. The node is an element in the hierarchy of the Zarr object. As per the Zarr specification, the node is either a group or an array. Thus, this class is the ancestor of the zarr_group and zarr_array classes. This class manages common features such as names, key, prefixes and paths, as well as the hierarchy between nodes and the zarr_store for persistent storage.
This class should never have to be instantiated or accessed directly.
Instead, use instances of zarr_group or zarr_array. Function arguments
are largely not checked, the group and array instances should do so prior
to calling methods here. The big exception is checking the validity of node
names.
name(read-only) The name of the node.
parent(read-only) The parent of the node. For a root node this
returns NULL, otherwise this zarr_group or zarr_array instance.
store(read-only) The store of the node.
path(read-only) The path of this node, relative to the root node of the hierarchy.
prefix(read-only) The prefix of this node, relative to the root node of the hierarchy.
metadata(read-only) The metadata document of this node, a list.
attributes(read-only) Retrieve the list of attributes of this
object. Attributes can be added or modified with the set_attribute()
method or removed with the delete_attributes() method.
new()Initialize a new node in a Zarr hierarchy.
zarr_node$new(name, metadata, parent, store)nameThe name of the node.
metadataList with the metadata of the node.
parentThe parent node of this new node. May be omitted when initializing a root node.
storeThe store to persist data in. Ignored if a parent is
specified.
print_attributes()Print the metadata "attributes" to the console. Usually
called by the zarr_group and zarr_array print() methods.
zarr_node$print_attributes(...)...Arguments passed to embedded functions. Of particular interest
is width = . to specify the maximum width of the columns.
set_attribute()Add an attribute to the metadata of the object. If an
attribute name already exists, it will be overwritten.
zarr_node$set_attribute(name, value)nameThe name of the attribute. The name must begin with a letter and be composed of letters, digits, and underscores, with a maximum length of 255 characters.
valueThe value of the attribute. This can be of any supported type, including a vector or list of values. In general, an attribute should be a character value, a numeric value, a logical value, or a short vector or list of any of these.
Self, invisibly.
delete_attributes()Delete attributes. If an attribute in name is not present
this method simply returns.
zarr_node$delete_attributes(name)nameVector of names of the attributes to delete.
Self, invisibly.