27.5.5.3 StrategyBuilder in General
By default, both the StrategyBuilders use the same values as in the convenience methods of simplify()
and undirect()
. This includes that all properties are kept by default. If one wants to drop specific properties, one can either use the dropVertexProperty()
or dropEdgeProperty()
functions.
MutationStrategyBuilder setNewGraphName(String newGraphName)
MutationStrategyBuilder setCopyMode(Mode mode)
MutationStrategyBuilder setTrivialVertices(TrivialVertices trivialVertices)
MutationStrategyBuilder setSelfEdges(SelfEdges selfEdges)
MutationStrategyBuilder setMultiEdges(MultiEdges multiEdges)
MutationStrategyBuilder dropVertexProperties(Collection<VertexProperty<?, ?>> vertexProperty)
MutationStrategyBuilder dropEdgeProperties(Collection<EdgeProperty<?>> edgeProperty)
MutationStrategyBuilder dropVertexProperty(VertexProperty<?, ?> vertexProperty)
MutationStrategyBuilder dropEdgeProperty(EdgeProperty<?> edgeProperty)
MutationStrategy build()
Simplify()
and undirect()
can be called using a MutationStrategy
as follows:
MutationStrategy strategy = strategyBuilder.build()
PgxGraph simplifiedGraph = graph.simplify(strategy)
//OR
PgxGraph undirectedGraph = graph.undirect(strategy)
Parent topic: Advanced Multi-Edge Handling