Package com.arangodb
Interface ArangoGraph
-
- All Superinterfaces:
ArangoSerdeAccessor
@ThreadSafe public interface ArangoGraph extends ArangoSerdeAccessor
Interface for operations on ArangoDB graph level.- Author:
- Mark Vollmary
- See Also:
- API Documentation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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(Iterable<EdgeDefinition> edgeDefinitions)
Creates the graph in the graph module.GraphEntity
create(Iterable<EdgeDefinition> edgeDefinitions, GraphCreateOptions options)
Creates the graph in the graph module.ArangoDatabase
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.ArangoEdgeCollection
edgeCollection(String name)
Returns aArangoEdgeCollection
instance for the given edge collection name.boolean
exists()
Checks whether the graph existsCollection<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 collectionGraphEntity
replaceEdgeDefinition(EdgeDefinition definition)
Change one specific edge definition.GraphEntity
replaceEdgeDefinition(EdgeDefinition definition, ReplaceEdgeDefinitionOptions options)
Change one specific edge definition.ArangoVertexCollection
vertexCollection(String name)
Returns aArangoVertexCollection
instance for the given vertex collection name.-
Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
-
-
-
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(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:
- API Documentation
-
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 edgeoptions
- Additional options, can be null- Returns:
- information about the graph
- See Also:
- API Documentation
-
drop
void drop()
Deletes the graph from the database.- 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 collectionoptions
- additional options- Returns:
- information about the graph
- Since:
- ArangoDB 3.9
- See Also:
- API Documentation
-
vertexCollection
ArangoVertexCollection vertexCollection(String name)
Returns aArangoVertexCollection
instance for the given vertex collection name.- Parameters:
name
- Name of the vertex collection- Returns:
- collection handler
-
edgeCollection
ArangoEdgeCollection edgeCollection(String name)
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:
- 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 definitionoptions
- options- Returns:
- information about the graph
- See Also:
- API Documentation
-
-