public class ReadOnlyGraph<T extends Graph> extends Object implements Graph, WrapperGraph<T>
| Constructor and Description |
|---|
ReadOnlyGraph(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 ReadOnlyGraph(T baseGraph)
public void removeVertex(Vertex vertex) throws UnsupportedOperationException
GraphremoveVertex in interface Graphvertex - the vertex to remove from the graphUnsupportedOperationExceptionpublic Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label) throws UnsupportedOperationException
GraphaddEdge in interface Graphid - 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 edgeUnsupportedOperationExceptionpublic Vertex getVertex(Object id)
Graphpublic void removeEdge(Edge edge) throws UnsupportedOperationException
GraphremoveEdge in interface Graphedge - the edge to remove from the graphUnsupportedOperationExceptionpublic Iterable<Edge> getEdges()
Graphpublic Iterable<Edge> getEdges(String key, Object value)
Graphpublic Edge getEdge(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 Vertex addVertex(Object id) throws UnsupportedOperationException
GraphaddVertex in interface Graphid - the recommended object identifierUnsupportedOperationExceptionpublic void shutdown()
throws UnsupportedOperationException
Graphshutdown in interface GraphUnsupportedOperationExceptionpublic T getBaseGraph()
WrapperGraphgetBaseGraph in interface WrapperGraph<T extends Graph>public GraphQuery query()
Graphpublic Features getFeatures()
GraphgetFeatures in interface GraphCopyright © 2010-2014. All Rights Reserved.