Implementing Graph Traversal Builder in Java
Contributor(s): Daniel Kuppitz
- Demonstrate how to use the builder pattern to simplify the construction of complex Gremlin traversals
- ShortestPathQueryBuild.java - This file implements the builder pattern logic for simplifying traversal construction
How this Works
The graph being used in this project is based on TinkerPop's modern graph.
The only difference is an added
uses edge between
The application can run without a connection to a DataStax Enterprise (DSE) cluster (in that case, it will execute all traversals on a
TinkerGraph). The application's
user interface will show all the available commands that can be used to establish a connection to a DSE cluster and build/execute certain
traversals (note, that there's also support for tab completion).
Setup and Running
- Java 8
- DSE Cluster with Graph enabled or TinkerGraph
To start the sample application, which is a simple CLI application, run the following command from the application's root directory:
This shell script will start the application, or recompile and start the application if any source file is newer than the current binary file.