Graph Class Reference
[Gdb]

Graph class. More...

Inheritance diagram for Graph:

Inheritance graph
Collaboration diagram for Graph:

Collaboration graph

List of all members.

Public Member Functions

virtual ~Graph ()
 Destructor.
type_t NewNodeType (const std::wstring &name)
 Creates a new node type.
oid_t NewNode (type_t type)
 Creates a new node instance.
type_t NewEdgeType (const std::wstring &name, bool_t directed, bool_t neighbors)
 Creates a new edge type.
type_t NewRestrictedEdgeType (const std::wstring &name, type_t tail, type_t head, bool_t neighbors)
 Creates a new restricted edge type.
oid_t NewEdge (type_t type, oid_t tail, oid_t head)
 Creates a new edge instance.
oid_t NewEdge (type_t type, attr_t tailAttr, Value &tailV, attr_t headAttr, Value &headV)
 Creates a new edge instance.
int64_t CountNodes ()
 Gets the number of nodes.
int64_t CountEdges ()
 Gets the number of edges.
EdgeDataGetEdgeData (oid_t edge)
 Gets information about an edge.
oid_t GetEdgePeer (oid_t edge, oid_t node)
 Gets the other end for the given edge.
void Drop (oid_t oid)
 Drops the given OID.
void Drop (Objects *objs)
 Drops all the OIDs from the given collection.
type_t GetObjectType (oid_t oid)
 Gets the Sparksee node or edge type identifier for the given OID.
attr_t NewAttribute (type_t type, const std::wstring &name, DataType dt, AttributeKind kind)
 Creates a new attribute.
attr_t NewAttribute (type_t type, const std::wstring &name, DataType dt, AttributeKind kind, Value &defaultValue)
 Creates a new attribute with a default value.
attr_t NewSessionAttribute (type_t type, DataType dt, AttributeKind kind)
 Creates a new Session attribute.
attr_t NewSessionAttribute (type_t type, DataType dt, AttributeKind kind, Value &defaultValue)
 Creates a new Session attribute with a default value.
void SetAttributeDefaultValue (attr_t attr, Value &value)
 Sets a default value for an attribute.
void IndexAttribute (attr_t attr, AttributeKind kind)
 Updates the index of the given attribute.
void GetAttribute (oid_t oid, attr_t attr, Value &value)
 Gets the Value for the given attribute and OID.
ValueGetAttribute (oid_t oid, attr_t attr)
 Gets the Value for the given attribute and OID.
TextStreamGetAttributeText (oid_t oid, attr_t attr)
 Gets the read-only TextStream for the given text attribute and OID.
void SetAttributeText (oid_t oid, attr_t attr, TextStream *tstream)
 Sets the writable TextStream for the given text attribute and OID.
void SetAttribute (oid_t oid, attr_t attr, Value &value)
 Sets the Value for the given attribute and OID.
AttributeStatisticsGetAttributeStatistics (attr_t attr, bool_t basic)
 Gets statistics from the given attribute.
int64_t GetAttributeIntervalCount (attr_t attr, Value &lower, bool_t includeLower, Value &higher, bool_t includeHigher)
 Gets how many objects have a value into the given range for the given attribute.
type_t FindType (const std::wstring &name)
 Gets the Sparksee type identifier for the given type name.
TypeGetType (type_t type)
 Gets information about the given type.
void RemoveType (type_t type)
 Removes the given type.
void RenameType (const std::wstring &oldName, const std::wstring &newName)
 Renames a type.
void RenameType (type_t type, const std::wstring &newName)
 Renames a type.
attr_t FindAttribute (type_t type, const std::wstring &name)
 Gets the Sparksee attribute identifier for the given type identifier and attribute name.
AttributeGetAttribute (attr_t attr)
 Gets information about the given attribute.
void RemoveAttribute (attr_t attr)
 Removes the given attribute.
void RenameAttribute (attr_t attr, const std::wstring &newName)
 Renames an attribute.
oid_t FindObject (attr_t attr, Value &value)
 Finds one object having the given Value for the given attribute.
oid_t FindOrCreateObject (attr_t attr, Value &value)
 Finds one object having the given Value for the attribute or it creates one does not exist any.
ObjectsSelect (type_t type)
 Selects all OIDs belonging to the given type.
ObjectsSelect (attr_t attr, Condition cond, const Value &value)
 Selects all OIDs satisfying the given condition for the given attribute.
ObjectsSelect (attr_t attr, Condition cond, const Value &lower, const Value &higher)
 Selects all OIDs satisfying the given condition for the given attribute.
