ca.sqlpower.architect
Class DepthFirstSearch

java.lang.Object
  extended by ca.sqlpower.architect.DepthFirstSearch

public class DepthFirstSearch
extends java.lang.Object

The DepthFirstSearch class performs a depth-first search on a SQLDatabase, treating it as a graph where the SQLTable objects are the vertices and SQLRelationships are the edges that connect them.

Version:
$Id: DepthFirstSearch.java 2509 2008-08-13 22:04:51Z jfuerth $
Author:
fuerth

Constructor Summary
DepthFirstSearch(java.util.List<SQLTable> tables)
           
DepthFirstSearch(SQLDatabase db)
           
 
Method Summary
 java.util.List<SQLTable> getFinishOrder()
          Gives back the order in which the vertices of these graphs were finished (coloured black) by the DFS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthFirstSearch

public DepthFirstSearch(SQLDatabase db)
                 throws ArchitectException
Throws:
ArchitectException

DepthFirstSearch

public DepthFirstSearch(java.util.List<SQLTable> tables)
                 throws ArchitectException
Throws:
ArchitectException
Method Detail

getFinishOrder

public java.util.List<SQLTable> getFinishOrder()
Gives back the order in which the vertices of these graphs were finished (coloured black) by the DFS. This list will be a topological sort of the graph.

See finishOrder.



Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca