treebolic.control
Class Mounter

java.lang.Object
  extended by treebolic.control.Mounter

public class Mounter
extends java.lang.Object

Mounter

Author:
Bernard Bou

Constructor Summary
Mounter()
           
 
Method Summary
static boolean graft(INode thisMountingNode, INode thisMountedNode, java.util.List<IEdge> theseEdges, java.util.List<IEdge> theseMountedEdges)
          Graft mounted node onto mounting node
static INode prune(INode thisMountedNode, java.util.List<IEdge> theseEdges)
          Prune mounted children nodes, and remove orphaned edges
private static void removeSubtreeEdges(java.util.List<IEdge> theseEdges, INode thisMountedNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mounter

public Mounter()
Method Detail

graft

public static boolean graft(INode thisMountingNode,
                            INode thisMountedNode,
                            java.util.List<IEdge> theseEdges,
                            java.util.List<IEdge> theseMountedEdges)
Graft mounted node onto mounting node

Parameters:
thisMountingNode - grafting node
thisMountedNode - grafted node
theseEdges - edge list from mounting model
theseMountedEdges - edge list from mounted model
Returns:
true if successful, null otherwise

prune

public static INode prune(INode thisMountedNode,
                          java.util.List<IEdge> theseEdges)
Prune mounted children nodes, and remove orphaned edges

Parameters:
thisMountedNode - node
theseEdges - edge list to scan for orphaned edges
Returns:
mounting node if successful, null otherwise

removeSubtreeEdges

private static void removeSubtreeEdges(java.util.List<IEdge> theseEdges,
                                       INode thisMountedNode)