public interface ArangoGraph extends ArangoSerializationAccessor
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 |
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. |
util, util
ArangoDatabase db()
String name()
boolean exists() throws ArangoDBException
ArangoDBException
GraphEntity create(Collection<EdgeDefinition> edgeDefinitions) throws ArangoDBException
edgeDefinitions
- An array of definitions for the edgeArangoDBException
GraphEntity create(Collection<EdgeDefinition> edgeDefinitions, GraphCreateOptions options) throws ArangoDBException
edgeDefinitions
- An array of definitions for the edgeoptions
- Additional options, can be nullArangoDBException
void drop() throws ArangoDBException
ArangoDBException
void drop(boolean dropCollections) throws ArangoDBException
dropCollections
- Drop collections of this graph as well. Collections will only be
dropped if they are not used in other graphs.ArangoDBException
GraphEntity getInfo() throws ArangoDBException
ArangoDBException
Collection<String> getVertexCollections() throws ArangoDBException
ArangoDBException
GraphEntity addVertexCollection(String name) throws ArangoDBException
name
- Name of the vertex collectionArangoDBException
ArangoVertexCollection 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() throws ArangoDBException
ArangoDBException
GraphEntity addEdgeDefinition(EdgeDefinition definition) throws ArangoDBException
definition
- The edge definitionArangoDBException
GraphEntity replaceEdgeDefinition(EdgeDefinition definition) throws ArangoDBException
definition
- The edge definitionArangoDBException
GraphEntity removeEdgeDefinition(String definitionName) throws ArangoDBException
definitionName
- The name of the edge collection used in the definitionArangoDBException
Copyright © 2016–2018 ArangoDB GmbH. All rights reserved.