edu.upenn.crimson.gui
Class QueryUtils

java.lang.Object
  extended by edu.upenn.crimson.gui.QueryUtils

public class QueryUtils
extends java.lang.Object

Static methods used throughout the GUI for Query objects.

Version:
$Id: QueryUtils.java,v 1.6 2007/06/14 19:48:42 fisher Exp $

Constructor Summary
QueryUtils()
           
 
Method Summary
static void deleteQuery(java.lang.String id)
          This will delete the specified query.
static void editQuery(java.lang.String id)
          This will edit the query.
static void exportQuery(java.lang.String id)
          This will export a query as a python file.
static java.lang.String getQueryID(java.lang.String id)
          This will use a FieldEditDialog to ask the user for a query id.
static void importQuery()
          This will import a query from a python file.
static void loadQuery()
          This will load a query object from the databasee.
static void newQuery()
          This will create a new query object.
static void publishQuery(java.lang.String id)
          This will save the query to the database.
static java.lang.String querySelector()
          Present a dialog box for selecting a particular Query, from the set of queries in memory.
static java.lang.String querySelectorDB()
          Present a dialog box for selecting a particular Query, from the queries in the QUERIES table.
static void runQuery(java.lang.String id, java.lang.String file, boolean incSequence, int repeat)
          This will run the query.
static void runQueryDialog(java.lang.String id)
          This will run the query.
static void runQueryDialog(java.lang.String id, java.lang.String file, boolean incSequence, int repeat)
           
static void viewQuery(java.lang.String id)
          This will display the specified query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryUtils

public QueryUtils()
Method Detail

querySelector

public static java.lang.String querySelector()
Present a dialog box for selecting a particular Query, from the set of queries in memory.


querySelectorDB

public static java.lang.String querySelectorDB()
Present a dialog box for selecting a particular Query, from the queries in the QUERIES table.


getQueryID

public static java.lang.String getQueryID(java.lang.String id)
This will use a FieldEditDialog to ask the user for a query id.


newQuery

public static void newQuery()
This will create a new query object. The tree selector will be used to get the treeID.


loadQuery

public static void loadQuery()
This will load a query object from the databasee.


importQuery

public static void importQuery()
This will import a query from a python file.

Notes:
We don't use a file chooser here because we can only load

exportQuery

public static void exportQuery(java.lang.String id)
This will export a query as a python file.


publishQuery

public static void publishQuery(java.lang.String id)
This will save the query to the database.


runQueryDialog

public static void runQueryDialog(java.lang.String id)
This will run the query.


runQueryDialog

public static void runQueryDialog(java.lang.String id,
                                  java.lang.String file,
                                  boolean incSequence,
                                  int repeat)

runQuery

public static void runQuery(java.lang.String id,
                            java.lang.String file,
                            boolean incSequence,
                            int repeat)
This will run the query.

Notes:
Should run SaveFileChooser() if empty output file.

editQuery

public static void editQuery(java.lang.String id)
This will edit the query.


deleteQuery

public static void deleteQuery(java.lang.String id)
This will delete the specified query. If no query is specified, then the QuerySelector() will be used to choose a query.


viewQuery

public static void viewQuery(java.lang.String id)
This will display the specified query. If no query is specified, then the QuerySelector() will be used to choose a query.




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