|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.iastate.metnet.metaomgraph.utils.Utils
public class Utils
| Field Summary | |
|---|---|
static int |
AFFY25K
|
static int |
AFFY8K
|
static int |
LOCUS
|
static int |
NONE
|
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static java.io.File |
chooseFileToOpen()
|
static java.io.File |
chooseFileToOpen(javax.swing.filechooser.FileFilter filter,
java.awt.Component parent)
|
static java.io.File |
chooseFileToSave()
|
static java.io.File |
chooseFileToSave(javax.swing.filechooser.FileFilter filter,
java.lang.String extension,
java.awt.Component parent,
boolean forceExtension)
Displays a JFileChooser that lets the user select a destination file. |
static java.lang.String |
clean(java.lang.String cleanMe)
Strips off spaces and quotes from the ends of a String. |
static java.lang.String |
convertToValidElementName(java.lang.String convertMe)
|
static javax.swing.filechooser.FileFilter |
createFileFilter(java.lang.String[] extensions,
java.lang.String description)
|
static javax.swing.filechooser.FileFilter |
createFileFilter(java.lang.String extension,
java.lang.String description)
|
static java.lang.String |
getExtension(java.io.File f)
Determines the extension of a given file. |
static java.lang.String |
getExtension(java.lang.String filename)
|
static java.util.ArrayList<Gene> |
getGeneInfo(java.lang.String geneList,
java.util.ArrayList<java.lang.String> attribs)
Gets gene info from AtGeneSearch for a given list of genes. |
static int |
getIDType(java.lang.String geneID)
Determines whether the given String is a Locus ID, Affy8k ID, Affy8k ID, or none of the above. |
static java.io.File |
getLastDir()
Retrieves the directory last accessed by the user (as set by setLastDir(File). |
static java.lang.String[][] |
getMetNetInfo(java.lang.Object[] ids)
|
static java.lang.String[] |
getMetNetInfo(java.lang.String searchMe)
|
static java.util.Hashtable<java.lang.String,java.lang.String> |
getPathwayInfo()
|
static java.lang.String |
getPathwayInfo(java.lang.String entityID)
|
static java.lang.String |
getPOName(java.lang.String POTerm)
|
static boolean |
isGeneID(java.lang.String checkMe)
Determines if the given String represents a gene ID. |
static boolean |
isIn(int findMe,
int[] entries)
|
static int |
linearSearch(java.lang.Object[] array,
java.lang.Object findMe)
Searches a given array for a given value. |
static java.lang.String |
makeQueryString(java.sql.ResultSet rs,
java.lang.String column,
java.lang.String name)
Compiles a String for querying a MySQL database from the results of a previous query. |
static java.lang.String |
makeQueryString(java.lang.String[] values,
java.lang.String column)
|
static java.lang.String |
makeQueryString(java.util.Vector values,
java.lang.String column)
|
static java.lang.String[][] |
newgetMetNetInfo(java.lang.Object[] ids)
|
static void |
setLastDir(java.io.File newLastDir)
Sets the directory last accessed by the user. |
static void |
setSearchFieldColors(javax.swing.JTextField field,
boolean found)
Used for setting the colors of a JTextField based on the results of a search. |
static void |
sizeColumnWidthToFit(javax.swing.JTable table)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOCUS
public static final int AFFY8K
public static final int AFFY25K
public static final int NONE
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static boolean isIn(int findMe,
int[] entries)
public static java.lang.String clean(java.lang.String cleanMe)
cleanMe - The String to clean.
public static java.lang.String getExtension(java.io.File f)
f - The file from which to get an extension.
public static java.lang.String getExtension(java.lang.String filename)
public static boolean isGeneID(java.lang.String checkMe)
checkMe - The String to check
public static int getIDType(java.lang.String geneID)
geneID - The ID to check
public static java.lang.String makeQueryString(java.sql.ResultSet rs,
java.lang.String column,
java.lang.String name)
throws java.sql.SQLException
rs - The ResultSet to use to create this String. After this method
runs, rs.isAfterLast() will return true.column - The column from the ResultSet that has the values to query.name - The name of the column to use in
java.sql.SQLException
public static java.lang.String makeQueryString(java.lang.String[] values,
java.lang.String column)
public static java.lang.String makeQueryString(java.util.Vector values,
java.lang.String column)
public static java.lang.String[][] newgetMetNetInfo(java.lang.Object[] ids)
public static java.lang.String[][] getMetNetInfo(java.lang.Object[] ids)
public static java.lang.String[] getMetNetInfo(java.lang.String searchMe)
public static java.util.Hashtable<java.lang.String,java.lang.String> getPathwayInfo()
public static java.lang.String getPathwayInfo(java.lang.String entityID)
public static java.io.File chooseFileToOpen()
public static java.io.File chooseFileToOpen(javax.swing.filechooser.FileFilter filter,
java.awt.Component parent)
public static java.io.File chooseFileToSave(javax.swing.filechooser.FileFilter filter,
java.lang.String extension,
java.awt.Component parent,
boolean forceExtension)
filter - a filter for the file display. If null, all files will be
displayed.extension - an extension to add to the file name. If null, no extension
will be added.parent - a parent component for the JFileChooser.forceExtension - if true, the destination file will have the specified
extension. If false, the specified extension will only be
added if no other extension is specified.
public static java.io.File getLastDir()
setLastDir(File).
public static void setLastDir(java.io.File newLastDir)
lastDir - the last directory the user accessedpublic static java.io.File chooseFileToSave()
public static int linearSearch(java.lang.Object[] array,
java.lang.Object findMe)
array - the array to searchfindMe - the value to find
public static java.lang.String getPOName(java.lang.String POTerm)
public static void setSearchFieldColors(javax.swing.JTextField field,
boolean found)
field - the JTextField to colorfound - whether or not the search was successful
public static java.util.ArrayList<Gene> getGeneInfo(java.lang.String geneList,
java.util.ArrayList<java.lang.String> attribs)
geneList - a semicolon-delimited list of genesattribs - the attributes to get, or null to get all AtGeneSearch info
edu.iastate.metnet.datamodel.db.Genespublic static void sizeColumnWidthToFit(javax.swing.JTable table)
public static javax.swing.filechooser.FileFilter createFileFilter(java.lang.String[] extensions,
java.lang.String description)
public static javax.swing.filechooser.FileFilter createFileFilter(java.lang.String extension,
java.lang.String description)
public static java.lang.String convertToValidElementName(java.lang.String convertMe)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||