public interface Graph
| Modifier and Type | Method and Description |
|---|---|
Edge |
addEdge(Object id,
Vertex outVertex,
Vertex inVertex,
String label)
Add an edge to the graph.
|
Vertex |
addVertex(Object id)
Create a new vertex, add it to the graph, and return the newly created vertex.
|
Edge |
getEdge(Object id)
Return the edge referenced by the provided object identifier.
|
Iterable<Edge> |
getEdges()
Return an iterable to all the edges in the graph.
|
Iterable<Edge> |
getEdges(String key,
Object value)
Return an iterable to all the edges in the graph that have a particular key/value property.
|
Features |
getFeatures()
Get the particular features of the graph implementation.
|
Vertex |
getVertex(Object id)
Return the vertex referenced by the provided object identifier.
|
Iterable<Vertex> |
getVertices()
Return an iterable to all the vertices in the graph.
|
Iterable<Vertex> |
getVertices(String key,
Object value)
Return an iterable to all the vertices in the graph that have a particular key/value property.
|
GraphQuery |
query()
Generate a query object that can be used to fine tune which edges/vertices are retrieved from the graph.
|
void |
removeEdge(Edge edge)
Remove the provided edge from the graph.
|
void |
removeVertex(Vertex vertex)
Remove the provided vertex from the graph.
|
void |
shutdown()
A shutdown function is required to properly close the graph.
|
Features getFeatures()
Vertex addVertex(Object id)
id - the recommended object identifierVertex getVertex(Object id)
id - the identifier of the vertex to retrieved from the graphvoid removeVertex(Vertex vertex)
vertex - the vertex to remove from the graphIterable<Vertex> getVertices()
Iterable<Vertex> getVertices(String key, Object value)
key - the key of vertexvalue - the value of the vertexEdge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label)
id - the recommended object identifieroutVertex - the vertex on the tail of the edgeinVertex - the vertex on the head of the edgelabel - the label associated with the edgeEdge getEdge(Object id)
id - the identifier of the edge to retrieved from the graphvoid removeEdge(Edge edge)
edge - the edge to remove from the graphIterable<Edge> getEdges()
Iterable<Edge> getEdges(String key, Object value)
key - the key of the edgevalue - the value of the edgeGraphQuery query()
void shutdown()
Copyright © 2010-2014. All Rights Reserved.