Class ArangoGraphImpl

All Implemented Interfaces:
ArangoGraph, ArangoSerdeAccessor

public class ArangoGraphImpl extends InternalArangoGraph implements ArangoGraph
Author:
Mark Vollmary
  • Constructor Details

  • Method Details

    • db

      public ArangoDatabase db()
      Description copied from interface: ArangoGraph
      The the handler of the database the named graph is within
      Specified by:
      db in interface ArangoGraph
      Returns:
      database handler
    • exists

      public boolean exists()
      Description copied from interface: ArangoGraph
      Checks whether the graph exists
      Specified by:
      exists in interface ArangoGraph
      Returns:
      true if the graph exists, otherwise false
      See Also:
    • create

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

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

      public void drop()
      Description copied from interface: ArangoGraph
      Deletes the graph from the database.
      Specified by:
      drop in interface ArangoGraph
      See Also:
    • drop

      public void drop(boolean dropCollections)
      Description copied from interface: ArangoGraph
      Deletes the graph from the database.
      Specified by:
      drop in interface ArangoGraph
      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

      public GraphEntity getInfo()
      Description copied from interface: ArangoGraph
      Retrieves general information about the graph.
      Specified by:
      getInfo in interface ArangoGraph
      Returns:
      the definition content of this graph
      See Also:
    • getVertexCollections

      public Collection<String> getVertexCollections()
      Description copied from interface: ArangoGraph
      Fetches all vertex collections from the graph and returns a list of collection names.
      Specified by:
      getVertexCollections in interface ArangoGraph
      Returns:
      all vertex collections within this graph
      See Also:
    • addVertexCollection

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

      public GraphEntity addVertexCollection(String name, VertexCollectionCreateOptions options)
      Description copied from interface: ArangoGraph
      Adds a vertex collection to the set of collections of the graph. If the collection does not exist, it will be created.
      Specified by:
      addVertexCollection in interface ArangoGraph
      Parameters:
      name - Name of the vertex collection
      options - additional options
      Returns:
      information about the graph
      See Also:
    • vertexCollection

      public ArangoVertexCollection vertexCollection(String name)
      Description copied from interface: ArangoGraph
      Returns a ArangoVertexCollection instance for the given vertex collection name.
      Specified by:
      vertexCollection in interface ArangoGraph
      Parameters:
      name - Name of the vertex collection
      Returns:
      collection handler
    • edgeCollection

      public ArangoEdgeCollection edgeCollection(String name)
      Description copied from interface: ArangoGraph
      Returns a ArangoEdgeCollection instance for the given edge collection name.
      Specified by:
      edgeCollection in interface ArangoGraph
      Parameters:
      name - Name of the edge collection
      Returns:
      collection handler
    • getEdgeDefinitions

      public Collection<String> getEdgeDefinitions()
      Description copied from interface: ArangoGraph
      Fetches all edge collections from the graph and returns a list of collection names.
      Specified by:
      getEdgeDefinitions in interface ArangoGraph
      Returns:
      all edge collections within this graph
      See Also:
    • addEdgeDefinition

      public GraphEntity addEdgeDefinition(EdgeDefinition definition)
      Description copied from interface: ArangoGraph
      Adds the given edge definition to the graph.
      Specified by:
      addEdgeDefinition in interface ArangoGraph
      Parameters:
      definition - The edge definition
      Returns:
      information about the graph
      See Also:
    • replaceEdgeDefinition

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

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