Skip to contents

Class providing access to user attributes on an array or group.

Details

The Zarr Attributes class.

Public fields

store

Attributes store, already initialized.

key

The key under which the attributes will be stored.

read_only

If True, attributes cannot be modified.

cache

If True (default), attributes will be cached locally.

synchronizer

Only necessary if attributes may be modified from multiple threads or processes.

Methods


Method new()

Create a new Attributes instance.

Usage

Attributes$new(
  store,
  key = NA,
  read_only = FALSE,
  cache = TRUE,
  synchronizer = NA
)

Arguments

store

Attributes store, already initialized.

key

description key to use for attributes (.attrs is default)

read_only

logical

cache

logical

synchronizer

object

Returns

An Attributes instance.


Method to_list()

convert attributes to list

Usage

Attributes$to_list()

Returns

list


Method refresh()

refresh attributes

Usage

Attributes$refresh()

Returns

None


Method contains()

check if object contains item

Usage

Attributes$contains(x)

Arguments

x

object

Returns

logical


Method get_item()

get attribute

Usage

Attributes$get_item(item)

Arguments

item

character

Returns

item as list


Method set_item()

set attribute

Usage

Attributes$set_item(item, value)

Arguments

item

character

value

value to add or update

Returns

none


Method del_item()

delete attribute

Usage

Attributes$del_item(item)

Arguments

item

character

Returns

none


Method clone()

The objects of this class are cloneable with this method.

Usage

Attributes$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.