|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.base.GraphCopyFactory
public class GraphCopyFactory
Very simple default implementation of a Copy Factory that creates Graph
instances
and simply delegates to the Graph.createNode()
and
Graph.createEdge(Node, Node)
method.
Constructor Summary | |
---|---|
GraphCopyFactory()
|
Method Summary | |
---|---|
Edge |
copyEdge(Graph targetGraph,
Node source,
Node target,
Edge originalEdge)
Copies the originalEdge from the source graph to the new targetGraph
using the specified new source and target node in the target graph. |
Node |
copyNode(Graph targetGraph,
Node originalNode)
Copies the originalNode from the source graph to the new targetGraph |
Graph |
createGraph()
Creates a new Graph . |
void |
postCopyGraphData(Graph originalGraph,
Graph newGraph,
java.util.Map nodeMap,
java.util.Map edgeMap)
This implementation does nothing. |
void |
preCopyGraphData(Graph hint,
Graph newGraph)
This implementation does nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphCopyFactory()
Method Detail |
---|
public void preCopyGraphData(Graph hint, Graph newGraph)
preCopyGraphData
in interface GraphCopier.CopyFactory
hint
- the graph that will be used to copy the entities from.newGraph
- the graph that will be used to copy the entities to.public void postCopyGraphData(Graph originalGraph, Graph newGraph, java.util.Map nodeMap, java.util.Map edgeMap)
postCopyGraphData
in interface GraphCopier.CopyFactory
originalGraph
- the graph that was used to copy the entities from.newGraph
- the graph that was used to copy the entities to.nodeMap
- a map that contains a mapping between the nodes in the source graph
to their corresponding nodes in the new graph.edgeMap
- a map that contains a mapping between the edges in the source graph
to their corresponding edges in the new graph.public Node copyNode(Graph targetGraph, Node originalNode)
GraphCopier.CopyFactory
originalNode
from the source graph to the new targetGraph
copyNode
in interface GraphCopier.CopyFactory
targetGraph
- the graph to create the new node inoriginalNode
- the original node from the source graph
public Edge copyEdge(Graph targetGraph, Node source, Node target, Edge originalEdge)
GraphCopier.CopyFactory
originalEdge
from the source graph to the new targetGraph
using the specified new source and target node in the target graph.
copyEdge
in interface GraphCopier.CopyFactory
targetGraph
- the graph to create the new node insource
- the source node in the target graph to use for the newly created edgetarget
- the target node in the target graph to use for the newly created edgeoriginalEdge
- the original edge from the source graph
public Graph createGraph()
Graph
.
createGraph
in interface GraphCopier.CopyFactory
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |