public class ContainerMetadataNode extends Object implements org.janelia.saalfeldlab.n5.GsonN5Writer
org.janelia.saalfeldlab.n5.N5Writer.DataBlockSupplier<T>org.janelia.saalfeldlab.n5.N5Reader.Version| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,com.google.gson.JsonElement> |
attributes |
protected Map<String,ContainerMetadataNode> |
children |
protected com.google.gson.Gson |
gson |
protected String |
path |
NO_VERSION, VERSION, VERSION_KEY| Constructor and Description |
|---|
ContainerMetadataNode() |
ContainerMetadataNode(ContainerMetadataNode other) |
ContainerMetadataNode(HashMap<String,com.google.gson.JsonElement> attributes,
Map<String,ContainerMetadataNode> children,
com.google.gson.Gson gson) |
ContainerMetadataNode(com.google.gson.JsonObject attributes,
Map<String,ContainerMetadataNode> children,
com.google.gson.Gson gson) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDatasetAttributes, getAttribute, getAttribute, getDatasetAttributes, listAttributescreateDataset, createDataset, deleteChunks, setDatasetAttributes, setVersion, writeChunks, writeSerializedBlockclose, datasetExists, deepList, deepList, deepList, deepList, deepList, deepListDatasets, deepListDatasets, deepListDatasets, deepListDatasets, deepListHelper, getConvertedDatasetAttributes, getGroupSeparator, getVersion, readChunks, readSerializedBlockprotected String path
protected HashMap<String,com.google.gson.JsonElement> attributes
protected Map<String,ContainerMetadataNode> children
protected final transient com.google.gson.Gson gson
public ContainerMetadataNode()
public ContainerMetadataNode(HashMap<String,com.google.gson.JsonElement> attributes, Map<String,ContainerMetadataNode> children, com.google.gson.Gson gson)
public ContainerMetadataNode(com.google.gson.JsonObject attributes, Map<String,ContainerMetadataNode> children, com.google.gson.Gson gson)
public ContainerMetadataNode(ContainerMetadataNode other)
public HashMap<String,com.google.gson.JsonElement> getContainerAttributes()
public com.google.gson.JsonElement getAttributes(String pathName) throws org.janelia.saalfeldlab.n5.N5Exception.N5IOException
getAttributes in interface org.janelia.saalfeldlab.n5.GsonN5Readerorg.janelia.saalfeldlab.n5.N5Exception.N5IOExceptionpublic Map<String,ContainerMetadataNode> getChildren()
public Stream<ContainerMetadataNode> getChildrenStream()
public Stream<ContainerMetadataNode> flatten()
public Stream<ContainerMetadataNode> flattenLeaves()
public void addChild(String relativepath, ContainerMetadataNode child)
public Stream<ContainerMetadataNode> pathToChild(String path)
path - full or relative pathpublic String getPath()
public void addPathsRecursive()
public void addPathsRecursive(String thisPath)
thisPath - path to a nodepublic Optional<ContainerMetadataNode> getParent(String path)
public Optional<ContainerMetadataNode> getNode(String path)
public Optional<ContainerMetadataNode> getChild(String relativePath)
public ContainerMetadataNode childRelative(String normRelativePath)
public Optional<ContainerMetadataNode> getChild(String relativePath, String groupSeparator)
public boolean exists(String pathName)
exists in interface org.janelia.saalfeldlab.n5.N5Readerpublic boolean blockExists(String pathName, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long... gridPosition) throws org.janelia.saalfeldlab.n5.N5Exception
blockExists in interface org.janelia.saalfeldlab.n5.N5Readerorg.janelia.saalfeldlab.n5.N5Exceptionpublic String[] list(String pathName) throws org.janelia.saalfeldlab.n5.N5Exception.N5IOException
list in interface org.janelia.saalfeldlab.n5.N5Readerorg.janelia.saalfeldlab.n5.N5Exception.N5IOExceptionpublic <T> void setAttribute(String pathName, String key, T attribute)
setAttribute in interface org.janelia.saalfeldlab.n5.N5Writerpublic void setAttributes(String pathName, Map<String,?> attributes)
setAttributes in interface org.janelia.saalfeldlab.n5.N5Writerpublic void setAttributes(String groupPath, com.google.gson.JsonElement attributes) throws org.janelia.saalfeldlab.n5.N5Exception
setAttributes in interface org.janelia.saalfeldlab.n5.GsonN5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic boolean removeAttribute(String pathName, String key)
removeAttribute in interface org.janelia.saalfeldlab.n5.N5Writerpublic <T> T removeAttribute(String pathName, String key, Class<T> clazz)
removeAttribute in interface org.janelia.saalfeldlab.n5.N5Writerpublic boolean removeAttributes(String pathName, List<String> attributes)
removeAttributes in interface org.janelia.saalfeldlab.n5.N5Writerpublic void createGroup(String pathName)
createGroup in interface org.janelia.saalfeldlab.n5.N5Writerpublic boolean remove(String pathName)
remove in interface org.janelia.saalfeldlab.n5.N5Writerpublic boolean remove()
remove in interface org.janelia.saalfeldlab.n5.N5Writerpublic <T> void writeChunk(String pathName, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, org.janelia.saalfeldlab.n5.DataBlock<T> dataBlock)
writeChunk in interface org.janelia.saalfeldlab.n5.N5Writerpublic <T> void writeBlock(String pathName, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, org.janelia.saalfeldlab.n5.DataBlock<T> dataBlock)
writeBlock in interface org.janelia.saalfeldlab.n5.N5Writerpublic <T> void writeRegion(String datasetPath, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long[] min, long[] size, org.janelia.saalfeldlab.n5.N5Writer.DataBlockSupplier<T> dataBlocks, boolean writeFully) throws org.janelia.saalfeldlab.n5.N5Exception
writeRegion in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic <T> void writeRegion(String datasetPath, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long[] min, long[] size, org.janelia.saalfeldlab.n5.N5Writer.DataBlockSupplier<T> dataBlocks, boolean writeFully, ExecutorService exec) throws org.janelia.saalfeldlab.n5.N5Exception, InterruptedException, ExecutionException
writeRegion in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5ExceptionInterruptedExceptionExecutionExceptionpublic boolean deleteChunk(String pathName, long... gridPosition)
deleteChunk in interface org.janelia.saalfeldlab.n5.N5Writerpublic boolean deleteChunk(String datasetPath, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long... gridPosition) throws org.janelia.saalfeldlab.n5.N5Exception
deleteChunk in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic boolean deleteBlock(String pathName, long... gridPosition)
deleteBlock in interface org.janelia.saalfeldlab.n5.N5Writerpublic boolean deleteBlock(String datasetPath, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long... gridPosition) throws org.janelia.saalfeldlab.n5.N5Exception
deleteBlock in interface org.janelia.saalfeldlab.n5.N5Writerorg.janelia.saalfeldlab.n5.N5Exceptionpublic org.janelia.saalfeldlab.n5.DataBlock<?> readChunk(String pathName, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long... gridPosition)
readChunk in interface org.janelia.saalfeldlab.n5.N5Readerpublic org.janelia.saalfeldlab.n5.DataBlock<?> readBlock(String pathName, org.janelia.saalfeldlab.n5.DatasetAttributes datasetAttributes, long... gridPosition)
readBlock in interface org.janelia.saalfeldlab.n5.N5Readerpublic static <N extends org.janelia.saalfeldlab.n5.GsonN5Reader & org.janelia.saalfeldlab.n5.N5Reader> ContainerMetadataNode build(org.janelia.saalfeldlab.n5.N5Reader n5, String dataset, com.google.gson.Gson gson)
public static ContainerMetadataNode build(org.janelia.saalfeldlab.n5.N5Reader n5, com.google.gson.Gson gson)
public static <N extends org.janelia.saalfeldlab.n5.GsonN5Reader & org.janelia.saalfeldlab.n5.N5Reader> ContainerMetadataNode buildGson(N n5, String dataset, com.google.gson.Gson gson) throws InterruptedException, ExecutionException
public static <N extends org.janelia.saalfeldlab.n5.GsonN5Reader> ContainerMetadataNode buildHelper(N n5, N5TreeNode baseNode)
public static <T extends org.janelia.saalfeldlab.n5.N5Reader> ContainerMetadataNode buildN5(T n5, String dataset, com.google.gson.Gson gson) throws InterruptedException, ExecutionException
public static ContainerMetadataNode buildHelperN5(org.janelia.saalfeldlab.n5.N5Reader n5, N5TreeNode baseNode, com.google.gson.Gson gson)
public static Optional<HashMap<String,com.google.gson.JsonElement>> getMetadataMapN5(org.janelia.saalfeldlab.n5.N5Reader n5, String dataset, com.google.gson.Gson gson)
public static Optional<com.google.gson.JsonObject> stringToJson(String s, com.google.gson.Gson gson)
public String groupPath(String... nodes)
groupPath in interface org.janelia.saalfeldlab.n5.N5Readerpublic com.google.gson.Gson getGson()
getGson in interface org.janelia.saalfeldlab.n5.GsonN5Readerpublic URI getURI()
getURI in interface org.janelia.saalfeldlab.n5.N5Readerpublic String getAttributesKey()
getAttributesKey in interface org.janelia.saalfeldlab.n5.GsonN5ReaderCopyright © 2021–2026 Saalfeld Lab. All rights reserved.