public class SpeciesNeoStore extends Object implements SpeciesStore, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.data.tr.neo.NeoStore |
neoStore |
protected static QName |
STORE_ID |
| Constructor and Description |
|---|
SpeciesNeoStore(String storeId) |
| 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 tree)
Adds a tree to the store.
|
long |
cardinality()
Returns the cardinality of the store.
|
protected org.gcube.data.trees.data.Tree |
cloneTree(org.gcube.data.trees.data.Tree tree,
String newId) |
void |
delete()
Deletes a store, stopping it if it has been started.
|
protected org.gcube.data.trees.data.Tree |
fromStoreToService(org.gcube.data.trees.data.Tree storeTree) |
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.
|
protected static final QName STORE_ID
protected org.gcube.data.tr.neo.NeoStore neoStore
public SpeciesNeoStore(String storeId) throws IllegalStateException
IllegalStateExceptionpublic String id()
id in interface SpeciesStorepublic File location()
location in interface SpeciesStorepublic long cardinality()
cardinality in interface SpeciesStorepublic void start(File storageLocation)
start in interface SpeciesStorestorageLocation - the locationpublic void stop()
stop in interface SpeciesStorepublic void delete()
delete in interface SpeciesStorepublic 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
get in interface SpeciesStoreid - 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 Patternpublic Iterator<org.gcube.data.trees.data.Tree> get(org.gcube.data.trees.patterns.Pattern pattern)
get in interface SpeciesStorepattern - the patternpublic org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
throws org.gcube.data.tmf.api.exceptions.InvalidTreeException
add in interface SpeciesStoreorg.gcube.data.tmf.api.exceptions.InvalidTreeException - if the tree does is invalid for addition (e.g. some of its nodes have already
identifiers)public org.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
add in interface SpeciesStoretreeStream - the stream of treesException - if the operation fails as a whole for an unexpected errorprotected org.gcube.data.trees.data.Tree fromStoreToService(org.gcube.data.trees.data.Tree storeTree)
protected org.gcube.data.trees.data.Tree cloneTree(org.gcube.data.trees.data.Tree tree,
String newId)
Copyright © 2014. All Rights Reserved.