ObjectsSelect (attr_t attr, Condition cond, const Value &value, const Objects *restriction)
 Selects all OIDs satisfying the given condition for the given attribute.
ObjectsSelect (attr_t attr, Condition cond, const Value &lower, const Value &higher, const Objects *restriction)
 Selects all OIDs satisfying the given condition for the given attribute.
ObjectsExplode (oid_t oid, type_t etype, EdgesDirection dir)
 Selects all edges from or to the given node OID and for the given edge type.
ObjectsExplode (Objects *objs, type_t etype, EdgesDirection dir)
 Selects all edges from or to each of the node OID in the given collection and for the given edge type.
int64_t Degree (oid_t oid, type_t etype, EdgesDirection dir)
 Gets the number of edges from or to the given node OID and for the given edge type.
ObjectsNeighbors (oid_t oid, type_t etype, EdgesDirection dir)
 Selects all neighbor nodes from or to the given node OID and for the given edge type.
ObjectsNeighbors (Objects *objs, type_t etype, EdgesDirection dir)
 Selects all neighbor nodes from or to each of the node OID in the given collection and for the given edge type.
ObjectsEdges (type_t etype, oid_t tail, oid_t head)
 Gets all the edges of the given type between two given nodes (tail and head).
oid_t FindEdge (type_t etype, oid_t tail, oid_t head)
 Gets any of the edges of the given type between two given nodes (tail and head).
oid_t FindOrCreateEdge (type_t etype, oid_t tail, oid_t head)
 Gets any of the edges of the specified type between two given nodes (tail and head).
ObjectsTails (Objects *edges)
 Gets all the tails from the given edges collection.
ObjectsHeads (Objects *edges)
 Gets all the heads from the given edges collection.
void TailsAndHeads (Objects *edges, Objects *tails, Objects *heads)
 Gets all the tails and heads from the given edges collection.
TypeListFindNodeTypes ()
 Gets all existing Sparksee node type identifiers.
TypeListFindEdgeTypes ()
 Gets all existing Sparksee edge type identifiers.
TypeListFindTypes ()
 Gets all existing Sparksee node and edge type identifiers.
AttributeListFindAttributes (type_t type)
 Gets all existing Sparksee attribute identifiers for the given type identifier.
AttributeListGetAttributes (oid_t oid)
 Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID.
ValuesGetValues (attr_t attr)
 Gets the Value collection for the given attribute.
void DumpData (const std::wstring &file) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error)
 Dumps logical data to a file.
void DumpStorage (const std::wstring &file) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error)
 Dumps internal storage data to a file.
void Export (const std::wstring &file, ExportType type, ExportManager *em) throw (sparksee::gdb::IOException)
 Exports the Graph.
void Backup (const std::wstring &file) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error)
 Dumps all the data to a backup file.

Friends

class Session
class Values
class ValuesIterator


Detailed Description

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.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Member Function Documentation

type_t Graph::NewNodeType ( const std::wstring &  name  ) 

Creates a new node type.

Parameters:
name [in] Unique name for the new node type.
Returns:
Unique Sparksee type identifier.

oid_t Graph::NewNode ( type_t  type  ) 

Creates a new node instance.

Parameters:
type [in] Sparksee type identifier.
Returns:
Unique OID of the new node instance.

type_t Graph::NewEdgeType ( const std::wstring &  name,
bool_t  directed,
bool_t  neighbors 
)

Creates a new edge type.

Parameters:
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.
Returns:
Unique Sparksee type identifier.

type_t Graph::NewRestrictedEdgeType ( const std::wstring &  name,
type_t  tail,
type_t  head,
bool_t  neighbors 
)

Creates a new restricted edge type.

Parameters:
name [in] Unique name for the new edge type.
tail [in] Tail Sparksee node type identifier.
head [in] Head Sparksee node type identifier.
neighbors [in] If TRUE, this indexes neighbor nodes, otherwise not.
Returns:
Unique Sparksee type identifier.

oid_t Graph::NewEdge ( type_t  type,
oid_t  tail,
oid_t  head 
)

Creates a new edge instance.

Parameters:
type [in] Sparksee type identifier.
tail [in] Source Sparksee OID.
head [in] Target Sparksee OID.
Returns:
Unique OID of the new edge instance.

