Package com.arangodb.internal
Class ArangoGraphImpl
java.lang.Object
com.arangodb.internal.ArangoExecuteable
com.arangodb.internal.InternalArangoGraph
com.arangodb.internal.ArangoGraphImpl
- All Implemented Interfaces:
ArangoGraph
,ArangoSerdeAccessor
- Author:
- Mark Vollmary
-
Field Summary
Fields inherited from class com.arangodb.internal.InternalArangoGraph
dbName, name, PATH_API_GHARIAL
-
Constructor Summary
Constructors -
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.replaceEdgeDefinition
(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 class com.arangodb.internal.InternalArangoGraph
addEdgeDefinitionRequest, addEdgeDefinitionResponseDeserializer, addVertexCollectionRequest, addVertexCollectionResponseDeserializer, dropRequest, dropRequest, getEdgeDefinitionsDeserializer, getEdgeDefinitionsRequest, getInfoRequest, getInfoResponseDeserializer, getVertexCollectionsRequest, getVertexCollectionsResponseDeserializer, name, replaceEdgeDefinitionRequest, replaceEdgeDefinitionResponseDeserializer
Methods inherited from class com.arangodb.internal.ArangoExecuteable
createPath, executorAsync, executorSync, getSerde, request
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.arangodb.ArangoGraph
name
Methods inherited from interface com.arangodb.ArangoSerdeAccessor
getSerde
-
Constructor Details
-
ArangoGraphImpl
-
-
Method Details
-
db
Description copied from interface:ArangoGraph
The the handler of the database the named graph is within- Specified by:
db
in interfaceArangoGraph
- Returns:
- database handler
-
exists
public boolean exists()Description copied from interface:ArangoGraph
Checks whether the graph exists- Specified by:
exists
in interfaceArangoGraph
- Returns:
- true if the graph exists, otherwise false
- See Also:
-
create
Description copied from interface:ArangoGraph
Creates the graph in the graph module. The creation of a graph requires the name of the graph and a definition of its edges.- Specified by:
create
in interfaceArangoGraph
- Parameters:
edgeDefinitions
- An array of definitions for the edge- Returns:
- information about the graph
- See Also:
-
create
Description copied from interface:ArangoGraph
Creates the graph in the graph module. The creation of a graph requires the name of the graph and a definition of its edges.- Specified by:
create
in interfaceArangoGraph
- Parameters:
edgeDefinitions
- An array of definitions for the edgeoptions
- Additional options, can be null- Returns:
- information about the graph
- See Also:
-
drop
public void drop()Description copied from interface:ArangoGraph
Deletes the graph from the database.- Specified by:
drop
in interfaceArangoGraph
- See Also:
-
drop
public void drop(boolean dropCollections) Description copied from interface:ArangoGraph
Deletes the graph from the database.- Specified by:
drop
in interfaceArangoGraph
- 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
Description copied from interface:ArangoGraph
Retrieves general information about the graph.- Specified by:
getInfo
in interfaceArangoGraph
- Returns:
- the definition content of this graph
- See Also:
-
getVertexCollections
Description copied from interface:ArangoGraph
Fetches all vertex collections from the graph and returns a list of collection names.- Specified by:
getVertexCollections
in interfaceArangoGraph
- Returns:
- all vertex collections within this graph
- See Also:
-
addVertexCollection
Description copied from interface:ArangoGraph
Adds a vertex collection to the set of collections of the graph. If the collection does not exist, it will be created.- Specified by:
addVertexCollection
in interfaceArangoGraph
- Parameters:
name
- Name of the vertex collection- Returns:
- information about the graph
- See Also:
-
addVertexCollection
Description copied from interface:ArangoGraph
Adds a vertex collection to the set of collections of the graph. If the collection does not exist, it will be created.- Specified by:
addVertexCollection
in interfaceArangoGraph
- Parameters:
name
- Name of the vertex collectionoptions
- additional options- Returns:
- information about the graph
- See Also:
-
vertexCollection
Description copied from interface:ArangoGraph
Returns aArangoVertexCollection
instance for the given vertex collection name.- Specified by:
vertexCollection
in interfaceArangoGraph
- Parameters:
name
- Name of the vertex collection- Returns:
- collection handler
-
edgeCollection
Description copied from interface:ArangoGraph
Returns aArangoEdgeCollection
instance for the given edge collection name.- Specified by:
edgeCollection
in interfaceArangoGraph
- Parameters:
name
- Name of the edge collection- Returns:
- collection handler
-
getEdgeDefinitions
Description copied from interface:ArangoGraph
Fetches all edge collections from the graph and returns a list of collection names.- Specified by:
getEdgeDefinitions
in interfaceArangoGraph
- Returns:
- all edge collections within this graph
- See Also:
-
addEdgeDefinition
Description copied from interface:ArangoGraph
Adds the given edge definition to the graph.- Specified by:
addEdgeDefinition
in interfaceArangoGraph
- Parameters:
definition
- The edge definition- Returns:
- information about the graph
- See Also:
-
replaceEdgeDefinition
Description copied from interface:ArangoGraph
Change one specific edge definition. This will modify all occurrences of this definition in all graphs known to your database- Specified by:
replaceEdgeDefinition
in interfaceArangoGraph
- Parameters:
definition
- The edge definition- Returns:
- information about the graph
- See Also:
-
replaceEdgeDefinition
public GraphEntity replaceEdgeDefinition(EdgeDefinition definition, ReplaceEdgeDefinitionOptions options) Description copied from interface:ArangoGraph
Change one specific edge definition. This will modify all occurrences of this definition in all graphs known to your database- Specified by:
replaceEdgeDefinition
in interfaceArangoGraph
- Parameters:
definition
- The edge definitionoptions
- options- Returns:
- information about the graph
- See Also:
-