public class ZarrUtils
extends java.lang.Object
Constructor and Description |
---|
ZarrUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDataFileName(java.lang.String filePath)
Get name of an file within a Zarr object, i.e.
|
static java.lang.String |
getObjectNameFromPath(java.lang.String filePath)
Get the name of the current Zarr object (variable or group)
Defined as the name of the current directory
|
static java.lang.String |
getParentGroupNameFromPath(java.lang.String filePath,
java.lang.String rootPath)
Get the name of the parent Group of an object
Defined as the name of the directory two level up
|
static int |
subscriptsToIndex(int[] subs,
int[] nChunks)
Converts subscripted chunk number to a flat index
|
static java.lang.String |
trimLocation(java.lang.String location)
Remove characters outside logical filepath, e.g.
|
public static int subscriptsToIndex(int[] subs, int[] nChunks)
subs
- - chunk index in each dimensionnChunks
- number of chunks per dimensionpublic static java.lang.String getDataFileName(java.lang.String filePath)
filePath
- public static java.lang.String getObjectNameFromPath(java.lang.String filePath)
filePath
- public static java.lang.String getParentGroupNameFromPath(java.lang.String filePath, java.lang.String rootPath)
filePath
- public static java.lang.String trimLocation(java.lang.String location)
location
-