public class NeoStore extends Object implements Store
| Constructor and Description |
|---|
NeoStore(NeoDBProvider provider,
String storeId) |
NeoStore(String storeId) |
| Modifier and Type | Method and Description |
|---|---|
void |
_start(File location) |
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)
WRITE OPERATIONS
|
long |
cardinality()
Returns the cardinality of the store.
|
org.neo4j.graphdb.GraphDatabaseService |
dbservice() |
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)
READ OPERATIONS
|
String |
id()
Returns the store identifier.
|
File |
location()
Returns the location of the store.
|
void |
start(File storageLocation)
LIFETIME OPERATIONS
|
void |
stop()
Stops a started store.
|
String |
toString() |
org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> |
update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltaStream)
Updates many trees at once in the store with the delta trees that capture their changes.
|
org.gcube.data.trees.data.Tree |
update(org.gcube.data.trees.data.Tree delta)
Updates a tree in the store with the delta tree that captures the changes.
|
public NeoStore(String storeId) throws IllegalStateException
IllegalStateExceptionpublic NeoStore(NeoDBProvider provider, String storeId) throws IllegalStateException
IllegalStateExceptionpublic File location()
Storepublic long cardinality()
Storecardinality in interface Storepublic org.neo4j.graphdb.GraphDatabaseService dbservice()
public void start(File storageLocation)
public void _start(File location)
public void delete()
public 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 Storeid - 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)
Storepublic org.gcube.data.trees.data.Tree add(org.gcube.data.trees.data.Tree tree)
throws org.gcube.data.tmf.api.exceptions.InvalidTreeException
public org.gcube.data.trees.data.Tree update(org.gcube.data.trees.data.Tree delta)
throws org.gcube.data.tmf.api.exceptions.UnknownTreeException,
org.gcube.data.tmf.api.exceptions.InvalidTreeException
Storeupdate in interface Storedelta - the delta treeorg.gcube.data.tmf.api.exceptions.UnknownTreeException - if the delta tree does not identify a tree in the storeorg.gcube.data.tmf.api.exceptions.InvalidTreeException - if the delta tree does now qualify for updatepublic 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
Storepublic org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> update(org.gcube.data.streams.Stream<org.gcube.data.trees.data.Tree> deltaStream)
throws Exception
StoreCopyright © 2018. All Rights Reserved.