public class GraphHelper extends Object
| Constructor and Description |
|---|
GraphHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Edge |
addEdge(Graph graph,
Object id,
Vertex outVertex,
Vertex inVertex,
String label,
Object... properties)
Add an edge to the graph with specified id and provided properties.
|
static Vertex |
addVertex(Graph graph,
Object id,
Object... properties)
Add a vertex to the graph with specified id and provided properties.
|
static void |
copyGraph(Graph from,
Graph to)
Copy the vertex/edges of one graph over to another graph.
|
public static Vertex addVertex(Graph graph, Object id, Object... properties)
graph - the graph to create a vertex inid - the id of the vertex to createproperties - the properties of the vertex to add (must be String,Object,String,Object,...)public static Edge addEdge(Graph graph, Object id, Vertex outVertex, Vertex inVertex, String label, Object... properties)
graph - the graph to create the edge inid - the id of the edge to createoutVertex - the outgoing/tail vertex of the edgeinVertex - the incoming/head vertex of the edgelabel - the label of the edgeproperties - the properties of the edge to add (must be String,Object,String,Object,...)public static void copyGraph(Graph from, Graph to)
from - the graph to copy fromto - the graph to copy toCopyright © 2010-2014. All Rights Reserved.