@ThreadSafe public interface ArangoGraph extends ArangoSerdeAccessor
Modifier and Type | Method and Description |
---|---|
GraphEntity |
addEdgeDefinition(EdgeDefinition definition)
Adds the given edge definition to the graph.
|
GraphEntity |
addVertexCollection(String name)
Adds a vertex collection to the set of collections of the graph.
|
GraphEntity |
addVertexCollection(String name,
VertexCollectionCreateOptions options)
Adds a vertex collection to the set of collections of the graph.
|
GraphEntity |
create(Collection<EdgeDefinition> edgeDefinitions)
Creates the graph in the graph module.
|
GraphEntity |
create(Collection<EdgeDefinition> edgeDefinitions,
GraphCreateOptions options)
Creates the graph in the graph module.
|
ArangoDatabase |
db()
The the handler of the database the named graph is within
|
void |
drop()
Deletes the graph from the database.
|
void |
drop(boolean dropCollections)
Deletes the graph from the database.
|
ArangoEdgeCollection |
edgeCollection(String name)
Returns a
ArangoEdgeCollection instance for the given edge collection name. |
boolean |
exists()
Checks whether the graph exists
|
Collection<String> |
getEdgeDefinitions()
Fetches all edge collections from the graph and returns a list of collection names.
|
GraphEntity |
getInfo()
Retrieves general information about the graph.
|
Collection<String> |
getVertexCollections()
Fetches all vertex collections from the graph and returns a list of collection names.
|
String |
name()
The name of the collection
|
GraphEntity |
removeEdgeDefinition(String definitionName)
Remove one edge definition from the graph.
|
GraphEntity |
replaceEdgeDefinition(EdgeDefinition definition)
Change one specific edge definition.
|
ArangoVertexCollection |
vertexCollection(String name)
Returns a
ArangoVertexCollection instance for the given vertex collection name. |
getSerde
ArangoDatabase db()
String name()
boolean exists()
GraphEntity create(Collection<EdgeDefinition> edgeDefinitions)
edgeDefinitions
- An array of definitions for the edgeGraphEntity create(Collection<EdgeDefinition> edgeDefinitions, GraphCreateOptions options)
edgeDefinitions
- An array of definitions for the edgeoptions
- Additional options, can be nullvoid drop()
void drop(boolean dropCollections)
dropCollections
- Drop collections of this graph as well. Collections will only be
dropped if they are not used in other graphs.GraphEntity getInfo()
Collection<String> getVertexCollections()
GraphEntity addVertexCollection(String name)
name
- Name of the vertex collectionGraphEntity addVertexCollection(String name, VertexCollectionCreateOptions options)
name
- Name of the vertex collectionoptions
- additional optionsArangoVertexCollection vertexCollection(String name)
ArangoVertexCollection
instance for the given vertex collection name.name
- Name of the vertex collectionArangoEdgeCollection edgeCollection(String name)
ArangoEdgeCollection
instance for the given edge collection name.name
- Name of the edge collectionCollection<String> getEdgeDefinitions()
GraphEntity addEdgeDefinition(EdgeDefinition definition)
definition
- The edge definitionGraphEntity replaceEdgeDefinition(EdgeDefinition definition)
definition
- The edge definitionGraphEntity removeEdgeDefinition(String definitionName)
definitionName
- The name of the edge collection used in the definitionCopyright © 2016–2023 ArangoDB GmbH. All rights reserved.