SparkseeNet 6.1.0
com.sparsity.sparksee.gdb.DefaultExport Class Reference

Default implementation for ExportManager class. More...

Inheritance diagram for com.sparsity.sparksee.gdb.DefaultExport:
Inheritance graph
Collaboration diagram for com.sparsity.sparksee.gdb.DefaultExport:
Collaboration graph

Public Member Functions

long NextEdge ()
 Gets the next edge to export or InvalidOID.
 
bool GetGraph (com.sparsity.sparksee.gdb.GraphExport graphExport)
 Default implementation of the ExportManager class method GetGraph.
 
void Release ()
 Default implementation of the ExportManager class method Release.
 
bool ExportAll ()
 Get if all the graph object should be exported or only a subgraph It should return true (default option), to export all the nodes and edges in the Graph as with previous verions.
 
bool SubgraphNodes (com.sparsity.sparksee.gdb.Objects nodes)
 Limit the exported nodes to the nodes in the given node set.
 
void SetTitleWithAttributes (bool encoded)
 Include additional information including all the node/edge attributes as Title instead of the default title text (just the type name).
 
bool SetMaxTextCharacters (int size)
 Sets the maximum number of Text Attribute characters to show.
 
bool GetNode (long node, com.sparsity.sparksee.gdb.NodeExport nodeExport)
 Default implementation of the ExportManager class method GetNode.
 
bool GetEdge (long edge, com.sparsity.sparksee.gdb.EdgeExport edgeExport)
 Default implementation of the ExportManager class method GetEdge.
 
bool GetEdgeType (int type, com.sparsity.sparksee.gdb.EdgeExport edgeExport)
 Default implementation of the ExportManager class method GetEdgeType.
 
bool SetMaxArrayElements (int size)
 Sets the maximum number of elements of an Array Attribute to show.
 
void SetTypeLabelAttribute (int type, int labelAttr)
 Set the attribute that stores the label for a specific node/edge type.
 
bool SubgraphEdges (com.sparsity.sparksee.gdb.Objects edges)
 Limit the exported edges to the edges in the given edges set.
 
void Prepare (com.sparsity.sparksee.gdb.Graph graph)
 Default implementation of the ExportManager class method Prepare.
 
long NextNode ()
 Gets the next node to export or InvalidOID.
 
void SetNodeTypeImageAttribute (int nodeType, int imageAttr)
 Set the attribute that stores the image for a specific node type.
 
 DefaultExport ()
 Creates a new instance.
 
bool GetNodeType (int type, com.sparsity.sparksee.gdb.NodeExport nodeExport)
 Default implementation of the ExportManager class method GetNodeType.
 
bool EnableType (int type)
 Default implementation of the ExportManager class method EnableType.
 
void SetTypeColorRGB (int type, int color)
 Set the color for a specific node/edge type.
 
void SetNodeTypeImage (int nodeType, System.String image)
 Set an image for all the nodes of a specific node type.
 
void SetNodeTypeShape (int nodeType, com.sparsity.sparksee.gdb.NodeShape shape)
 Set the shape for all nodes of this type.
 

Detailed Description

Default implementation for ExportManager class.

It uses the default values from GraphExport, NodeExport and EdgeExport to export all node and edge types.

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

Member Function Documentation

◆ EnableType()

bool com.sparsity.sparksee.gdb.DefaultExport.EnableType ( int type)

Default implementation of the ExportManager class method EnableType.

This enables all node and edge types to be exported.

Parameters
type[in] The type to enable.
Returns
TRUE.

◆ ExportAll()

bool com.sparsity.sparksee.gdb.DefaultExport.ExportAll ( )

Get if all the graph object should be exported or only a subgraph It should return true (default option), to export all the nodes and edges in the Graph as with previous verions.

Or false to use the new Next() method of this class to get the only nodes/edges that should be exported. It will return true to export all the graph unless a subgraph had been selected by calling the SubgraphNodes or SubgraphEdges methods.

Returns
bool_t Returns true to export all the graph or false otherwise.

◆ GetEdge()

bool com.sparsity.sparksee.gdb.DefaultExport.GetEdge ( long edge,
com.sparsity.sparksee.gdb.EdgeExport edgeExport )

Default implementation of the ExportManager class method GetEdge.

This sets the default EdgeExport values and sets the OID as the label. Also, it exports the edge as directed just if the edge is directed.

Parameters
edge[in] An edge.
edgeExport[out] The EdgeExport that will store the information.
Returns
TRUE.

◆ GetEdgeType()

bool com.sparsity.sparksee.gdb.DefaultExport.GetEdgeType ( int type,
com.sparsity.sparksee.gdb.EdgeExport edgeExport )

Default implementation of the ExportManager class method GetEdgeType.

This sets de default EdgeExport values.

Parameters
type[in] An edge type.
edgeExport[out] The EdgeExport that will store the information.
Returns
TRUE.

◆ GetGraph()

bool com.sparsity.sparksee.gdb.DefaultExport.GetGraph ( com.sparsity.sparksee.gdb.GraphExport graphExport)

Default implementation of the ExportManager class method GetGraph.

This sets the default GraphExport values including the default background color and the database alias as the label. The default GraphExport label could be empty (because the database did not have an alias) but this method will add " graph" or " subgraph" to the label anyway to easily know if the hole graph was exported or just some nodes/edges.

Parameters
graphExport[out] The GraphExport that will store the information.
Returns
TRUE.

◆ GetNode()

bool com.sparsity.sparksee.gdb.DefaultExport.GetNode ( long node,
com.sparsity.sparksee.gdb.NodeExport nodeExport )

Default implementation of the ExportManager class method GetNode.

