Package oracle.pgx.api.graphalteration
Interface GraphAlterationBuilder
- All Known Subinterfaces:
GraphAlterationEmptyEdgeProviderBuilder,GraphAlterationEmptyProviderBuilder,GraphAlterationEmptyVertexProviderBuilder
public interface GraphAlterationBuilder
Builder to describe the alterations (graph schema modification) to perform to a graph.
It is for example possible to add or remove vertex and edge providers.
- Since:
- 20.1
-
Method Summary
Modifier and TypeMethodDescriptionaddEdgeProvider(String pathToEdgeProviderConfig) Adds an edge provider for which the configuration is in a file at the specified pathaddEdgeProvider(EntityProviderConfig edgeProviderConfig) Adds an edge provider specified by the provided configurationaddEmptyEdgeProvider(String providerName, String sourceProvider, String destProvider) Adds an empty edge provideraddEmptyVertexProvider(String providerName) Adds an empty vertex provideraddVertexProvider(String pathToVertexProviderConfig) Adds a vertex provider for which the configuration is in a file at the specified pathaddVertexProvider(EntityProviderConfig vertexProviderConfig) Adds a vertex provider specified by the provided configurationdefault PgxGraphbuild()Create a new graph that is the result of the alteration of the current graph.default PgxGraphCreate a new graph that is the result of the alteration of the current graph.Create a new graph that is the result of the alteration of the current graph.buildAsync(String newGraphName) Create a new graph that is the result of the alteration of the current graph.default PgxGraphCreate a new snapshot for the current graph that is the result of the alteration of the current snapshot.Create a new snapshot for the current graph that is the result of the alteration of the current snapshot.cascadeEdgeProviderRemovals(boolean cascadeEdgeProviderRemovals) Specifies if the edge providers associated to a vertex provider (the vertex provider is either the source or destination provider for that edge provider) being removed should be automatically removed too or not.removeEdgeProvider(String edgeProviderName) Removes the edge provider that has the given nameremoveVertexProvider(String vertexProviderName) Removes the vertex provider that has the given name.voidsetDataSourceVersion(String version) Sets the version information for the built graph or snapshot
-
Method Details
-
setDataSourceVersion
Sets the version information for the built graph or snapshot- Parameters:
version- the version information- Since:
- 21.1
-
cascadeEdgeProviderRemovals
Specifies if the edge providers associated to a vertex provider (the vertex provider is either the source or destination provider for that edge provider) being removed should be automatically removed too or not. By default, edge providers are not automatically removed whenever an associated vertex is removed. In that setting, if the associated edge providers are not specifically removed, an exception will be thrown to indicate that issue.- Parameters:
cascadeEdgeProviderRemovals- whether or not to automatically remove associated edge providers of removed vertex providers- Returns:
- the current alteration builder
-
addVertexProvider
Adds a vertex provider for which the configuration is in a file at the specified path- Parameters:
pathToVertexProviderConfig- the path to the JSON configuration of the vertex provider- Returns:
- the current alteration builder
- Throws:
IOException
-
addVertexProvider
Adds a vertex provider specified by the provided configuration- Parameters:
vertexProviderConfig- the configuration of the vertex provider to add- Returns:
- the current alteration builder
-
addEmptyVertexProvider
Adds an empty vertex provider- Parameters:
providerName- the name of the vertex provider to add- Returns:
- the builder to define the vertex provider
- Since:
- 21.4
-
removeVertexProvider
Removes the vertex provider that has the given name. Also removes the associated edge providers if true was specified when callingcascadeEdgeProviderRemovals(boolean).- Parameters:
vertexProviderName- the name of the provider to remove- Returns:
- the current alteration builder
-
addEdgeProvider
Adds an edge provider for which the configuration is in a file at the specified path- Parameters:
pathToEdgeProviderConfig- the path to the JSON configuration of the edge provider- Returns:
- the current alteration builder
- Throws:
IOException
-
addEdgeProvider
Adds an edge provider specified by the provided configuration- Parameters:
edgeProviderConfig- the configuration of the edge provider to add- Returns:
- the current alteration builder
-
addEmptyEdgeProvider
GraphAlterationEmptyEdgeProviderBuilder addEmptyEdgeProvider(String providerName, String sourceProvider, String destProvider) Adds an empty edge provider- Parameters:
providerName- the name of the edge provider to addsourceProvider- the name of the vertex provider for the source of the edgesdestProvider- the name of the vertex provider for the destination of the edges- Returns:
- the builder to define the edge provider
- Since:
- 21.4
-
removeEdgeProvider
Removes the edge provider that has the given name- Parameters:
edgeProviderName- the name of the provider to remove- Returns:
- the current alteration builder
-
buildAsync
Create a new graph that is the result of the alteration of the current graph.- Parameters:
newGraphName- name of the new graph to create- Returns:
- the current alteration builder
-
buildAsync
Create a new graph that is the result of the alteration of the current graph.- Returns:
- a reference to the created graph
-
build
Create a new graph that is the result of the alteration of the current graph. (Blocking version ofbuildAsync(String))- Parameters:
newGraphName- name of the new graph to create- Returns:
- a reference to the created graph
- Throws:
InterruptedException- if the caller thread gets interrupted while waiting for completion.ExecutionException- if any exception occurred during asynchronous execution. The actual exception will be nested.
-
build
Create a new graph that is the result of the alteration of the current graph. (Blocking version ofbuildAsync())- Returns:
- a reference to the created graph
- Throws:
InterruptedException- if the caller thread gets interrupted while waiting for completion.ExecutionException- if any exception occurred during asynchronous execution. The actual exception will be nested.
-
buildNewSnapshotAsync
Create a new snapshot for the current graph that is the result of the alteration of the current snapshot.- Returns:
- a reference to the created graph snapshot
-
buildNewSnapshot
Create a new snapshot for the current graph that is the result of the alteration of the current snapshot. (Blocking version ofbuildNewSnapshotAsync())- Returns:
- a reference to the created graph snapshot
- Throws:
InterruptedException- if the caller thread gets interrupted while waiting for completion.ExecutionException- if any exception occurred during asynchronous execution. The actual exception will be nested.
-