public class WrappedGraph<T extends Graph> extends Object implements Graph, WrapperGraph<T>
| Constructor and Description |
|---|
WrappedGraph(T baseGraph) |
| 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.
|
T |
getBaseGraph()
Get the graph this wrapper delegates to.
|
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.
|
String |
toString() |
public WrappedGraph(T baseGraph)
public void shutdown()
Graphpublic Vertex addVertex(Object id)
Graphpublic Vertex getVertex(Object id)
Graphpublic Iterable<Vertex> getVertices()
GraphgetVertices in interface Graphpublic Iterable<Vertex> getVertices(String key, Object value)
GraphgetVertices in interface Graphkey - the key of vertexvalue - the value of the vertexpublic Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label)
Graphpublic Edge getEdge(Object id)
Graphpublic Iterable<Edge> getEdges()
Graphpublic Iterable<Edge> getEdges(String key, Object value)
Graphpublic void removeEdge(Edge edge)
GraphremoveEdge in interface Graphedge - the edge to remove from the graphpublic void removeVertex(Vertex vertex)
GraphremoveVertex in interface Graphvertex - the vertex to remove from the graphpublic T getBaseGraph()
WrapperGraphgetBaseGraph in interface WrapperGraph<T extends Graph>public GraphQuery query()
Graphpublic Features getFeatures()
GraphgetFeatures in interface GraphCopyright © 2010-2014. All Rights Reserved.