Class ArangoDBGraph

java.lang.Object
com.arangodb.tinkerpop.gremlin.structure.ArangoDBGraph
All Implemented Interfaces:
AutoCloseable, org.apache.tinkerpop.gremlin.structure.Graph, org.apache.tinkerpop.gremlin.structure.util.Host

public class ArangoDBGraph extends Object implements org.apache.tinkerpop.gremlin.structure.Graph
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Graph

    org.apache.tinkerpop.gremlin.structure.Graph.Exceptions, org.apache.tinkerpop.gremlin.structure.Graph.Features, org.apache.tinkerpop.gremlin.structure.Graph.Hidden, org.apache.tinkerpop.gremlin.structure.Graph.OptIn, org.apache.tinkerpop.gremlin.structure.Graph.OptIns, org.apache.tinkerpop.gremlin.structure.Graph.OptOut, org.apache.tinkerpop.gremlin.structure.Graph.OptOuts, org.apache.tinkerpop.gremlin.structure.Graph.Variables
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from interface org.apache.tinkerpop.gremlin.structure.Graph

    GRAPH
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ArangoDBGraph(org.apache.commons.configuration2.Configuration cfg)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.tinkerpop.gremlin.structure.Vertex
    addVertex(Object... keyValues)
     
    <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E>
    aql(String query)
    Execute the AQL query and get the result set as a GraphTraversal.
    <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E>
    aql(String query, com.arangodb.model.AqlQueryOptions options)
    Execute the AQL query and get the result set as a GraphTraversal.
    <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E>
    aql(String query, Map<String,?> parameters)
    Execute the AQL query with provided parameters and get the result set as a GraphTraversal.
    <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E>
    aql(String query, Map<String,?> parameters, com.arangodb.model.AqlQueryOptions options)
    Execute the AQL query with provided parameters and get the result set as a GraphTraversal.
    void
     
    org.apache.tinkerpop.gremlin.process.computer.GraphComputer
     
    <C extends org.apache.tinkerpop.gremlin.process.computer.GraphComputer>
    C
    compute(Class<C> graphComputerClass)
     
    org.apache.commons.configuration2.Configuration
     
     
    createEdge(String label, org.apache.tinkerpop.gremlin.structure.Vertex outVertex, org.apache.tinkerpop.gremlin.structure.Vertex inVertex, Object... keyValues)
     
     
    createVertex(Object... keyValues)
     
     
    Iterator<org.apache.tinkerpop.gremlin.structure.Edge>
    edges(Object... edgeIds)
     
    elementId(org.apache.tinkerpop.gremlin.structure.Element element)
    Create the ElementId for a persistent element.
    org.apache.tinkerpop.gremlin.structure.Graph.Features
     
    com.arangodb.ArangoDatabase
    Get the underlying ArangoDB database instance.
    com.arangodb.ArangoDB
    Get the underlying ArangoDB driver instance.
    com.arangodb.ArangoGraph
    Get the underlying ArangoGraph instance.
     
     
    open(org.apache.commons.configuration2.Configuration configuration)
    Open a new ArangoDBGraph instance.
     
    org.apache.tinkerpop.gremlin.structure.Transaction
    tx()
     
     
    org.apache.tinkerpop.gremlin.structure.Graph.Variables
     
     
    Iterator<org.apache.tinkerpop.gremlin.structure.Vertex>
    vertices(Object... vertexIds)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.tinkerpop.gremlin.structure.Graph

    addVertex, getServiceRegistry, io, traversal, traversal, tx
  • Field Details

  • Constructor Details

    • ArangoDBGraph

      protected ArangoDBGraph(org.apache.commons.configuration2.Configuration cfg)
  • Method Details

    • open

      public static ArangoDBGraph open(org.apache.commons.configuration2.Configuration configuration)
      Open a new ArangoDBGraph instance.

      This method is used by the GraphFactory to instantiate Graph instances.

      Parameters:
      configuration - the configuration for the instance
      Returns:
      a newly opened Graph
    • edgeCollections

      public Set<String> edgeCollections()
    • vertexCollections

      public Set<String> vertexCollections()
    • type

    • addVertex

      public org.apache.tinkerpop.gremlin.structure.Vertex addVertex(Object... keyValues)
      Specified by:
      addVertex in interface org.apache.tinkerpop.gremlin.structure.Graph
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.apache.tinkerpop.gremlin.structure.Graph
    • compute

      public org.apache.tinkerpop.gremlin.process.computer.GraphComputer compute() throws IllegalArgumentException
      Specified by:
      compute in interface org.apache.tinkerpop.gremlin.structure.Graph
      Throws:
      IllegalArgumentException
    • compute

      public <C extends org.apache.tinkerpop.gremlin.process.computer.GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException
      Specified by:
      compute in interface org.apache.tinkerpop.gremlin.structure.Graph
      Throws:
      IllegalArgumentException
    • configuration

      public org.apache.commons.configuration2.Configuration configuration()
      Specified by:
      configuration in interface org.apache.tinkerpop.gremlin.structure.Graph
    • edges

      public Iterator<org.apache.tinkerpop.gremlin.structure.Edge> edges(Object... edgeIds)
      Specified by:
      edges in interface org.apache.tinkerpop.gremlin.structure.Graph
    • vertices

      public Iterator<org.apache.tinkerpop.gremlin.structure.Vertex> vertices(Object... vertexIds)
      Specified by:
      vertices in interface org.apache.tinkerpop.gremlin.structure.Graph
    • features

      public org.apache.tinkerpop.gremlin.structure.Graph.Features features()
      Specified by:
      features in interface org.apache.tinkerpop.gremlin.structure.Graph
    • getClient

      public ArangoDBGraphClient getClient()
    • elementId

      public ElementId elementId(org.apache.tinkerpop.gremlin.structure.Element element)
      Create the ElementId for a persistent element. The returned elementId can be used to reference the related ArangoDB document in AQL queries.
      Parameters:
      element - a persistent element (Edge or Vertex)
      Returns:
      elementId
    • name

      public String name()
    • tx

      public org.apache.tinkerpop.gremlin.structure.Transaction tx()
      Specified by:
      tx in interface org.apache.tinkerpop.gremlin.structure.Graph
    • variables

      public org.apache.tinkerpop.gremlin.structure.Graph.Variables variables()
      Specified by:
      variables in interface org.apache.tinkerpop.gremlin.structure.Graph
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • aql

      public <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E> aql(String query)
      Execute the AQL query and get the result set as a GraphTraversal.
      Parameters:
      query - the AQL query to execute
      Returns:
      a fluent Gremlin traversal
    • aql

      public <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E> aql(String query, com.arangodb.model.AqlQueryOptions options)
      Execute the AQL query and get the result set as a GraphTraversal.
      Parameters:
      query - the AQL query to execute
      options - query options
      Returns:
      a fluent Gremlin traversal
    • aql

      public <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E> aql(String query, Map<String,?> parameters)
      Execute the AQL query with provided parameters and get the result set as a GraphTraversal.
      Parameters:
      query - the AQL query to execute
      parameters - the parameters of the AQL query
      Returns:
      a fluent Gremlin traversal
    • aql

      public <E> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,E> aql(String query, Map<String,?> parameters, com.arangodb.model.AqlQueryOptions options)
      Execute the AQL query with provided parameters and get the result set as a GraphTraversal.
      Parameters:
      query - the AQL query to execute
      parameters - the parameters of the AQL query
      options - query options
      Returns:
      a fluent Gremlin traversal
    • getArangoDriver

      public com.arangodb.ArangoDB getArangoDriver()
      Get the underlying ArangoDB driver instance.
      Returns:
      ArangoDB driver instance
    • getArangoDatabase

      public com.arangodb.ArangoDatabase getArangoDatabase()
      Get the underlying ArangoDB database instance.
      Returns:
      ArangoDatabase instance
    • getArangoGraph

      public com.arangodb.ArangoGraph getArangoGraph()
      Get the underlying ArangoGraph instance.
      Returns:
      ArangoGraph instance
    • createVertex

      public ArangoDBVertex createVertex(Object... keyValues)
    • createVertex

      public ArangoDBVertex createVertex(VertexData data)
    • createEdge

      public ArangoDBEdge createEdge(String label, org.apache.tinkerpop.gremlin.structure.Vertex outVertex, org.apache.tinkerpop.gremlin.structure.Vertex inVertex, Object... keyValues)
    • createEdge

      public ArangoDBEdge createEdge(EdgeData data)