This class implements a Zarr HTTP store. With this class Zarr stores on web servers can be read. For Zarr v.2 HTTP stores there exists a standard for publishing arrays on the store, using consolidated metadata. This class will look for such metadata in the root of the store. If no consolidated metadata is found then a regular group or array is searched for. Note that if a group is found that there is no standard process to determine what arrays are available in the store and where they are located relative to the root. Typically such information is found in the attributes of the group and you are advised to inspect those attributes and refer to the documentation of the store publisher.
This class performs no sanity checks on any of the arguments passed to the methods, for performance reasons. Since this class should be accessed through group and array objects, it is up to that code to ensure that arguments are valid, in particular keys and prefixes.
zarr::zarr_store -> zarr_httpstore
friendlyClassName(read-only) Name of the class for printing.
root(read-only) The root of the HTTP store, identical to its URL.
uri(read-only) The URI of the store location.
separator(read-only) The default chunk separator of the store, usually a slash '/'.
new()Create an instance of this class.
HTTP stores are read-only. Currently two types of Zarr store can be accessed. A Zarr v.2 consolidated metadata file at the root of the store (immediately below the URL) can identify a hierarchy of groups and arrays. Alternatively, a store with a group or a single array, either v.2 or v.3.
zarr_httpstore$new(url)urlThe path to the HTTP store to be opened. The URL may use UTF-8 code points.
An instance of this class.
exists()Check if a key exists in the store. The key can point to a group, an array, or a metadata file. This check is only relevant for HTTP stores with consolidated metadata. In other cases the single group or array will be at the root.
zarr_httpstore$exists(key)keyCharacter string. The key that the store will be searched for.
TRUE if argument key is found, FALSE otherwise.
clear()Clearing the store is not supported.
zarr_httpstore$clear()FALSE.
erase()Removing a key from the store is not supported.
zarr_httpstore$erase(key)keyIgnored.
FALSE.
erase_prefix()Removing keys from the store is not supported.
zarr_httpstore$erase_prefix(prefix)prefixIgnored.
FALSE.
list_dir()Retrieve all keys and prefixes with a given prefix and which do not contain the character "/" after the given prefix. In other words, this retrieves all the nodes in the store below the node indicated by the prefix.
zarr_httpstore$list_dir(prefix)prefixCharacter string. The prefix whose nodes to list.
A character array with all keys found in the store immediately
below the prefix, both for groups and arrays.
list_prefix()Retrieve all keys and prefixes with a given prefix.
zarr_httpstore$list_prefix(prefix)prefixCharacter string. The prefix whose nodes to list.
A character vector with all paths found in the store below the
prefix location, both for groups and arrays.
set()Storing a (key, value) pair is not supported.
zarr_httpstore$set(key, value)keyIgnored.
valueIgnored.
Self, invisibly.
set_if_not_exists()Storing a (key, value) pair is not supported.
zarr_httpstore$set_if_not_exists(key, value)keyIgnored.
valueIgnored.
Self, invisibly.
get()Retrieve the value associated with a given key.
zarr_httpstore$get(key, prototype = NULL, byte_range = NULL)keyCharacter string. The key for which to get data.
prototypeIgnored. The only buffer type that is supported maps directly to an R raw vector.
byte_rangeIgnored. The full data value is always returned.
A raw vector with the data pointed at by the key.
get_metadata()Retrieve the metadata document of the node at the location
indicated by the prefix argument. The metadata will always be
presented to the caller in the Zarr v.3 format. Attributes, if present,
will be added.
zarr_httpstore$get_metadata(prefix)prefixThe prefix of the node whose metadata document to retrieve.
A list with the metadata, or NULL if the prefix is not pointing
to a Zarr group or array.
set_metadata()Setting metadata is not supported.
zarr_httpstore$set_metadata(prefix, metadata)prefixIgnored.
metadataIgnored.
Self, invisible
is_group()Test if path is pointing to a Zarr group.
zarr_httpstore$is_group(path)pathThe path to test.
TRUE if the path points to a Zarr group, FALSE otherwise.
create_group()Creating a new group in the store is not supported.
zarr_httpstore$create_group(path, name)path, nameIgnored.
An error indicating that the group could not be created.
create_array()Creating a new array in the store is not supported.
zarr_httpstore$create_array(parent, name, metadata)parent, name, metadataIgnored.
An error indicating that the array could not be created.