Package com.arangodb

Interface ArangoGraph

All Superinterfaces:
ArangoSerdeAccessor
All Known Implementing Classes:
ArangoGraphImpl

@ThreadSafe public interface ArangoGraph extends ArangoSerdeAccessor
Interface for operations on ArangoDB graph level.
Author:
Mark Vollmary
See Also:
  • Method Details

    • db

      The the handler of the database the named graph is within
      Returns:
      database handler
    • name

      String name()
      The name of the collection
      Returns:
      collection name
    • exists

      boolean exists()
      Checks whether the graph exists
      Returns:
      true if the graph exists, otherwise false
      See Also:
    • create

      GraphEntity create(Iterable<EdgeDefinition> edgeDefinitions)
      Creates the graph in the graph module. The creation of a graph requires the name of the graph and a definition of its edges.
      Parameters:
      edgeDefinitions - An array of definitions for the edge
      Returns:
      information about the graph
      See Also:
    • create

      GraphEntity create(Iterable<EdgeDefinition> edgeDefinitions, GraphCreateOptions options)
      Creates the graph in the graph module. The creation of a graph requires the name of the graph and a definition of its edges.
      Parameters:
      edgeDefinitions - An array of definitions for the edge
      options - Additional options, can be null
      Returns:
      information about the graph
      See Also:
    • drop

      void drop()
      Deletes the graph from the database.
      See Also:
    • drop

      void drop(boolean dropCollections)
      Deletes the graph from the database.
      Parameters:
      dropCollections - Drop collections of this graph as well. Collections will only be dropped if they are not used in other graphs.
      See Also:
    • getInfo

      GraphEntity getInfo()
      Retrieves general information about the graph.
      Returns:
      the definition content of this graph
      See Also:
    • getVertexCollections

      Collection<String> getVertexCollections()
      Fetches all vertex collections from the graph and returns a list of collection names.
      Returns:
      all vertex collections within this graph
      See Also:
    • addVertexCollection

      GraphEntity addVertexCollection(String name)
      Adds a vertex collection to the set of collections of the graph. If the collection does not exist, it will be created.
      Parameters:
      name - Name of the vertex collection
      Returns:
      information about the graph
      See Also:
    • addVertexCollection

      GraphEntity addVertexCollection(String name, VertexCollectionCreateOptions options)
      Adds a vertex collection to the set of collections of the graph. If the collection does not exist, it will be created.
      Parameters:
      name - Name of the vertex collection
      options - additional options
      Returns:
      information about the graph
      Since:
      ArangoDB 3.9
      See Also:
    • vertexCollection

      ArangoVertexCollection vertexCollection(String name)
      Returns a ArangoVertexCollection instance for the given vertex collection name.
      Parameters:
      name - Name of the vertex collection
      Returns:
      collection handler
    • edgeCollection

      ArangoEdgeCollection edgeCollection(String name)
      Returns a ArangoEdgeCollection instance for the given edge collection name.
      Parameters:
      name - Name of the edge collection
      Returns:
      collection handler
    • getEdgeDefinitions

      Collection<String> getEdgeDefinitions()
      Fetches all edge collections from the graph and returns a list of collection names.
      Returns:
      all edge collections within this graph
      See Also:
    • addEdgeDefinition

      GraphEntity addEdgeDefinition(EdgeDefinition definition)
      Adds the given edge definition to the graph.
      Parameters:
      definition - The edge definition
      Returns:
      information about the graph
      See Also:
    • replaceEdgeDefinition

      GraphEntity replaceEdgeDefinition(EdgeDefinition definition)
      Change one specific edge definition. This will modify all occurrences of this definition in all graphs known to your database
      Parameters:
      definition - The edge definition
      Returns:
      information about the graph
      See Also:
    • replaceEdgeDefinition

      GraphEntity replaceEdgeDefinition(EdgeDefinition definition, ReplaceEdgeDefinitionOptions options)
      Change one specific edge definition. This will modify all occurrences of this definition in all graphs known to your database
      Parameters:
      definition - The edge definition
      options - options
      Returns:
      information about the graph
      See Also: