Package com.arangodb

Interface ArangoGraph

    • Method Detail

      • db

        ArangoDatabase 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
      • create

        GraphEntity create​(Collection<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:
        API Documentation
      • create

        GraphEntity create​(Collection<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:
        API Documentation
      • 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:
        API Documentation
      • getInfo

        GraphEntity getInfo()
        Retrieves general information about the graph.
        Returns:
        the definition content of this graph
        See Also:
        API Documentation
      • 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:
        API Documentation
      • 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:
        API Documentation
      • 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:
        API Documentation
      • 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:
        API Documentation
      • 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:
        API Documentation
      • 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:
        API Documentation
      • 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:
        API Documentation