Package com.arangodb
Interface ArangoGraph
- All Superinterfaces:
ArangoSerdeAccessor
- All Known Implementing Classes:
ArangoGraphImpl
Interface for operations on ArangoDB graph level.
- Author:
- Mark Vollmary
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddEdgeDefinition
(EdgeDefinition definition) Adds the given edge definition to the graph.addVertexCollection
(String name) Adds a vertex collection to the set of collections of the graph.addVertexCollection
(String name, VertexCollectionCreateOptions options) Adds a vertex collection to the set of collections of the graph.create
(Iterable<EdgeDefinition> edgeDefinitions) Creates the graph in the graph module.create
(Iterable<EdgeDefinition> edgeDefinitions, GraphCreateOptions options) Creates the graph in the graph module.db()
The the handler of the database the named graph is withinvoid
drop()
Deletes the graph from the database.void
drop
(boolean dropCollections) Deletes the graph from the database.edgeCollection
(String name) Returns aArangoEdgeCollection
instance for the given edge collection name.boolean
exists()
Checks whether the graph existsFetches all edge collections from the graph and returns a list of collection names.getInfo()
Retrieves general information about the graph.Fetches all vertex collections from the graph and returns a list of collection names.name()
The name of the collectionreplaceEdgeDefinition
(EdgeDefinition definition) Change one specific edge definition.replaceEdgeDefinition
(EdgeDefinition definition, ReplaceEdgeDefinitionOptions options) Change one specific edge definition.vertexCollection
(String name) Returns aArangoVertexCollection
instance for the given vertex collection name.Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
Method Details
-
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
- See Also:
-
create
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
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 edgeoptions
- 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
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
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 collectionoptions
- additional options- Returns:
- information about the graph
- Since:
- ArangoDB 3.9
- See Also:
-
vertexCollection
Returns aArangoVertexCollection
instance for the given vertex collection name.- Parameters:
name
- Name of the vertex collection- Returns:
- collection handler
-
edgeCollection
Returns aArangoEdgeCollection
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
Adds the given edge definition to the graph.- Parameters:
definition
- The edge definition- Returns:
- information about the graph
- See Also:
-
replaceEdgeDefinition
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
Change one specific edge definition. This will modify all occurrences of this definition in all graphs known to your database- Parameters:
definition
- The edge definitionoptions
- options- Returns:
- information about the graph
- See Also:
-