public class ZarrV3KeyValueWriter extends ZarrV3KeyValueReader implements org.janelia.saalfeldlab.n5.CachedGsonKeyValueN5Writer
N5Writer implementation.org.janelia.saalfeldlab.n5.N5Writer.DataBlockSupplier<T>org.janelia.saalfeldlab.n5.N5Reader.VersiondatasetAttributesMap, DEFAULT_DIMENSION_SEPARATOR, dimensionSeparator, VERSION, ZARR_KEYATTRIBUTES_JSON, cacheMeta, gson, keyValueAccess, uriNO_VERSION, VERSION, VERSION_KEY| Constructor and Description |
|---|
ZarrV3KeyValueWriter(org.janelia.saalfeldlab.n5.KeyValueAccess keyValueAccess,
String basePath,
com.google.gson.GsonBuilder gsonBuilder,
boolean cacheAttributes)
Opens an
ZarrV3KeyValueWriter at a given base path with a custom
GsonBuilder to support custom attributes. |
addTypeAdapters, createDatasetAttributes, exists, getAttribute, getAttribute, getAttributes, getAttributesKey, getDimensionSeparator, getRawAttribute, getRawAttributes, getVersion, getVersion, getVersion, isAttributes, isDatasetFromAttributes, isGroupFromAttributes, isGroupFromContainer, mapAttributeKey, setDimensionSeparator, toStringcacheMeta, getCache, getGson, getKeyValueAccess, getURI, registerGsonclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitremove, writeAndCacheAttributes, writeAttributescacheMeta, datasetExists, exists, existsFromContainer, getAttribute, getAttribute, getAttributes, getAttributesFromContainer, getCache, getDatasetAttributes, groupExists, hasDatasetAttributes, isDatasetFromAttributes, isDatasetFromContainer, isGroupFromAttributes, isGroupFromContainer, list, listFromContainer, newCache, normalGetDatasetAttributesdeleteBlock, deleteChunk, deleteChunks, initializeContainer, removeAttribute, removeAttributes, writeBlock, writeChunk, writeChunks, writeRegion, writeRegiondeleteBlock, deleteChunk, remove, setVersion, writeSerializedBlockabsoluteAttributesPath, absoluteGroupPath, blockExists, getKeyValueAccess, readBlock, readChunk, readChunkscreateDatasetAttributes, getAttributesKey, getGson, listAttributesclose, deepList, deepList, deepList, deepList, deepList, deepListDatasets, deepListDatasets, deepListDatasets, deepListDatasets, deepListHelper, getGroupSeparator, getURI, getVersion, groupPath, readSerializedBlockpublic ZarrV3KeyValueWriter(org.janelia.saalfeldlab.n5.KeyValueAccess keyValueAccess, String basePath, com.google.gson.GsonBuilder gsonBuilder, boolean cacheAttributes) throws org.janelia.saalfeldlab.n5.N5Exception
ZarrV3KeyValueWriter at a given base path with a custom
GsonBuilder to support custom attributes.keyValueAccess - basePath - N5 base pathgsonBuilder - cacheAttributes - cache attributes and meta data
Setting this to true avoids frequent reading and parsing of
JSON
encoded attributes and other meta data that requires accessing
the
store. This is most interesting for high latency backends.
Changes
of cached attributes and meta data by an independent writer
will
not be tracked.org.janelia.saalfeldlab.n5.N5Exception - if the base path cannot be read or does not exist,
if the N5 version of the container is not compatible with
this
implementation.public void setVersion(String path) throws org.janelia.saalfeldlab.n5.N5Exception
setVersion in interface org.janelia.saalfeldlab.n5.CachedGsonKeyValueN5WritersetVersion in interface org.janelia.saalfeldlab.n5.GsonKeyValueN5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic void createGroup(String path)
createGroup in interface org.janelia.saalfeldlab.n5.CachedGsonKeyValueN5WritercreateGroup in interface org.janelia.saalfeldlab.n5.GsonKeyValueN5WritercreateGroup in interface org.janelia.saalfeldlab.n5.N5Writerpublic void setDatasetAttributes(String datasetPath, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes) throws org.janelia.saalfeldlab.n5.N5Exception
setDatasetAttributes in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic ZarrV3DatasetAttributes createDataset(String datasetPath, long[] dimensions, int[] blockSize, org.janelia.saalfeldlab.n5.DataType dataType, org.janelia.saalfeldlab.n5.Compression compression)
createDataset in interface org.janelia.saalfeldlab.n5.N5Writerpublic ZarrV3DatasetAttributes createDataset(String datasetPath, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes) throws org.janelia.saalfeldlab.n5.N5Exception
createDataset in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic ZarrV3DatasetAttributes getConvertedDatasetAttributes(org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes)
getConvertedDatasetAttributes in interface org.janelia.saalfeldlab.n5.N5ReadergetConvertedDatasetAttributes in class ZarrV3KeyValueReaderpublic <T> void setRawAttribute(String groupPath, String attributePath, T attribute) throws org.janelia.saalfeldlab.n5.N5Exception
public <T> void setAttribute(String groupPath, String attributePath, T attribute) throws org.janelia.saalfeldlab.n5.N5Exception
setAttribute in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic void setRawAttributes(String path, Map<String,?> attributes) throws org.janelia.saalfeldlab.n5.N5Exception
public void setRawAttributes(String path, com.google.gson.JsonElement attributes) throws org.janelia.saalfeldlab.n5.N5Exception
public void setAttributes(String path, Map<String,?> attributes) throws org.janelia.saalfeldlab.n5.N5Exception
setAttributes in interface org.janelia.saalfeldlab.n5.GsonKeyValueN5WritersetAttributes in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic void setAttributes(String path, com.google.gson.JsonElement attributes) throws org.janelia.saalfeldlab.n5.N5Exception
setAttributes in interface org.janelia.saalfeldlab.n5.GsonKeyValueN5WritersetAttributes in interface org.janelia.saalfeldlab.n5.GsonN5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic <T> T removeAttribute(String pathName, String key, Class<T> cls) throws org.janelia.saalfeldlab.n5.N5Exception
removeAttribute in interface org.janelia.saalfeldlab.n5.GsonKeyValueN5WriterremoveAttribute in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic void writeAttributes(String normalGroupPath, Map<String,?> attributes) throws org.janelia.saalfeldlab.n5.N5Exception
writeAttributes in interface org.janelia.saalfeldlab.n5.GsonKeyValueN5Writerorg.janelia.saalfeldlab.n5.N5ExceptionCopyright © 2019–2026 Saalfeld Lab. All rights reserved.