public interface Graph
extends java.lang.AutoCloseable
Graph is a container object for a collection of Vertex, Edge, VertexProperty,
and Property objects.| Modifier and Type | Interface and Description |
|---|---|
static class |
Graph.Exceptions
Common exceptions to use with a graph.
|
static interface |
Graph.Features
An interface that represents the capabilities of a
Graph implementation. |
static interface |
Graph.Helper
Defines a method as a "helper method".
|
static class |
Graph.Hidden
This should only be used by vendors to create keys, labels, etc.
|
static interface |
Graph.Io
Provides access to functions related to reading and writing graph data.
|
static interface |
Graph.Iterators
|
static interface |
Graph.OptIn
Defines the test suite that the implementer has decided to support and represents publicly as "passing".
|
static interface |
Graph.OptIns
Holds a collection of
Graph.OptIn enabling multiple Graph.OptIn to be applied to a
single suite. |
static interface |
Graph.OptOut
Defines a test in the suite that the implementer does not want to run.
|
static interface |
Graph.OptOuts
Holds a collection of
Graph.OptOut enabling multiple Graph.OptOut to be applied to a
single suite. |
static interface |
Graph.Variables
Graph variables are a set of key/value pairs associated with the graph.The keys are String and the values
are Objects.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GRAPH |
| Modifier and Type | Method and Description |
|---|---|
Vertex |
addVertex(java.lang.Object... keyValues)
Add a
Vertex to the graph given an optional series of key/value pairs. |
default Vertex |
addVertex(java.lang.String label)
Add a
Vertex to the graph with provided vertex label. |
GraphComputer |
compute(java.lang.Class... graphComputerClass)
Create an OLAP
GraphComputer to execute a vertex program over this graph. |
org.apache.commons.configuration.Configuration |
configuration()
Get the
Configuration associated with the construction of this graph. |
default GraphTraversal<Edge,Edge> |
E(java.lang.Object... edgeIds)
Starts a
GraphTraversal over the edges in the graph. |
default Graph.Features |
features()
Gets the
Graph.Features exposed by the underlying Graph implementation. |
default Graph.Io |
io()
Provide input/output methods for serializing graph data.
|
Graph.Iterators |
iterators()
Get the
Graph.Iterators associated with this graph. |
default <T extends Traversal<S,S>,S> |
of(java.lang.Class<T> traversalClass)
Constructs a new domain specific
Traversal for this graph. |
default StrategyGraph |
strategy(GraphStrategy... strategies)
Constructs a
StrategyGraph from one or more GraphStrategy objects. |
Transaction |
tx()
Configure and control the transactions for those graphs that support this feature.
|
default GraphTraversal<Vertex,Vertex> |
V(java.lang.Object... vertexIds)
Starts a
GraphTraversal over the vertices in the graph. |
Graph.Variables |
variables()
A collection of global
Graph.Variables associated with the graph. |
static final java.lang.String GRAPH
Vertex addVertex(java.lang.Object... keyValues)
Vertex to the graph given an optional series of key/value pairs. These key/values
must be provided in an even number where the odd numbered arguments are String property keys and the
even numbered arguments are the related property values.keyValues - The key/value pairs to turn into vertex propertiesdefault Vertex addVertex(java.lang.String label)
Vertex to the graph with provided vertex label.label - the label of the vertexdefault GraphTraversal<Vertex,Vertex> V(java.lang.Object... vertexIds)
GraphTraversal over the vertices in the graph.
If vertexIds are provided, then the traversal starts at those vertices, else all vertices in the graph.vertexIds - the ids of the vertices to get (if none are provided, get all vertices)default GraphTraversal<Edge,Edge> E(java.lang.Object... edgeIds)
GraphTraversal over the edges in the graph.
If edgeIds are provided, then the traversal starts at those edges, else all edges in the graph.edgeIds - the ids of the edges to get (if none are provided, get all edges)default <T extends Traversal<S,S>,S> T of(java.lang.Class<T> traversalClass)
Traversal for this graph.traversalClass - the domain specific Traversal bound to this graphGraphComputer compute(java.lang.Class... graphComputerClass)
GraphComputer to execute a vertex program over this graph.
If the graph does not support graph computer then an UnsupportedOperationException is thrown.
The provided arguments can be of either length 0 or 1. A graph can support multiple graph computers.graphComputerClass - The graph computer class to use (if no argument, then a default is selected by the graph)Transaction tx()
default Graph.Io io()
default StrategyGraph strategy(GraphStrategy... strategies)
StrategyGraph from one or more GraphStrategy objects. If more than one
GraphStrategy is supplied they are folded into a single SequenceStrategy.Graph.Variables variables()
Graph.Variables associated with the graph.
Variables are used for storing metadata about the graph.org.apache.commons.configuration.Configuration configuration()
Configuration associated with the construction of this graph.
Whatever configuration was passed to GraphFactory.open(org.apache.commons.configuration.Configuration)
is what should be returned by this method.Graph.Iterators iterators()
Graph.Iterators associated with this graph.default Graph.Features features()
Graph.Features exposed by the underlying Graph implementation.Copyright © 2013-2015 TinkerPop. All Rights Reserved.