Graph-RAT Logo

Graph-RAT Programming Environment



0.4.3 Javadoc

0.5.1 Javadoc

0.4.3 GUI use

0.5 GUI use

Command Line Use

0.4.3 Embedded Use

0.5 Embedded Use

Developing Graph-RAT

Module Listing


Get Relational Analysis Toolkit at Fast, secure and Free Open Source software downloads

Embedding in Graph-RAT 0.4.3

Graph only setup

Creating embedded graphs in Graph-RAT are best done by calls to the GraphFactory singleton. What graph and what properties are controlled by a Properties object. It has the following properties:

  • GraphName: Graph ID as a String
  • GraphType: Class of the graph - default is MemGraph
  • Location: File to save an XML copy of the graph on executing MemGraph:Commit. Empty means no output is saved.
  • GZipped: True/False for whether or not the committed file is gzipped.

Nodes are created by use of the ActorFactory singleton. The Properties object contains the parameters for the Actor. The parameters are as follows:

  • Mode: Type of node. Examples include 'Author','Artist','Document', or 'Term'.
  • ID: Unique string for this node within a particular mode.
  • ActorType: Class of actor to use. Default is 'BasicUser'.

Links are created by use of the LinkFactory singleton. The Properties object contains the parameters for the Actor. The parameters are as follows:

  • Relation: Type of link. Examples include 'Wrote','Friend','Uses', or 'Contains'.
  • LinkType: Class of link to use. Default is 'BasicLink'.
Upon creation, the link requires the source node, destination node, and link strength before it can be used.

Nodes and Links are added and retreived from a graph by reference - modifications to the contents are reflected in the graph and vice-versa. Once a graph iterator is utilized, changes to the references to links or nodes (i.e. adding or removing links or nodes or altering link source-relation-destination or altering node mode or id) throws an ConcurrantModificationException.

Individual Algorithm execution

Instantiating an algorithm is done using a AlgorithmFactory. The Properties object has the following parameters:

  • AlgorithmClass: Class of the algorithm to instantiate
  • AlgorithmName: Name of the algorithm (must be unique across an application)
  • Typically multiple algorithm-specific parameters. Listed in the Javadoc and in the Reference Manual

The algorithm executes over a graph (see above) using the Graph:execute method.

Scheduler Execution

Schedulers are created using the SchedulerFactory singleton. The parameters are as follows:

  • SchedulerName: Unique String for this scheduler
  • SchedulerClass: Type of Scheduler to instantiate. Default is Basic Scheduler.

Data Acquisition algorithms are added directly. Algorithms are added with a regular expression and an algorithm. Upon execution, the regular expression is matched against the tree of graphs (graphs and all subgraphs beneath it) where only the highest level nodes are then scheduled for execution. For example, '.*' matches only the root node, as it will match the root id as well as all subgraphs beneath it.

Data Acquisitions are executed first in the order they are added. Likewise, the algorithm-patterns are executed in the order they are added where the algorithm is repeatedly executed against each matching graph of the pattern.