edu.upenn.crimson
Class ObjectHandles

java.lang.Object
  extended by edu.upenn.crimson.ObjectHandles

public class ObjectHandles
extends java.lang.Object

ObjectHandles.

Version:
$Id: ObjectHandles.java,v 1.31 2007/05/16 18:55:58 fisher Exp $

Field Summary
private static javax.swing.DefaultComboBoxModel modelList
          This is a duplicate list of Models in the modelPool.
private static java.util.HashMap modelPool
          The HashMap of all existing Models.
private static ModelTableModel modelTableModel
          This is a duplicate list of Models in the modelPool.
private static java.util.HashMap partitionPool
          The HashMap of all existing Partitions.
private static java.util.HashMap queryPool
          The set of all existing Queries.
private static QueryTableModel queryTableModel
          This is a duplicate list of Queries in the queryPool.
private static javax.swing.DefaultComboBoxModel treeList
          This is a duplicate list of Trees in the treePool.
private static java.util.HashMap treePool
          The HashMap of all existing Trees.
private static TreeTableModel treeTableModel
          This is a duplicate list of Trees in the treePool.
 
Constructor Summary
ObjectHandles()
           
 
Method Summary
static void addModel(Model model)
          This will add the model to the relevant lists.
static void addPartition(Partition partition)
          This will add the partition to the relevant lists.
static void addQuery(Query query)
          This will add the query to the relevant lists.
static void addTree(Tree tree)
          This will add the tree to the relevant lists.
static void buildLists()
          This will (re)build the table lists based on the current connection.
static void clearLists()
          This will clear the lists.
static void clearModelLists()
          This will clear the Model lists.
static void clearPartitionLists()
          This will clear the Partition lists.
static void clearQueryLists()
          This will clear the Query lists.
static void clearTreeLists()
          This will clear the Tree lists.
static boolean containsModel(java.lang.String id)
          Returns true if the Model object exists in the modelPool.
static boolean containsPartition(java.lang.String id)
          Returns true if the Partition object exists in the partitionPool.
static boolean containsQuery(java.lang.String id)
          Returns true if the Query object exists in the queryPool.
static boolean containsTree(java.lang.String id)
          Returns true if the Tree object exists in the treePool.
static void deleteModel(java.lang.String id)
          This will delete the model from the relevant lists.
static void deleteQuery(java.lang.String id)
          This will delete the query from the relevant lists.
static Model getModel(java.lang.String id)
          Returns the Model object for the given ID.
static javax.swing.DefaultComboBoxModel getModelList()
           
static java.util.HashMap getModelPool()
           
static java.util.Set getModels()
          Returns the set of all Model IDs.
static ModelTableModel getModelTableModel()
           
static Partition getPartition(java.lang.String id)
          Returns the Partition object for the given ID.
static java.util.HashMap getPartitionPool()
           
static java.util.Set getPartitions()
          Returns the set of all Partition IDs.
static java.util.Set getQueries()
          Returns the set of all Query IDs.
static Query getQuery(java.lang.String id)
          Returns the Query object for the given ID.
static java.util.HashMap getQueryPool()
           
static QueryTableModel getQueryTableModel()
           
static Tree getTree(java.lang.String id)
          Returns the Tree object for the given ID.
static javax.swing.DefaultComboBoxModel getTreeList()
           
static java.util.HashMap getTreePool()
           
static java.util.Set getTrees()
          Returns the set of all Tree IDs.
static TreeTableModel getTreeTableModel()
           
static java.util.Iterator modelIterator()
          Returns a iterator over all Models in modelPool.
static java.util.Iterator partitionIterator()
          Returns a iterator over all Partitions in partitionPool.
static java.util.Iterator queryIterator()
          Returns a iterator over all Querys in queryPool.
static java.lang.String randomModelID(java.lang.String base)
          Uses 'base' to create a random Model ID string that doesn't already exist in the modelPool.
static java.lang.String randomQueryID(java.lang.String base)
          Uses 'base' to create a random Query ID string that doesn't already exist in the queryPool.
static java.lang.String randomTreeID(java.lang.String base)
          Uses 'base' to create a random Tree ID string that doesn't already exist in the treePool.
static java.util.Iterator treeIterator()
          Returns a iterator over all Trees in treePool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

treePool

private static java.util.HashMap treePool
The HashMap of all existing Trees. This is set by buildLists().


treeList

private static javax.swing.DefaultComboBoxModel treeList
This is a duplicate list of Trees in the treePool. It is used by the GUI.


treeTableModel

private static TreeTableModel treeTableModel
This is a duplicate list of Trees in the treePool. It is used by the GUI and is set by buildLists().


partitionPool

private static java.util.HashMap partitionPool
The HashMap of all existing Partitions. This is set by buildLists().


