SparkseeNet
6.0.2
|
Public Member Functions | |
void | SetAttributeText (long oid, int attr, com.sparsity.sparksee.gdb.TextStream tstream) |
Sets the writable TextStream for the given text attribute and OID. | |
void | EncryptedBackup (System.String file, System.String keyInHex, System.String ivInHex) throws System.IO.IOException, System.ApplicationException |
Dumps all the data to a backup file. | |
void | DumpData (System.String file) throws System.IO.IOException, System.ApplicationException |
Dumps logical data to a file. | |
com.sparsity.sparksee.gdb.TypeList | FindTypes () |
Gets all existing Sparksee node and edge type identifiers. | |
com.sparsity.sparksee.gdb.KeyValues | TopK (int attribute, com.sparsity.sparksee.gdb.Condition operation, com.sparsity.sparksee.gdb.Value lower, com.sparsity.sparksee.gdb.Order order, int k, com.sparsity.sparksee.gdb.Objects restriction) |
Gets a KeyValues iterator as a result of the TopK operation. | |
com.sparsity.sparksee.gdb.Objects | Select (int attr, com.sparsity.sparksee.gdb.Condition cond, com.sparsity.sparksee.gdb.Value value, com.sparsity.sparksee.gdb.Objects restriction) |
Selects all OIDs satisfying the given condition for the given attribute. | |
void | RenameAttribute (int attr, System.String newName) |
Renames an attribute. | |
long | GetAttributeIntervalCount (int attr, com.sparsity.sparksee.gdb.Value lower, bool includeLower, com.sparsity.sparksee.gdb.Value higher, bool includeHigher) |
Gets how many objects have a value into the given range for the given attribute. | |
void | TailsAndHeads (com.sparsity.sparksee.gdb.Objects edges, com.sparsity.sparksee.gdb.Objects tails, com.sparsity.sparksee.gdb.Objects heads) |
Gets all the tails and heads from the given edges collection. | |
com.sparsity.sparksee.gdb.ValueArray | GetArrayAttribute (long oid, int attr) |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist. | |
long | Degree (long oid, int etype, com.sparsity.sparksee.gdb.EdgesDirection dir) |
Gets the number of edges from or to the given node OID and for the given edge type. | |
com.sparsity.sparksee.gdb.KeyValues | TopK (int attribute, com.sparsity.sparksee.gdb.Condition operation, com.sparsity.sparksee.gdb.Value lower, com.sparsity.sparksee.gdb.Value higher, com.sparsity.sparksee.gdb.Order order, int k, com.sparsity.sparksee.gdb.Objects restriction) |
Gets a KeyValues iterator as a result of the TopK operation. | |
void | RenameType (System.String oldName, System.String newName) |
Renames a type. | |
void | DumpStorage (System.String file) throws System.IO.IOException, System.ApplicationException |
Dumps internal storage data to a file. | |
com.sparsity.sparksee.gdb.Objects | Neighbors (com.sparsity.sparksee.gdb.Objects objs, int etype, com.sparsity.sparksee.gdb.EdgesDirection dir) |
Selects all neighbor nodes from or to each of the node OID in the given collection and for the given edge type. | |
com.sparsity.sparksee.gdb.ValueArray | SetArrayAttribute (long oid, int attr, com.sparsity.sparksee.gdb.Value value) |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it. | |
com.sparsity.sparksee.gdb.AttributeList | GetAttributes (long oid) |
Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID. | |
void | SetArrayAttribute (int attr, com.sparsity.sparksee.gdb.Value value) |
Sets all the values of the array of the given array attribute for all the objects of the types the attribute applies to. | |
com.sparsity.sparksee.gdb.AttributeStatistics | GetAttributeStatistics (int attr, bool basic) |
Gets statistics from the given attribute. | |
long | NewNode (int type) |
Creates a new node instance. | |
long | CountEdges () |
Gets the number of edges. | |
com.sparsity.sparksee.gdb.TextStream | GetAttributeText (long oid, int attr) |
Gets the read-only TextStream for the given text attribute and OID. | |
com.sparsity.sparksee.gdb.KeyValues | TopK (int attribute, com.sparsity.sparksee.gdb.Condition operation, com.sparsity.sparksee.gdb.Value lower, com.sparsity.sparksee.gdb.Order order, int k) |
Gets a KeyValues iterator as a result of the TopK operation. | |
com.sparsity.sparksee.gdb.TypeList | FindEdgeTypes () |
Gets all existing Sparksee edge type identifiers. | |
com.sparsity.sparksee.gdb.Objects | Select (int attr, com.sparsity.sparksee.gdb.Condition cond, com.sparsity.sparksee.gdb.Value lower, com.sparsity.sparksee.gdb.Value higher) |
Selects all OIDs satisfying the given condition for the given attribute. | |
void | IndexAttribute (int attr, com.sparsity.sparksee.gdb.AttributeKind kind) |
Updates the index of the given attribute. | |
com.sparsity.sparksee.gdb.Type | GetType (int type) |
Gets information about the given type. | |
com.sparsity.sparksee.gdb.KeyValues | TopK (int attribute, com.sparsity.sparksee.gdb.Order order, int k, com.sparsity.sparksee.gdb.Objects restriction) |
Gets a KeyValues iterator as a result of the TopK operation. | |
int | FindAttribute (int type, System.String name) |
Gets the Sparksee attribute identifier for the given type identifier and attribute name. | |
int | NewAttribute (int type, System.String name, com.sparsity.sparksee.gdb.DataType dt, com.sparsity.sparksee.gdb.AttributeKind kind) |
Creates a new attribute. | |
com.sparsity.sparksee.gdb.Objects | Edges (int etype, long tail, long head) |
Gets all the edges of the given type between two given nodes (tail and head). | |
com.sparsity.sparksee.gdb.Objects | Select (int type) |
Selects all OIDs belonging to the given type. | |
com.sparsity.sparksee.gdb.Objects | Select (int attr, com.sparsity.sparksee.gdb.Condition cond, com.sparsity.sparksee.gdb.Value value) |
Selects all OIDs satisfying the given condition for the given attribute. | |
void | IndexNeighbors (int edgeType, bool neighbors) |
Creates or destroys the neighbors index of an edge type. | |
long | FindOrCreateObject (int attr, com.sparsity.sparksee.gdb.Value value) |
Finds one object having the given Value for the attribute or it creates one does not exist any. | |
com.sparsity.sparksee.gdb.TypeList | FindNodeTypes () |
Gets all existing Sparksee node type identifiers. | |
com.sparsity.sparksee.gdb.KeyValues | TopK (int attribute, com.sparsity.sparksee.gdb.Order order, int k) |
Gets a KeyValues iterator as a result of the TopK operation. | |
com.sparsity.sparksee.gdb.Value | GetAttribute (long oid, int attr) |
Gets the Value for the given attribute and OID. | |
void | RemoveAttribute (int attr) |
Removes the given attribute. | |
void | SetAttributeDefaultValue (int attr, com.sparsity.sparksee.gdb.Value value) |
Sets a default value for an attribute. | |
void | Backup (System.String file) throws System.IO.IOException, System.ApplicationException |
Dumps all the data to a backup file. | |
int | NewSessionAttribute (int type, com.sparsity.sparksee.gdb.DataType dt, com.sparsity.sparksee.gdb.AttributeKind kind, com.sparsity.sparksee.gdb.Value defaultValue) |
Creates a new Session attribute with a default value. | |
com.sparsity.sparksee.gdb.AttributeList | FindAttributes (int type) |
Gets all existing Sparksee attribute identifiers for the given type identifier. | |
void | SetAttribute (int attr, com.sparsity.sparksee.gdb.Value value) |
Sets the value of the given attribute for all the objects of the types the attribute applies to. | |
void | GetAttribute (long oid, int attr, com.sparsity.sparksee.gdb.Value value) |
Gets the Value for the given attribute and OID. | |
long | CountNodes () |
Gets the number of nodes. | |
com.sparsity.sparksee.gdb.Objects | Neighbors (long oid, int etype, com.sparsity.sparksee.gdb.EdgesDirection dir) |
Selects all neighbor nodes from or to the given node OID and for the given edge type. | |
int | NewArrayAttribute (int type, System.String name, com.sparsity.sparksee.gdb.DataType dt, int size) |
Creates a new array attribute. | |
com.sparsity.sparksee.gdb.EdgeData | GetEdgeData (long edge) |
Gets information about an edge. | |
void | SetAttribute (long oid, int attr, com.sparsity.sparksee.gdb.Value value) |
Sets the Value for the given attribute and OID. | |
com.sparsity.sparksee.gdb.Objects | Explode (com.sparsity.sparksee.gdb.Objects objs, int etype, com.sparsity.sparksee.gdb.EdgesDirection dir) |
Selects all edges from or to each of the node OID in the given collection and for the given edge type. | |
void | SetArrayAttributeVoid (long oid, int attr, com.sparsity.sparksee.gdb.Value value) |
Sets all the elements of the ValueArray for the given array attribute and OID. | |
void | RenameType (int type, System.String newName) |
Renames a type. | |
int | NewNodeType (System.String name) |
Creates a new node type. | |
int | NewSessionAttribute (int type, com.sparsity.sparksee.gdb.DataType dt, com.sparsity.sparksee.gdb.AttributeKind kind) |
Creates a new Session attribute. | |
com.sparsity.sparksee.gdb.Objects | Tails (com.sparsity.sparksee.gdb.Objects edges) |
Gets all the tails from the given edges collection. | |
long | FindOrCreateEdge (int etype, long tail, long head) |
Gets any of the edges of the specified type between two given nodes (tail and head). | |
void | Drop (long oid) |
Drops the given OID. | |
int | NewEdgeType (System.String name, bool directed, bool neighbors) |
Creates a new edge type. | |
com.sparsity.sparksee.gdb.Objects | Heads (com.sparsity.sparksee.gdb.Objects edges) |
Gets all the heads from the given edges collection. | |
int | NewSessionArrayAttribute (int type, com.sparsity.sparksee.gdb.DataType dt, int size) |
Creates a new Session array attribute. | |
long | FindEdge (int etype, long tail, long head) |
Gets any of the edges of the given type between two given nodes (tail and head). | |
com.sparsity.sparksee.gdb.Objects | Explode (long oid, int etype, com.sparsity.sparksee.gdb.EdgesDirection dir) |
Selects all edges from or to the given node OID and for the given edge type. | |
com.sparsity.sparksee.gdb.KeyValues | TopK (int attribute, com.sparsity.sparksee.gdb.Condition operation, com.sparsity.sparksee.gdb.Value lower, com.sparsity.sparksee.gdb.Value higher, com.sparsity.sparksee.gdb.Order order, int k) |
Gets a KeyValues iterator as a result of the TopK operation. | |
long | FindObject (int attr, com.sparsity.sparksee.gdb.Value value) |
Finds one object having the given Value for the given attribute. | |
void | Drop (com.sparsity.sparksee.gdb.Objects objs) |
Drops all the OIDs from the given collection. | |
int | NewAttribute (int type, System.String name, com.sparsity.sparksee.gdb.DataType dt, com.sparsity.sparksee.gdb.AttributeKind kind, com.sparsity.sparksee.gdb.Value defaultValue) |
Creates a new attribute with a default value. | |
int | GetObjectType (long oid) |
Gets the Sparksee node or edge type identifier for the given OID. | |
com.sparsity.sparksee.gdb.Attribute | GetAttribute (int attr) |
Gets information about the given attribute. | |
void | Export (System.String file, com.sparsity.sparksee.gdb.ExportType type, com.sparsity.sparksee.gdb.ExportManager em) throws System.IO.IOException |
Exports the Graph. | |
long | NewEdge (int type, int tailAttr, com.sparsity.sparksee.gdb.Value tailV, int headAttr, com.sparsity.sparksee.gdb.Value headV) |
Creates a new edge instance. | |
com.sparsity.sparksee.gdb.Values | GetValues (int attr) |
Gets the Value collection for the given attribute. | |
long | GetEdgePeer (long edge, long node) |
Gets the other end for the given edge. | |
com.sparsity.sparksee.gdb.Objects | Select (int attr, com.sparsity.sparksee.gdb.Condition cond, com.sparsity.sparksee.gdb.Value lower, com.sparsity.sparksee.gdb.Value higher, com.sparsity.sparksee.gdb.Objects restriction) |
Selects all OIDs satisfying the given condition for the given attribute. | |
long | NewEdge (int type, long tail, long head) |
Creates a new edge instance. | |
int | FindType (System.String name) |
Gets the Sparksee type identifier for the given type name. | |
void | RemoveType (int type) |
Removes the given type. | |
int | NewRestrictedEdgeType (System.String name, int tail, int head, bool neighbors) |
Creates a new restricted edge type. | |
Graph class.
Each Database has a Graph associated, which is the persistent graph which contains all data stored into the graph database and is retrieved from a Session.
Check out the 'API' and the 'SPARKSEE graph database' sections in the SPARKSEE User Manual for more details on the use of this class.
void com.sparsity.sparksee.gdb.Graph.Backup | ( | System.String | file | ) | throws System.IO.IOException, System.ApplicationException |
Dumps all the data to a backup file.
See the Sparksee class Restore methods.
file | [in] Output backup file path. |
System.IO.IOException | If the given file cannot be created. |
System.ApplicationException | null |
long com.sparsity.sparksee.gdb.Graph.CountEdges | ( | ) |
Gets the number of edges.
long com.sparsity.sparksee.gdb.Graph.CountNodes | ( | ) |
Gets the number of nodes.
long com.sparsity.sparksee.gdb.Graph.Degree | ( | long | oid, |
int | etype, | ||
com.sparsity.sparksee.gdb.EdgesDirection | dir | ||
) |
void com.sparsity.sparksee.gdb.Graph.Drop | ( | long | oid | ) |
Drops the given OID.
It also removes its egdges as well as its attribute values.
oid | [in] Sparksee OID to be removed. |
void com.sparsity.sparksee.gdb.Graph.Drop | ( | com.sparsity.sparksee.gdb.Objects | objs | ) |
Drops all the OIDs from the given collection.
See Drop method with the single OID parameter. This performs the same operation for each object in the given set.
objs | [in] Objects collection with the OIDs to be removed. |
void com.sparsity.sparksee.gdb.Graph.DumpData | ( | System.String | file | ) | throws System.IO.IOException, System.ApplicationException |
Dumps logical data to a file.
file | [in] Output file path. |
System.IO.IOException | If the given file cannot be created. |
System.ApplicationException | null |
void com.sparsity.sparksee.gdb.Graph.DumpStorage | ( | System.String | file | ) | throws System.IO.IOException, System.ApplicationException |
Dumps internal storage data to a file.
file | [in] Output file path. |
System.IO.IOException | If the given file cannot be created. |
System.ApplicationException | null |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Edges | ( | int | etype, |
long | tail, | ||
long | head | ||
) |
void com.sparsity.sparksee.gdb.Graph.EncryptedBackup | ( | System.String | file, |
System.String | keyInHex, | ||
System.String | ivInHex | ||
) | throws System.IO.IOException, System.ApplicationException |
Dumps all the data to a backup file.
See the Sparksee class RestoreEncryptedBackup methods.
file | [in] Output backup file path. |
keyInHex | [In] The AES encryption Key as an hexadecimal string (8, 16 or 32 bytes). |
ivInHex | [In] The AES Initialization Vector as an hexadecimal string (16 bytes). |
System.IO.IOException | If the given file cannot be created. |
System.ApplicationException | null |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Explode | ( | com.sparsity.sparksee.gdb.Objects | objs, |
int | etype, | ||
com.sparsity.sparksee.gdb.EdgesDirection | dir | ||
) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Explode | ( | long | oid, |
int | etype, | ||
com.sparsity.sparksee.gdb.EdgesDirection | dir | ||
) |
void com.sparsity.sparksee.gdb.Graph.Export | ( | System.String | file, |
com.sparsity.sparksee.gdb.ExportType | type, | ||
com.sparsity.sparksee.gdb.ExportManager | em | ||
) | throws System.IO.IOException |
Exports the Graph.
file | [in] Output file. |
type | [in] Export type. |
em | [in] Defines how to do the export for each graph object. |
System.IO.IOException | null |
int com.sparsity.sparksee.gdb.Graph.FindAttribute | ( | int | type, |
System.String | name | ||
) |
Gets the Sparksee attribute identifier for the given type identifier and attribute name.
type | [in] Sparksee type identifier. |
name | [in] Unique attribute name. |
com.sparsity.sparksee.gdb.AttributeList com.sparsity.sparksee.gdb.Graph.FindAttributes | ( | int | type | ) |
long com.sparsity.sparksee.gdb.Graph.FindEdge | ( | int | etype, |
long | tail, | ||
long | head | ||
) |
Gets any of the edges of the given type between two given nodes (tail and head).
If there are more than one, then any of them will be returned. And in case there are no edge between the given tail and head, the Objects InvalidOID will be returned.
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
com.sparsity.sparksee.gdb.TypeList com.sparsity.sparksee.gdb.Graph.FindEdgeTypes | ( | ) |
com.sparsity.sparksee.gdb.TypeList com.sparsity.sparksee.gdb.Graph.FindNodeTypes | ( | ) |
long com.sparsity.sparksee.gdb.Graph.FindObject | ( | int | attr, |
com.sparsity.sparksee.gdb.Value | value | ||
) |
long com.sparsity.sparksee.gdb.Graph.FindOrCreateEdge | ( | int | etype, |
long | tail, | ||
long | head | ||
) |
Gets any of the edges of the specified type between two given nodes (tail and head).
If it can not find any edge of this type between them it tries to create a new one.
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
long com.sparsity.sparksee.gdb.Graph.FindOrCreateObject | ( | int | attr, |
com.sparsity.sparksee.gdb.Value | value | ||
) |
Finds one object having the given Value for the attribute or it creates one does not exist any.
If the attribute is a node or edge attribute and at least one node/edge with that value is found, it returns one of them. But if it does not exist, then: If it's a node attribute it will create it and set the attribute. If it's an edge attribute it will return the InvalidOID.
Using this method with a global attribute will return the InvalidOID.
int com.sparsity.sparksee.gdb.Graph.FindType | ( | System.String | name | ) |
com.sparsity.sparksee.gdb.TypeList com.sparsity.sparksee.gdb.Graph.FindTypes | ( | ) |
com.sparsity.sparksee.gdb.ValueArray com.sparsity.sparksee.gdb.Graph.GetArrayAttribute | ( | long | oid, |
int | attr | ||
) |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist.
com.sparsity.sparksee.gdb.Value com.sparsity.sparksee.gdb.Graph.GetAttribute | ( | long | oid, |
int | attr | ||
) |
Gets the Value for the given attribute and OID.
The other version of this call, where the Value is an output parameter instead of the return, is better because it allows the user to reuse an existing Value instance, whereas this call always creates a new Value instance to be returned.
It never returns NULL. Thus, in case the OID has a NULL value for the attribute it returns a NULL Value instance.
void com.sparsity.sparksee.gdb.Graph.GetAttribute | ( | long | oid, |
int | attr, | ||
com.sparsity.sparksee.gdb.Value | value | ||
) |
com.sparsity.sparksee.gdb.Attribute com.sparsity.sparksee.gdb.Graph.GetAttribute | ( | int | attr | ) |
long com.sparsity.sparksee.gdb.Graph.GetAttributeIntervalCount | ( | int | attr, |
com.sparsity.sparksee.gdb.Value | lower, | ||
bool | includeLower, | ||
com.sparsity.sparksee.gdb.Value | higher, | ||
bool | includeHigher | ||
) |
Gets how many objects have a value into the given range for the given attribute.
This only works for the attributes with the AttributeKind Indexed or Unique.
Given values must belong to the same DataType than the attribute.
attr | [in] Sparksee attribute identifier. |
lower | [in] Lower bound Value of the range. |
includeLower | [in] If TRUE, include lower bound Value of the range. |
higher | [in] Higher bound Value of the range. |
includeHigher | [in] If TRUE, include higher bound Value of the range. |
com.sparsity.sparksee.gdb.AttributeList com.sparsity.sparksee.gdb.Graph.GetAttributes | ( | long | oid | ) |
com.sparsity.sparksee.gdb.AttributeStatistics com.sparsity.sparksee.gdb.Graph.GetAttributeStatistics | ( | int | attr, |
bool | basic | ||
) |
Gets statistics from the given attribute.
The statistics can only be obtained from Indexed or Unique attributes.
attr | [in] Sparksee attribute identifier. |
basic | [in] If FALSE all statistics are computed, if TRUE just those statistics marked as basic will be computed (see description of the AttributeStatistics class). Of course, computing just basic statistics will be faster than computing all of them. |
com.sparsity.sparksee.gdb.TextStream com.sparsity.sparksee.gdb.Graph.GetAttributeText | ( | long | oid, |
int | attr | ||
) |
Gets the read-only TextStream for the given text attribute and OID.
com.sparsity.sparksee.gdb.EdgeData com.sparsity.sparksee.gdb.Graph.GetEdgeData | ( | long | edge | ) |
long com.sparsity.sparksee.gdb.Graph.GetEdgePeer | ( | long | edge, |
long | node | ||
) |
int com.sparsity.sparksee.gdb.Graph.GetObjectType | ( | long | oid | ) |
com.sparsity.sparksee.gdb.Type com.sparsity.sparksee.gdb.Graph.GetType | ( | int | type | ) |
com.sparsity.sparksee.gdb.Values com.sparsity.sparksee.gdb.Graph.GetValues | ( | int | attr | ) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Heads | ( | com.sparsity.sparksee.gdb.Objects | edges | ) |
Gets all the heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
void com.sparsity.sparksee.gdb.Graph.IndexAttribute | ( | int | attr, |
com.sparsity.sparksee.gdb.AttributeKind | kind | ||
) |
void com.sparsity.sparksee.gdb.Graph.IndexNeighbors | ( | int | edgeType, |
bool | neighbors | ||
) |
Creates or destroys the neighbors index of an edge type.
edgeType | [in] Sparksee Edge type identifier. |
neighbors | [in] If TRUE, it indexes the neighbor nodes, otherwise it removes the index. |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Neighbors | ( | com.sparsity.sparksee.gdb.Objects | objs, |
int | etype, | ||
com.sparsity.sparksee.gdb.EdgesDirection | dir | ||
) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Neighbors | ( | long | oid, |
int | etype, | ||
com.sparsity.sparksee.gdb.EdgesDirection | dir | ||
) |
int com.sparsity.sparksee.gdb.Graph.NewArrayAttribute | ( | int | type, |
System.String | name, | ||
com.sparsity.sparksee.gdb.DataType | dt, | ||
int | size | ||
) |
int com.sparsity.sparksee.gdb.Graph.NewAttribute | ( | int | type, |
System.String | name, | ||
com.sparsity.sparksee.gdb.DataType | dt, | ||
com.sparsity.sparksee.gdb.AttributeKind | kind | ||
) |
int com.sparsity.sparksee.gdb.Graph.NewAttribute | ( | int | type, |
System.String | name, | ||
com.sparsity.sparksee.gdb.DataType | dt, | ||
com.sparsity.sparksee.gdb.AttributeKind | kind, | ||
com.sparsity.sparksee.gdb.Value | defaultValue | ||
) |
Creates a new attribute with a default value.
type | [in] Sparksee node or edge type identifier. |
name | [in] Unique name for the new attribute. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
defaultValue | [in] The default value to use in each new node/edge. |
long com.sparsity.sparksee.gdb.Graph.NewEdge | ( | int | type, |
int | tailAttr, | ||
com.sparsity.sparksee.gdb.Value | tailV, | ||
int | headAttr, | ||
com.sparsity.sparksee.gdb.Value | headV | ||
) |
Creates a new edge instance.
The tail of the edge will be any node having the given tailV Value for the given tailAttr attribute identifier, and the head of the edge will be any node having the given headV Value for the given headAttr attribute identifier.
type | [in] Sparksee type identifier. |
tailAttr | [in] Sparksee attribute identifier. |
tailV | [in] Value. |
headAttr | [in] Sparksee attribute identifier. |
headV | [in] Value. |
long com.sparsity.sparksee.gdb.Graph.NewEdge | ( | int | type, |
long | tail, | ||
long | head | ||
) |
int com.sparsity.sparksee.gdb.Graph.NewEdgeType | ( | System.String | name, |
bool | directed, | ||
bool | neighbors | ||
) |
Creates a new edge type.
name | [in] Unique name for the new edge type. |
directed | [in] If TRUE, this creates a directed edge type, otherwise this creates a undirected edge type. |
neighbors | [in] If TRUE, this indexes neighbor nodes, otherwise not. |
long com.sparsity.sparksee.gdb.Graph.NewNode | ( | int | type | ) |
Creates a new node instance.
type | [in] Sparksee type identifier. |
int com.sparsity.sparksee.gdb.Graph.NewNodeType | ( | System.String | name | ) |
Creates a new node type.
name | [in] Unique name for the new node type. |
int com.sparsity.sparksee.gdb.Graph.NewRestrictedEdgeType | ( | System.String | name, |
int | tail, | ||
int | head, | ||
bool | neighbors | ||
) |
int com.sparsity.sparksee.gdb.Graph.NewSessionArrayAttribute | ( | int | type, |
com.sparsity.sparksee.gdb.DataType | dt, | ||
int | size | ||
) |
Creates a new Session array attribute.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Base Data type for the new array attribute elements. |
size | [in] The array size. |
int com.sparsity.sparksee.gdb.Graph.NewSessionAttribute | ( | int | type, |
com.sparsity.sparksee.gdb.DataType | dt, | ||
com.sparsity.sparksee.gdb.AttributeKind | kind, | ||
com.sparsity.sparksee.gdb.Value | defaultValue | ||
) |
Creates a new Session attribute with a default value.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
defaultValue | [in] The default value to use in each new node/edge. |
int com.sparsity.sparksee.gdb.Graph.NewSessionAttribute | ( | int | type, |
com.sparsity.sparksee.gdb.DataType | dt, | ||
com.sparsity.sparksee.gdb.AttributeKind | kind | ||
) |
Creates a new Session attribute.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
void com.sparsity.sparksee.gdb.Graph.RemoveAttribute | ( | int | attr | ) |
Removes the given attribute.
attr | [in] Sparksee attribute identifier. |
void com.sparsity.sparksee.gdb.Graph.RemoveType | ( | int | type | ) |
Removes the given type.
This fails if there exist attributes defined for the type or if there exist restricted edges referencing this type.
type | [in] Sparksee type identifier. |
void com.sparsity.sparksee.gdb.Graph.RenameAttribute | ( | int | attr, |
System.String | newName | ||
) |
Renames an attribute.
The new name must be available.
attr | [in] Sparksee attribute identifier. |
newName | [in] The new name for the attribute. |
void com.sparsity.sparksee.gdb.Graph.RenameType | ( | System.String | oldName, |
System.String | newName | ||
) |
Renames a type.
The new name must be available.
oldName | [in] The current name of the type to be renamed. |
newName | [in] The new name for the type. |
void com.sparsity.sparksee.gdb.Graph.RenameType | ( | int | type, |
System.String | newName | ||
) |
Renames a type.
The new name must be available.
type | [in] The type to be renamed. |
newName | [in] The new name for the type. |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Select | ( | int | attr, |
com.sparsity.sparksee.gdb.Condition | cond, | ||
com.sparsity.sparksee.gdb.Value | value, | ||
com.sparsity.sparksee.gdb.Objects | restriction | ||
) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Select | ( | int | attr, |
com.sparsity.sparksee.gdb.Condition | cond, | ||
com.sparsity.sparksee.gdb.Value | lower, | ||
com.sparsity.sparksee.gdb.Value | higher | ||
) |
Selects all OIDs satisfying the given condition for the given attribute.
This allows to perform the Between operation, thus it has two Value arguments.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. It must be the Between Condition. |
lower | [in] Lower-bound Value to be satisfied. |
higher | [in] Higher-bound Value to be satisfied. |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Select | ( | int | type | ) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Select | ( | int | attr, |
com.sparsity.sparksee.gdb.Condition | cond, | ||
com.sparsity.sparksee.gdb.Value | value | ||
) |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Select | ( | int | attr, |
com.sparsity.sparksee.gdb.Condition | cond, | ||
com.sparsity.sparksee.gdb.Value | lower, | ||
com.sparsity.sparksee.gdb.Value | higher, | ||
com.sparsity.sparksee.gdb.Objects | restriction | ||
) |
Selects all OIDs satisfying the given condition for the given attribute.
This allows to perform the Between operation, thus it has two Value arguments.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. It must be the Between Condition. |
lower | [in] Lower-bound Value to be satisfied. |
higher | [in] Higher-bound Value to be satisfied. |
restriction | [in] Objects to limit the select in this set of objects. |
com.sparsity.sparksee.gdb.ValueArray com.sparsity.sparksee.gdb.Graph.SetArrayAttribute | ( | long | oid, |
int | attr, | ||
com.sparsity.sparksee.gdb.Value | value | ||
) |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it.
Initializing the array with one of these SetArrayAttribute methods is the only way to create the array. But once created it can be updated using the ValueArray. And you can get it again with the GetArrayAttribute operation.
oid | [in] Sparksee OID. |
attr | [in] Sparksee array attribute identifier. |
value | [in] Value for all the array elements of the given attribute and OID. |
void com.sparsity.sparksee.gdb.Graph.SetArrayAttribute | ( | int | attr, |
com.sparsity.sparksee.gdb.Value | value | ||
) |
void com.sparsity.sparksee.gdb.Graph.SetArrayAttributeVoid | ( | long | oid, |
int | attr, | ||
com.sparsity.sparksee.gdb.Value | value | ||
) |
Sets all the elements of the ValueArray for the given array attribute and OID.
Initializing the array with one of these SetArrayAttribute methods is the only way to create the array. But once created it can be updated using the ValueArray which can be obtained using the GetArrayAttribute operation.
void com.sparsity.sparksee.gdb.Graph.SetAttribute | ( | int | attr, |
com.sparsity.sparksee.gdb.Value | value | ||
) |
Sets the value of the given attribute for all the objects of the types the attribute applies to.
Does not work for TEXT attribute types
txThe Transaction this operation belongs to attributeThe attribute to initialize
attr | null |
value | The value to initialize the attribute to |
void com.sparsity.sparksee.gdb.Graph.SetAttribute | ( | long | oid, |
int | attr, | ||
com.sparsity.sparksee.gdb.Value | value | ||
) |
void com.sparsity.sparksee.gdb.Graph.SetAttributeDefaultValue | ( | int | attr, |
com.sparsity.sparksee.gdb.Value | value | ||
) |
Sets a default value for an attribute.
The default value will be applied to all the new nodes or edges.
The given value must have the same DataType as the attribute or be a NULL value to remove the current default value.
attr | [in] The attribute. |
value | [in] The default value to use for this attribute. |
void com.sparsity.sparksee.gdb.Graph.SetAttributeText | ( | long | oid, |
int | attr, | ||
com.sparsity.sparksee.gdb.TextStream | tstream | ||
) |
Sets the writable TextStream for the given text attribute and OID.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
tstream | [in] New Text value. This corresponds to a TextStream to write. |
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.gdb.Graph.Tails | ( | com.sparsity.sparksee.gdb.Objects | edges | ) |
Gets all the tails from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
void com.sparsity.sparksee.gdb.Graph.TailsAndHeads | ( | com.sparsity.sparksee.gdb.Objects | edges, |
com.sparsity.sparksee.gdb.Objects | tails, | ||
com.sparsity.sparksee.gdb.Objects | heads | ||
) |
Gets all the tails and heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
tails | [in|out] If not NULL, all the tails will be stored here. |
heads | [in|out] If not NULL, all the heads will be stored here. |
com.sparsity.sparksee.gdb.KeyValues com.sparsity.sparksee.gdb.Graph.TopK | ( | int | attribute, |
com.sparsity.sparksee.gdb.Condition | operation, | ||
com.sparsity.sparksee.gdb.Value | lower, | ||
com.sparsity.sparksee.gdb.Order | order, | ||
int | k, | ||
com.sparsity.sparksee.gdb.Objects | restriction | ||
) |
Gets a KeyValues iterator as a result of the TopK operation.
restrictonObjects to limit the topk to this set of objects
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
restriction | null |
com.sparsity.sparksee.gdb.KeyValues com.sparsity.sparksee.gdb.Graph.TopK | ( | int | attribute, |
com.sparsity.sparksee.gdb.Condition | operation, | ||
com.sparsity.sparksee.gdb.Value | lower, | ||
com.sparsity.sparksee.gdb.Value | higher, | ||
com.sparsity.sparksee.gdb.Order | order, | ||
int | k, | ||
com.sparsity.sparksee.gdb.Objects | restriction | ||
) |
Gets a KeyValues iterator as a result of the TopK operation.
restrictonObjects to limit the topk to this set of objects
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
higher | The upper bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
restriction | null |
com.sparsity.sparksee.gdb.KeyValues com.sparsity.sparksee.gdb.Graph.TopK | ( | int | attribute, |
com.sparsity.sparksee.gdb.Condition | operation, | ||
com.sparsity.sparksee.gdb.Value | lower, | ||
com.sparsity.sparksee.gdb.Order | order, | ||
int | k | ||
) |
com.sparsity.sparksee.gdb.KeyValues com.sparsity.sparksee.gdb.Graph.TopK | ( | int | attribute, |
com.sparsity.sparksee.gdb.Order | order, | ||
int | k, | ||
com.sparsity.sparksee.gdb.Objects | restriction | ||
) |
com.sparsity.sparksee.gdb.KeyValues com.sparsity.sparksee.gdb.Graph.TopK | ( | int | attribute, |
com.sparsity.sparksee.gdb.Order | order, | ||
int | k | ||
) |
com.sparsity.sparksee.gdb.KeyValues com.sparsity.sparksee.gdb.Graph.TopK | ( | int | attribute, |
com.sparsity.sparksee.gdb.Condition | operation, | ||
com.sparsity.sparksee.gdb.Value | lower, | ||
com.sparsity.sparksee.gdb.Value | higher, | ||
com.sparsity.sparksee.gdb.Order | order, | ||
int | k | ||
) |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
higher | The upper bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |