14.5.1.1.4 Removing Vertex or Edge Providers

You can remove an edge provider by calling alterationBuilder.removeEdgeProvider(String edgeProviderName), where edgeProviderName is the name of the edge provider to be removed from the graph.

Similarly, calling alterationBuilder.removeVertexProvider(String vertexProviderName) will result in the graph to not contain that specific vertex provider. If that vertex provider was the source or destination provider for some edge providers in the base graph, those edge providers should also be removed before the application of the alteration or an exception will be thrown.

It is possible to indicate that the edge providers associated to a removed vertex provider should be automatically removed by calling alterationBuilder.cascadeEdgeProviderRemovals(boolean cascadeEdgeProviderRemovals) with cascadeEdgeProviderRemovals set to true.