This sets the default NodeExport values and sets the OID as the label.

Parameters
node[in] A node.
nodeExport[out] The NodeExport that will store the information.
Returns
TRUE.

◆ GetNodeType()

bool com.sparsity.sparksee.gdb.DefaultExport.GetNodeType ( int type,
com.sparsity.sparksee.gdb.NodeExport nodeExport )

Default implementation of the ExportManager class method GetNodeType.

This sets de default NodeExport values.

Parameters
type[in] A node type.
nodeExport[out] The NodeExport that will store the information.
Returns
TRUE.

◆ NextEdge()

long com.sparsity.sparksee.gdb.DefaultExport.NextEdge ( )

Gets the next edge to export or InvalidOID.

It will return valid edge OIDs to export and InvalidOID when there is not any more edges to export. ExportAll returns false.

Returns
oid_t Return an edge OID or InvalidOID

◆ NextNode()

long com.sparsity.sparksee.gdb.DefaultExport.NextNode ( )

Gets the next node to export or InvalidOID.

It will return valid node OIDs to export and InvalidOID when there is not any more nodes to export. ExportAll returns false.

Returns
oid_t Return a node OID or InvalidOID

◆ Prepare()

void com.sparsity.sparksee.gdb.DefaultExport.Prepare ( com.sparsity.sparksee.gdb.Graph graph)

Default implementation of the ExportManager class method Prepare.

Parameters
graphnull

◆ SetMaxArrayElements()

bool com.sparsity.sparksee.gdb.DefaultExport.SetMaxArrayElements ( int size)

Sets the maximum number of elements of an Array Attribute to show.

If an Array Attribute has more than the given size elements, only the first ones will be used and "..." will be added.

Parameters
sizenull
Returns
Returns True if successful or False if the give value is not valid.

◆ SetMaxTextCharacters()

bool com.sparsity.sparksee.gdb.DefaultExport.SetMaxTextCharacters ( int size)

Sets the maximum number of Text Attribute characters to show.

If a Text Attribute has more than the given size characters it will be truncated and "..." will be added.

Parameters
sizenull
Returns
Returns True if successful or False if the give value is not valid.

◆ SetNodeTypeImage()

void com.sparsity.sparksee.gdb.DefaultExport.SetNodeTypeImage ( int nodeType,
System.String image )

Set an image for all the nodes of a specific node type.

Parameters
nodeType[in] A valid node type.
image[in] A path or URL of the image to use for all nodes of this type.

◆ SetNodeTypeImageAttribute()

void com.sparsity.sparksee.gdb.DefaultExport.SetNodeTypeImageAttribute ( int nodeType,
int imageAttr )

Set the attribute that stores the image for a specific node type.

Parameters
nodeType[in] A valid node type.
imageAttr[in] The attribute to use for nodes of this type to get the image url/path.

◆ SetNodeTypeShape()

void com.sparsity.sparksee.gdb.DefaultExport.SetNodeTypeShape ( int nodeType,
com.sparsity.sparksee.gdb.NodeShape shape )

Set the shape for all nodes of this type.

Parameters
nodeType[in] A valid node type.
shape[in] The shape for all the nodes of the given type.

◆ SetTitleWithAttributes()

void com.sparsity.sparksee.gdb.DefaultExport.SetTitleWithAttributes ( bool encoded)

Include additional information including all the node/edge attributes as Title instead of the default title text (just the type name).

Parameters
encoded[in] If true the tooltip data will be added as a base64 encoded JSON instead of very basic html text format for easy parsing of the additional data.

◆ SetTypeColorRGB()

void com.sparsity.sparksee.gdb.DefaultExport.SetTypeColorRGB ( int type,
int color )

Set the color for a specific node/edge type.

Parameters
type[in] A valid node/edge type.
color[in] The main color for the type. The label color will be set as a complementary color from the given color to guarantee that it will contrast.

◆ SetTypeLabelAttribute()

void com.sparsity.sparksee.gdb.DefaultExport.SetTypeLabelAttribute ( int type,
int labelAttr )

Set the attribute that stores the label for a specific node/edge type.

Parameters
type[in] A valid node/edge type.
labelAttr[in] The attribute to use for nodes/edges of this type to get the label. If a valid label can be obttained from the attribute it will be used instead of the default OID.

◆ SubgraphEdges()

bool com.sparsity.sparksee.gdb.DefaultExport.SubgraphEdges ( com.sparsity.sparksee.gdb.Objects edges)

Limit the exported edges to the edges in the given edges set.

If only the subgraph edges are specified, the exported nodes will be calculated as all the nodes present in the selected edges.

Parameters
edges[in] Subgraph edges to export. Must be kept alive by the user until the export is finished. The given Objects set can also contain nodes, but will be ignored. This is useful to use a signle Objects set to limit both subgraph nodes and edges. But if an Objects containing both nodes and edges is used, then both SubgraphNodes and SubgraphEdges methods must be called.
Returns
Returns true if successful or false otherwise.

◆ SubgraphNodes()

bool com.sparsity.sparksee.gdb.DefaultExport.SubgraphNodes ( com.sparsity.sparksee.gdb.Objects nodes)

Limit the exported nodes to the nodes in the given node set.

If only the subgraph nodes are specified, the exported edges will be calculated as all the edges between the selected nodes.

Parameters
nodes[in] Subgraph nodes to export. Must be kept alive by the user until the export is finished. The given Objects set can also contain edges, but will be ignored. This is useful to use a signle Objects set to limit both subgraph nodes and edges. But if an Objects containing both nodes and edges is used, then both SubgraphNodes and SubgraphEdges methods must be called.
Returns
Returns true if successful or false otherwise.