public class ComputerGraph extends Object implements Graph
Modifier and Type | Class and Description |
---|---|
static class |
ComputerGraph.State |
Graph.Exceptions, Graph.Features, Graph.Helper, Graph.Hidden, Graph.Io, Graph.OptIn, Graph.OptIns, Graph.OptOut, Graph.OptOuts, Graph.Variables
Constructor and Description |
---|
ComputerGraph(Graph graph,
Set<String> elementComputeKeys) |
Modifier and Type | Method and Description |
---|---|
Vertex |
addVertex(Object... keyValues)
Add a
Vertex to the graph given an optional series of key/value pairs. |
void |
close() |
GraphComputer |
compute() |
<C extends GraphComputer> |
compute(Class<C> graphComputerClass)
Declare the
GraphComputer to use for OLAP operations on the graph. |
Configuration |
configuration()
Get the
org.apache.commons.configuration.Configuration associated with the construction of this graph. |
Iterator<Edge> |
edges(Object... edgeIds)
Get the
Edge objects in this graph with the provided edge ids. |
static Vertex |
of(Vertex vertex,
Set<String> elementComputeKeys) |
void |
setState(ComputerGraph.State state) |
Transaction |
tx()
Configure and control the transactions for those graphs that support this feature.
|
Graph.Variables |
variables()
A collection of global
Graph.Variables associated with the graph. |
Iterator<Vertex> |
vertices(Object... vertexIds)
Get the
Vertex objects in this graph with the provided vertex ids. |
public void setState(ComputerGraph.State state)
public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException
Graph
GraphComputer
to use for OLAP operations on the graph.
If the graph does not support graph computer then an UnsupportedOperationException
is thrown.compute
in interface Graph
graphComputerClass
- The graph computer class to use.IllegalArgumentException
- if the provided GraphComputer
class is not supported.public GraphComputer compute() throws IllegalArgumentException
compute
in interface Graph
IllegalArgumentException
public Iterator<Vertex> vertices(Object... vertexIds)
Graph
Vertex
objects in this graph with the provided vertex ids. If no ids are provided, get all vertices.public Iterator<Edge> edges(Object... edgeIds)
Graph
Edge
objects in this graph with the provided edge ids. If no ids are provided, get all edges.public Transaction tx()
Graph
public Graph.Variables variables()
Graph
Graph.Variables
associated with the graph.
Variables are used for storing metadata about the graph.public Configuration configuration()
Graph
org.apache.commons.configuration.Configuration
associated with the construction of this graph.
Whatever configuration was passed to org.apache.tinkerpop.gremlin.structure.util.GraphFactory#open(org.apache.commons.configuration.Configuration)
is what should be returned by this method.configuration
in interface Graph
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.