public interface SpeciesStore
| Modifier and Type | Method and Description |
|---|---|
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> treeStream)
Adds many trees at once to the store.
|
org.gcube.data.trees.data.Tree |
add(org.gcube.data.trees.data.Tree doc)
Adds a tree to the store.
|
long |
cardinality()
Returns the cardinality of the store.
|
void |
delete()
Deletes a store, stopping it if it has been started.
|
Iterator<org.gcube.data.trees.data.Tree> |
get(org.gcube.data.trees.patterns.Pattern pattern)
Returns all the trees in the store which match a given pattern, after pruning them with it.
|
org.gcube.data.trees.data.Tree |
get(String id,
org.gcube.data.trees.patterns.Pattern pattern)
Returns a tree in the store with a given identifier, after pruning it with a given pattern.
|
String |
id()
Returns the store identifier.
|
File |
location()
Returns the location of the store.
|
void |
start(File storageLocation)
Starts the store in a given storage location,
|
void |
stop()
Stops a started store.
|
String id()
void start(File storageLocation)
storageLocation - the locationvoid stop()
void delete()
File location()
long cardinality()
org.gcube.data.trees.data.Tree get(String id, org.gcube.data.trees.patterns.Pattern pattern) throws org.gcube.data.tmf.api.exceptions.UnknownTreeException, org.gcube.data.tmf.api.exceptions.InvalidTreeException, Exception
id - the identifierpattern - the patternorg.gcube.data.tmf.api.exceptions.UnknownTreeException - if the store does not contain a tree with the given identifierorg.gcube.data.tmf.api.exceptions.InvalidTreeException - if the Tree with the the given identifier does not match the PatternException - if the operation fails for any other errorIterator<org.gcube.data.trees.data.Tree> get(org.gcube.data.trees.patterns.Pattern pattern) throws Exception
pattern - the patternException - if the operation fails for an unexpected errororg.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree doc)
throws org.gcube.data.tmf.api.exceptions.InvalidTreeException
tree - the treeorg.gcube.data.tmf.api.exceptions.InvalidTreeException - if the tree does is invalid for addition (e.g. some of its nodes have already
identifiers)UnsupportedOperationException - if the store does not support this operationException - if the operation fails for any other reasonorg.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> add(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> treeStream)
throws Exception
treeStream - the stream of treesException - if the operation fails as a whole for an unexpected errorCopyright © 2015. All Rights Reserved.