In order to faciliate working with graph representations of source code commit histories, we have provided a Java library that defines node and relationship types. This library can be used to create a graph representation of a commit history and manipulate a preexisting graph.


To load the graph, use the DeveloperNeo4JConnector:

DeveloperNeo4JConnector connector = new DeveloperNeo4JConnector("/path/to/db");

Graph nodes are wrapped in one of three types of object: AuthorNode, RevisionNode, or FileNode.

If you'd like to start with a particular committer (let's call him "steve"):

AuthorNode author = AuthorNode.get(connector, "steve");

However, if you'd like to list all of the committers in the graph:

Collection<AuthorNode> authors = AuthorNode.listAll(connector);

To find all of the revisions for a particular author (again, "steve"):

AuthorNode author = AuthorNode.get(connector, "steve");
Collection<RevisionNode> revisions = author.getRevisions();

There are four types of relationships: AuthorFileRelationship, AuthorRevisionRelationship, CoCommitRelationship, FileChangeRelationship. Each relationship type extends the DomainRelationship base class.

For more information, see the Javadocs.


Name Last Modified Size