oid_t Graph::NewEdge ( type_t  type,
attr_t  tailAttr,
Value tailV,
attr_t  headAttr,
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.

Parameters:
type [in] Sparksee type identifier.
tailAttr [in] Sparksee attribute identifier.
tailV [in] Value.
headAttr [in] Sparksee attribute identifier.
headV [in] Value.
Returns:
Unique OID of the new edge instance.

int64_t Graph::CountNodes (  ) 

Gets the number of nodes.

Returns:
The number of nodes.

int64_t Graph::CountEdges (  ) 

Gets the number of edges.

Returns:
The number of edges.

EdgeData* Graph::GetEdgeData ( oid_t  edge  ) 

Gets information about an edge.

Parameters:
edge [in] Sparksee edge identifier.
Returns:
An EdgeData instance.

oid_t Graph::GetEdgePeer ( oid_t  edge,
oid_t  node 
)

Gets the other end for the given edge.

Parameters:
edge [in] Sparksee edge identifier.
node [in] Sparksee node identifier. It must be one of the ends of the edge.
Returns:
The other end of the edge.

void Graph::Drop ( oid_t  oid  ) 

Drops the given OID.

It also removes its egdges as well as its attribute values.

Parameters:
oid [in] Sparksee OID to be removed.

void Graph::Drop ( Objects objs  ) 

Drops all the OIDs from the given collection.

See Drop method with the single OID parameter. This performs that call for all the elements into the collection.

Parameters:
objs [in] Objects collection with the OIDs to be removed.

type_t Graph::GetObjectType ( oid_t  oid  ) 

Gets the Sparksee node or edge type identifier for the given OID.

Parameters:
oid [in] Sparksee OID.
Returns:
Sparksee node or edge type identifier.

attr_t Graph::NewAttribute ( type_t  type,
const std::wstring &  name,
DataType  dt,
AttributeKind  kind 
)

Creates a new attribute.

Parameters:
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.
Returns:
Unique Sparksee attribute identifier.

attr_t Graph::NewAttribute ( type_t  type,
const std::wstring &  name,
DataType  dt,
AttributeKind  kind,
Value defaultValue 
)

Creates a new attribute with a default value.

Parameters:
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.
Returns:
Unique Sparksee attribute identifier.

attr_t Graph::NewSessionAttribute ( type_t  type,
DataType  dt,
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.

Parameters:
type [in] Sparksee node or edge type identifier.
dt [in] Data type for the new attribute.
kind [in] Attribute kind.
Returns:
Unique Sparksee attribute identifier.

attr_t Graph::NewSessionAttribute ( type_t  type,
DataType  dt,
AttributeKind  kind,
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.

Parameters:
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.
Returns:
Unique Sparksee attribute identifier.

void Graph::SetAttributeDefaultValue ( attr_t  attr,
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.

Parameters:
attr [in] The attribute.
value [in] The default value to use for this attribute.

void Graph::IndexAttribute ( attr_t  attr,
AttributeKind  kind 
)

Updates the index of the given attribute.

This just works if the current index of the attribute corresponds to the AttributeKind Basic and the new one is Indexed or Unique.

Parameters:
attr [in] Sparksee attribute identifier.
kind [in] Attribute kind.

void Graph::GetAttribute ( oid_t  oid,
attr_t  attr,
Value value 
)

Gets the Value for the given attribute and OID.

Parameters:
oid [in] Sparksee OID.
attr [in] Sparksee attribute identifier.
value [in|out] Value for the given attribute and for the given OID.

Value* Graph::GetAttribute ( oid_t  oid,
attr_t  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.

Parameters:
oid [in] Sparksee OID.
attr [in] Sparksee attribute identifier.
Returns:
A new Value instance having the attribute value for the given OID.

TextStream* Graph::GetAttributeText ( oid_t  oid,
attr_t  attr 
)

Gets the read-only TextStream for the given text attribute and OID.

Parameters:
oid [in] Sparksee OID.
attr [in] Sparksee attribute identifier.
Returns:
A TextStream. This returns a TextStream to read.

void Graph::SetAttributeText ( oid_t  oid,
attr_t  attr,
TextStream tstream 
)

Sets the writable TextStream for the given text attribute and OID.

Parameters:
oid [in] Sparksee OID.
attr [in] Sparksee attribute identifier.
tstream [in] New Text value. This corresponds to a TextStream to write.

void Graph::SetAttribute ( oid_t  oid,
attr_t  attr,
Value value 
)

Sets the Value for the given attribute and OID.

Parameters:
oid [in] Sparksee OID.
attr [in] Sparksee attribute identifier.
value [in] Value for the given attribute and for the given OID.

AttributeStatistics* Graph::GetAttributeStatistics ( attr_t  attr,
bool_t  basic 
)

Gets statistics from the given attribute.

Parameters:
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.
Returns:
An AttributeStatistics instace.

int64_t Graph::GetAttributeIntervalCount ( attr_t  attr,
Value lower,
bool_t  includeLower,
Value higher,
bool_t  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.

Parameters:
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.
Returns:
Number of objects having a value into the given range.

type_t Graph::FindType ( const std::wstring &  name  ) 

Gets the Sparksee type identifier for the given type name.

Parameters:
name [in] Unique type name.
Returns:
The Sparksee type identifier for the given type name or the Type InvalidType if there is no type with the given name.

Type* Graph::GetType ( type_t  type  ) 

Gets information about the given type.

Parameters:
type [in] Sparksee type identifier.
Returns:
The Type for the given Sparksee type identifier.

void Graph::RemoveType ( type_t  type  ) 

Removes the given type.

This fails if there exist attributes defined for the type or if there exist restricted edges referencing this type.

Parameters:
type [in] Sparksee type identifier.

void Graph::RenameType ( const std::wstring &  oldName,
const std::wstring &  newName 
)

Renames a type.

The new name must be available.

Parameters:
oldName [in] The current name of the type to be renamed.
newName [in] The new name for the type.

void Graph::RenameType ( type_t  type,
const std::wstring &  newName 
)

Renames a type.

The new name must be available.

Parameters:
type [in] The type to be renamed.
newName [in] The new name for the type.

attr_t Graph::FindAttribute ( type_t  type,
const std::wstring &  name 
)

Gets the Sparksee attribute identifier for the given type identifier and attribute name.

Parameters:
type [in] Sparksee type identifier.
name [in] Unique attribute name.
Returns:
The Sparksee attribute identifier for the given type and attribute name or InvalidAttribute if there is no attribute with the given name for the given type.

Attribute* Graph::GetAttribute ( attr_t  attr  ) 

Gets information about the given attribute.

Parameters:
attr [in] Sparksee attribute identifier.
Returns:
The Attribute for the given Sparksee attribute identifier.

void Graph::RemoveAttribute ( attr_t  attr  ) 

Removes the given attribute.

Parameters:
attr [in] Sparksee attribute identifier.

void Graph::RenameAttribute ( attr_t  attr,
const std::wstring &  newName 
)

Renames an attribute.

The new name must be available.

Parameters:
attr [in] Sparksee attribute identifier.
newName [in] The new name for the attribute.

oid_t Graph::FindObject ( attr_t  attr,
Value value 
)

Finds one object having the given Value for the given attribute.

If there are more than one, then any of them will be returned. And in case there are no object having this Value, the Objects InvalidOID will be returned.

Parameters:
attr [in] Sparksee attribute identifier.
value [in] Value.
Returns:
Sparksee OID or the Objects InvalidOID.

oid_t Graph::FindOrCreateObject ( attr_t  attr,
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.

Parameters:
attr [in] Sparksee attribute identifier.
value [in] Value.
Returns:
Sparksee OID or the Objects InvalidOID.

Objects* Graph::Select ( type_t  type  ) 

Selects all OIDs belonging to the given type.

Parameters:
type [in] Sparksee type identifier.
Returns:
Objects instance.

Objects* Graph::Select ( attr_t  attr,
Condition  cond,
const Value value 
)

Selects all OIDs satisfying the given condition for the given attribute.

Parameters:
attr [in] Sparksee attribute identifier.
cond [in] Condition to be satisfied.
value [in] Value to be satisfied.
Returns:
Objects instance.

Objects* Graph::Select ( attr_t  attr,
Condition  cond,
const Value lower,
const 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.

Parameters:
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.
Returns:
Objects instance.

Objects* Graph::Select ( attr_t  attr,
Condition  cond,
const Value value,
const Objects restriction 
)

Selects all OIDs satisfying the given condition for the given attribute.

Parameters:
attr [in] Sparksee attribute identifier.
cond [in] Condition to be satisfied.
value [in] Value to be satisfied.
restriction [in] Objects to limit the select in this set of objects.
Returns:
Objects instance.

Objects* Graph::Select ( attr_t  attr,
Condition  cond,
const Value lower,
const Value higher,
const 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.

Parameters:
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.
Returns:
Objects instance.

Objects* Graph::Explode ( oid_t  oid,
type_t  etype,
EdgesDirection  dir 
)

Selects all edges from or to the given node OID and for the given edge type.

Parameters:
oid [in] Sparksee node OID.
etype [in] Sparksee edge type identifier.
dir [in] Direction.
Returns:
Objects instance.

Objects* Graph::Explode ( Objects objs,
type_t  etype,
EdgesDirection  dir 
)

Selects all edges from or to each of the node OID in the given collection and for the given edge type.

Parameters:
objs [in] Sparksee node OID collection.
etype [in] Sparksee edge type identifier.
dir [in] Direction.
Returns:
Objects instance.

int64_t Graph::Degree ( oid_t  oid,
type_t  etype,
EdgesDirection  dir 
)

Gets the number of edges from or to the given node OID and for the given edge type.

Parameters:
oid [in] Sparksee node OID.
etype [in] Sparksee edge type identifier.
dir [in] Direction.
Returns:
The number of edges.

Objects* Graph::Neighbors ( oid_t  oid,
type_t  etype,
EdgesDirection  dir 
)

Selects all neighbor nodes from or to the given node OID and for the given edge type.

Parameters:
oid [in] Sparksee node OID.
etype [in] Sparksee edge type identifier.
dir [in] Direction.
Returns:
Objects instance.

Objects* Graph::Neighbors ( Objects objs,
type_t  etype,
EdgesDirection  dir 
)

Selects all neighbor nodes from or to each of the node OID in the given collection and for the given edge type.

Parameters:
objs [in] Sparksee node OID collection.
etype [in] Sparksee edge type identifier.
dir [in] Direction.
Returns:
Objects instance.

Objects* Graph::Edges ( type_t  etype,
oid_t  tail,
oid_t  head 
)

Gets all the edges of the given type between two given nodes (tail and head).

Parameters:
etype [in] Sparksee edge type identifier.
tail [in] Tail node identifier.
head [in] Head node identifier.
Returns:
Objects instance.

oid_t Graph::FindEdge ( type_t  etype,
oid_t  tail,
oid_t  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.

Parameters:
etype [in] Sparksee edge type identifier.
tail [in] Tail node identifier.
head [in] Head node identifier.
Returns:
Any of the edges or the Objects InvalidOID.

oid_t Graph::FindOrCreateEdge ( type_t  etype,
oid_t  tail,
oid_t  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.

Parameters:
etype [in] Sparksee edge type identifier.
tail [in] Tail node identifier.
head [in] Head node identifier.
Returns:
Any of the edges or the Objects InvalidOID.

Objects* Graph::Tails ( Objects edges  ) 

Gets all the tails from the given edges collection.

Parameters:
edges [in] Sparksee edge identifier collection.
Returns:
The tails collection.

Objects* Graph::Heads ( Objects edges  ) 

Gets all the heads from the given edges collection.

Parameters:
edges [in] Sparksee edge identifier collection.
Returns:
The heads collection.

void Graph::TailsAndHeads ( Objects edges,
Objects tails,
Objects heads 
)

Gets all the tails and heads from the given edges collection.

Parameters:
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.

TypeList* Graph::FindNodeTypes (  ) 

Gets all existing Sparksee node type identifiers.

Returns:
Sparksee node type identifier list.

TypeList* Graph::FindEdgeTypes (  ) 

Gets all existing Sparksee edge type identifiers.

Returns:
Sparksee edge type identifier list.

TypeList* Graph::FindTypes (  ) 

Gets all existing Sparksee node and edge type identifiers.

Returns:
Sparksee node and edge type identifier list.

AttributeList* Graph::FindAttributes ( type_t  type  ) 

Gets all existing Sparksee attribute identifiers for the given type identifier.

Parameters:
type [in] Sparksee type identifier.
Returns:
Sparksee attribute identifier list.

AttributeList* Graph::GetAttributes ( oid_t  oid  ) 

Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID.

Parameters:
oid [in] Sparksee OID.
Returns:
Sparksee attribute identifier list.

Values* Graph::GetValues ( attr_t  attr  ) 

Gets the Value collection for the given attribute.

Parameters:
attr [in] Sparksee attribute identifier.
Returns:
Returns a Values object.

void Graph::DumpData ( const std::wstring &  file  )  throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error)

Dumps logical data to a file.

Parameters:
file [in] Output file path.
Exceptions:
FileNotFoundException If the given file cannot be created.

void Graph::DumpStorage ( const std::wstring &  file  )  throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error)

Dumps internal storage data to a file.

Parameters:
file [in] Output file path.
Exceptions:
FileNotFoundException If the given file cannot be created.

void Graph::Export ( const std::wstring &  file,
ExportType  type,
ExportManager em 
) throw (sparksee::gdb::IOException)

Exports the Graph.

Parameters:
file [in] Output file.
type [in] Export type.
em [in] Defines how to do the export for each graph object.

void Graph::Backup ( const std::wstring &  file  )  throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error)

Dumps all the data to a backup file.

See the Sparksee class Restore method.

Parameters:
file [in] Output backup file path.
Exceptions:
FileNotFoundException If the given file cannot be created.


The documentation for this class was generated from the following file:

Generated on Tue Jun 2 13:44:14 2015 for Sparksee by  doxygen 1.5.6