1
0
Fork 0
arangodb/Documentation/Books/Users/General-Graphs/Management.mdpp

111 lines
2.9 KiB
Plaintext

!CHAPTER Graph Management
Before we create our first graph, the philosophy of handling the graph content has to be introduced.
A graph contains of a set of edge definitions each referring to one edge collection and
defining constraints on the vertex collections used as start and end points of the edges.
Furthermore a graph can contain an arbitrary amount of vertex collections, called orphan collections, that are not used in any edge definition but should be managed by the graph.
In order to create a non empty graph the functionality to create edge definitions has to be introduced first:
!SECTION Edge Definitions
An edge definition is a directed or undirected relation of a graph. Each graph can have arbitrary many relations defined within the edge definitions array.
!SUBSECTION Initialize the list
@startDocuBlock JSF_general_graph_edge_definitions
!SUBSECTION Extend the list
@startDocuBlock JSF_general_graph_extend_edge_definitions
!SUBSUBSECTION Undirected Relation
@startDocuBlock JSF_general_graph_undirectedRelation
!SUBSUBSECTION Directed Relation
@startDocuBlock JSF_general_graph_directedRelation
!SUBSECTION Vertex Collections
Each graph can have an arbitrary amount of vertex collections, which are not part of any edge definition of the graph.
These collections are called orphan collections.
If the graph is extended with an edge definition using one of the orphans,
it will be removed from the set of orphan collection automatically.
!SUBSUBSECTION Add
@startDocuBlock JSF_general_graph__addVertexCollection
!SUBSUBSECTION Get
@startDocuBlock JSF_general_graph__orphanCollections
!SUBSUBSECTION Remove
@startDocuBlock JSF_general_graph__removeVertexCollection
!SECTION Create a graph
After having introduced edge definitions and orphan collections a graph can be created.
@startDocuBlock JSF_general_graph_create
!SUBSUBSECTION Complete Example to create a graph
Example Call:
@startDocuBlock JSF_general_graph_create_graph_example1
alternative call:
@startDocuBlock JSF_general_graph_create_graph_example2
!SUBSECTION List available graphs
@startDocuBlock JSF_general_graph_list
!SUBSECTION Load a graph
@startDocuBlock JSF_general_graph_graph
!SUBSECTION Remove a graph
@startDocuBlock JSF_general_graph_drop
!SECTION Vertex
!SUBSECTION Save
@startDocuBlock JSF_general_graph_vertex_collection_save
!SUBSECTION Replace
@startDocuBlock JSF_general_graph_vertex_collection_replace
!SUBSECTION Update
@startDocuBlock JSF_general_graph_vertex_collection_update
!SUBSECTION Remove
@startDocuBlock JSF_general_graph_vertex_collection_remove
!SECTION Edge
!SUBSECTION Save
@startDocuBlock JSF_general_graph_edge_collection_save
!SUBSECTION Replace
@startDocuBlock JSF_general_graph_edge_collection_replace
!SUBSECTION Update
@startDocuBlock JSF_general_graph_edge_collection_update
!SUBSECTION Remove
@startDocuBlock JSF_general_graph_edge_collection_remove