modelPool

private static java.util.HashMap modelPool
The HashMap of all existing Models. This is set by buildLists().


modelList

private static javax.swing.DefaultComboBoxModel modelList
This is a duplicate list of Models in the modelPool. It is used by the GUI.


modelTableModel

private static ModelTableModel modelTableModel
This is a duplicate list of Models in the modelPool. It is used by the GUI and is set by buildLists().


queryPool

private static java.util.HashMap queryPool
The set of all existing Queries. This is set by buildLists().


queryTableModel

private static QueryTableModel queryTableModel
This is a duplicate list of Queries in the queryPool. It is used by the GUI and is set by buildLists().

Constructor Detail

ObjectHandles

public ObjectHandles()
Method Detail

getTreePool

public static java.util.HashMap getTreePool()

getTreeList

public static javax.swing.DefaultComboBoxModel getTreeList()

getTreeTableModel

public static TreeTableModel getTreeTableModel()

getPartitionPool

public static java.util.HashMap getPartitionPool()

getModelPool

public static java.util.HashMap getModelPool()

getModelList

public static javax.swing.DefaultComboBoxModel getModelList()

getModelTableModel

public static ModelTableModel getModelTableModel()

getQueryPool

public static java.util.HashMap getQueryPool()

getQueryTableModel

public static QueryTableModel getQueryTableModel()

clearLists

public static void clearLists()
This will clear the lists.


buildLists

public static void buildLists()
This will (re)build the table lists based on the current connection.


clearTreeLists

public static void clearTreeLists()
This will clear the Tree lists.


addTree

public static void addTree(Tree tree)
This will add the tree to the relevant lists.


containsTree

public static boolean containsTree(java.lang.String id)
Returns true if the Tree object exists in the treePool.


getTree

public static Tree getTree(java.lang.String id)
Returns the Tree object for the given ID.

Notes:
Should throw an exception if 'id' is not found.

getTrees

public static java.util.Set getTrees()
Returns the set of all Tree IDs.


treeIterator

public static java.util.Iterator treeIterator()
Returns a iterator over all Trees in treePool.


randomTreeID

public static java.lang.String randomTreeID(java.lang.String base)
Uses 'base' to create a random Tree ID string that doesn't already exist in the treePool.


clearPartitionLists

public static void clearPartitionLists()
This will clear the Partition lists.


addPartition

public static void addPartition(Partition partition)
This will add the partition to the relevant lists.


containsPartition

public static boolean containsPartition(java.lang.String id)
Returns true if the Partition object exists in the partitionPool.


getPartition

public static Partition getPartition(java.lang.String id)
Returns the Partition object for the given ID.

Notes:
Should throw an exception if 'id' is not found.

getPartitions

public static java.util.Set getPartitions()
Returns the set of all Partition IDs.


partitionIterator

public static java.util.Iterator partitionIterator()
Returns a iterator over all Partitions in partitionPool.


clearModelLists

public static void clearModelLists()
This will clear the Model lists.


addModel

public static void addModel(Model model)
This will add the model to the relevant lists.


deleteModel

public static void deleteModel(java.lang.String id)
This will delete the model from the relevant lists.


containsModel

public static boolean containsModel(java.lang.String id)
Returns true if the Model object exists in the modelPool.


getModel

public static Model getModel(java.lang.String id)
Returns the Model object for the given ID.

Notes:
Should throw an exception if 'id' is not found.

getModels

public static java.util.Set getModels()
Returns the set of all Model IDs.


modelIterator

public static java.util.Iterator modelIterator()
Returns a iterator over all Models in modelPool.


randomModelID

public static java.lang.String randomModelID(java.lang.String base)
Uses 'base' to create a random Model ID string that doesn't already exist in the modelPool.


clearQueryLists

public static void clearQueryLists()
This will clear the Query lists.


addQuery

public static void addQuery(Query query)
This will add the query to the relevant lists.


deleteQuery

public static void deleteQuery(java.lang.String id)
This will delete the query from the relevant lists.


containsQuery

public static boolean containsQuery(java.lang.String id)
Returns true if the Query object exists in the queryPool.


getQuery

public static Query getQuery(java.lang.String id)
Returns the Query object for the given ID.

Notes:
Should throw an exception if 'id' is not found.

getQueries

public static java.util.Set getQueries()
Returns the set of all Query IDs.


queryIterator

public static java.util.Iterator queryIterator()
Returns a iterator over all Querys in queryPool.


randomQueryID

public static java.lang.String randomQueryID(java.lang.String base)
Uses 'base' to create a random Query ID string that doesn't already exist in the queryPool.




Copyright 2006 Stephen Fisher, Susan Davidson, and Junhyong Kim, University of Pennsylvania.