Modifier and Type | Class and Description |
---|---|
protected class |
GraphDiff.AttributeAdded |
protected class |
GraphDiff.AttributeChanged |
protected class |
GraphDiff.AttributeRemoved |
private class |
GraphDiff.Bridge |
protected class |
GraphDiff.EdgeAdded |
protected class |
GraphDiff.EdgeRemoved |
protected class |
GraphDiff.ElementEvent |
protected static class |
GraphDiff.ElementType |
protected class |
GraphDiff.Event |
protected class |
GraphDiff.GraphCleared |
protected class |
GraphDiff.NodeAdded |
protected class |
GraphDiff.NodeRemoved |
protected class |
GraphDiff.StepBegins |
Modifier and Type | Field and Description |
---|---|
private GraphDiff.Bridge |
bridge |
private LinkedList<GraphDiff.Event> |
events |
Constructor and Description |
---|
GraphDiff()
Create a new empty diff.
|
GraphDiff(Graph g1,
Graph g2)
Create a diff between two graphs.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Sink g1)
Considering this object is a diff between g1 and g2, calling this method
will applied changes on g1 such that g1 will look like g2.
|
void |
apply(String sourceId,
Sink g1) |
private void |
attributeDiff(GraphDiff.ElementType type,
Element e1,
Element e2) |
void |
end()
Stop to record changes.
|
static void |
main(String... args) |
void |
reset()
Clear all recorded changes.
|
void |
reverse(Sink g2)
Considering this object is a diff between g1 and g2, calling this method
will applied changes on g2 such that g2 will look like g1.
|
void |
reverse(String sourceId,
Sink g2) |
void |
start(Graph g)
Start to record changes.
|
String |
toString() |
private GraphDiff.Bridge bridge
private final LinkedList<GraphDiff.Event> events
public GraphDiff()
public void start(Graph g)
g
- the graph to start listening for changes.public void end()
public void reset()
public void apply(Sink g1)
g1
- public void reverse(Sink g2)
g2
- private void attributeDiff(GraphDiff.ElementType type, Element e1, Element e2)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses