Graph-RAT Programming Environment
Embedded Graph-RAT 0.5
Graphs are created with the GraphFactory singleton. The parameters are the graph ID (String) and an optional Properties object (created with the PropertiesFactory singleton without parameters). The default class of graph is 'MemGraph'.
Nodes are created with the ActorFactory singleton. The parameters are mode (String), ID (String), and an optional Properties object. The default class is 'BasicUser'
Links are created with the LinkFactory singleton. The parameters are relation (String), source (Actor), strength (double), and destination (Actor), and an optional Properties object. The default class is 'BasicLink'.
All nodes and links are added to a graph by reference, as are all nodes and links returned by the graph object. Adding or modifying the indexed portions of links or nodes in a graph while it is being read with an iterator results in a ConcurrantModificationException.
Instantiating an algorithm is done using a AlgorithmFactory with an algorithm class (String), followed by an optional Properties object. The 'Name' parameter must be set if more than one copy of this class of algorithm is instantiated.
The algorithm executes over a graph (see above) using the Graph:execute method.
Schedulers are created using the SchedulerFactory singleton with an optional Properties object. Components are then added one-by-one and a graph object set.
Data Acquisition algorithms are added directly. Algorithms are added with a GraphQuery and an algorithm.
Graph Queries are a type of query that selects a list of graphs from within a tree of graphs defined by the root graphs and its subgraphs. Queries are similar in structure to SQL, omitting joins, but containing selection by link strength and properties. More info is located in the Graph-RAT talk and in the Javadoc for GraphQueries. A section on Graph Queries is planned for the Users Guide, but is not yet ready.
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.