public interface MoleculeArchiveStorage
extends java.lang.AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MOLECULE_ARCHIVE_ENDING |
static java.lang.String |
MOLECULE_ARCHIVE_STORE_ENDING |
static java.lang.String |
N5_DATASET_DIRECTORY_ENDING
Directory ending for n5 datasets.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Default implementation of
AutoCloseable.close() for all
implementations that do not hold any closable resources. |
static java.util.ArrayList<java.lang.String> |
deepList(MoleculeArchiveStorage store,
java.lang.String pathName,
java.util.function.Predicate<java.lang.String> filter)
Helper method to recursively list all groups and datasets.
|
default java.lang.String[] |
deepList(java.lang.String pathName)
Recursively list all groups and datasets in the given path.
|
default java.lang.String[] |
deepList(java.lang.String pathName,
java.util.concurrent.ExecutorService executor)
Recursively list all groups (including datasets) in the given group, in
parallel, using the given
ExecutorService. |
default java.lang.String[] |
deepList(java.lang.String pathName,
java.util.function.Predicate<java.lang.String> filter)
Recursively list all groups and datasets in the given path.
|
default java.lang.String[] |
deepList(java.lang.String pathName,
java.util.function.Predicate<java.lang.String> filter,
java.util.concurrent.ExecutorService executor)
Recursively list all groups (including datasets) in the given group, in
parallel, using the given
ExecutorService. |
static void |
deepListHelper(MoleculeArchiveStorage store,
java.lang.String path,
java.util.function.Predicate<java.lang.String> filter,
java.util.concurrent.ExecutorService executor,
java.util.concurrent.LinkedBlockingQueue<java.util.concurrent.Future<java.lang.String>> datasetFutures)
Helper method for parallel deep listing.
|
boolean |
exists(java.lang.String pathName)
Test whether a group or dataset exists at a given path.
|
default java.lang.String |
getGroupSeparator()
Returns the symbol that is used to separate nodes in a group path.
|
java.lang.String |
getURI() |
default java.lang.String |
groupPath(java.lang.String... nodes)
Creates a group path by concatenating all nodes with the node separator
defined by
getGroupSeparator(). |
java.lang.String[] |
list(java.lang.String pathName)
List all groups (including datasets) in a group.
|
java.lang.String[] |
listDirectories(java.lang.String pathName)
List all groups (including datasets) in a group.
|
java.lang.String[] |
listFiles(java.lang.String pathName)
List all groups (including datasets) in a group.
|
static final java.lang.String N5_DATASET_DIRECTORY_ENDING
static final java.lang.String MOLECULE_ARCHIVE_ENDING
static final java.lang.String MOLECULE_ARCHIVE_STORE_ENDING
java.lang.String getURI()
boolean exists(java.lang.String pathName)
throws java.io.IOException
pathName - group pathjava.io.IOException - an exception is thrown if the source is not accessiblejava.lang.String[] list(java.lang.String pathName)
throws java.io.IOException
pathName - group pathjava.io.IOException - an exception is thrown if pathName is not a valid groupjava.lang.String[] listDirectories(java.lang.String pathName)
throws java.io.IOException
pathName - group pathjava.io.IOException - an exception is thrown if pathName is not a valid groupjava.lang.String[] listFiles(java.lang.String pathName)
throws java.io.IOException
pathName - group pathjava.io.IOException - an exception is thrown if pathName is not a valid groupdefault java.lang.String[] deepList(java.lang.String pathName,
java.util.function.Predicate<java.lang.String> filter)
throws java.io.IOException
pathName - base group pathfilter - filter for children to be includedjava.io.IOException - an exception is thrown if pathName is not a valid groupdefault java.lang.String[] deepList(java.lang.String pathName)
throws java.io.IOException
pathName - base group pathjava.io.IOException - an exception is thrown if pathName is not a valid groupstatic java.util.ArrayList<java.lang.String> deepList(MoleculeArchiveStorage store, java.lang.String pathName, java.util.function.Predicate<java.lang.String> filter) throws java.io.IOException
store - the MoleculeArchiveStore readerpathName - the base group pathfilter - a dataset filterjava.io.IOException - an exception is thrown if pathName is not a valid groupdefault java.lang.String[] deepList(java.lang.String pathName,
java.util.function.Predicate<java.lang.String> filter,
java.util.concurrent.ExecutorService executor)
throws java.io.IOException,
java.lang.InterruptedException,
java.util.concurrent.ExecutionException
ExecutorService. Only paths that
satisfy
the provided filter will be included, but the children of paths that were
excluded may be included (filter does not apply to the subtree).pathName - base group pathfilter - filter for children to be includedexecutor - executor servicejava.io.IOException - an exception is thrown if pathName is not a valid groupjava.util.concurrent.ExecutionException - the execution exceptionjava.lang.InterruptedException - the interrupted exceptiondefault java.lang.String[] deepList(java.lang.String pathName,
java.util.concurrent.ExecutorService executor)
throws java.io.IOException,
java.lang.InterruptedException,
java.util.concurrent.ExecutionException
ExecutorService.pathName - base group pathexecutor - executor servicejava.io.IOException - an exception is thrown if pathName is not a valid groupjava.util.concurrent.ExecutionException - the execution exceptionjava.lang.InterruptedException - this exception is thrown if execution is interruptedstatic void deepListHelper(MoleculeArchiveStorage store, java.lang.String path, java.util.function.Predicate<java.lang.String> filter, java.util.concurrent.ExecutorService executor, java.util.concurrent.LinkedBlockingQueue<java.util.concurrent.Future<java.lang.String>> datasetFutures)
store - the MoleculeArchiveStore readerpath - the base pathfilter - filter for datasets to be includedexecutor - the executor servicedatasetFutures - result futuresdefault java.lang.String getGroupSeparator()
default java.lang.String groupPath(java.lang.String... nodes)
getGroupSeparator(). The string will not have a
leading or trailing node separator symbol.nodes - a collection of child node namesdefault void close()
AutoCloseable.close() for all
implementations that do not hold any closable resources.close in interface java.lang.AutoCloseable