Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

apollo.dataadapter.ensj
Class EnsJAdapterGUI  view EnsJAdapterGUI download EnsJAdapterGUI.java

java.lang.Object
  extended byAbstractDataAdapterUI
      extended byapollo.dataadapter.ensj.EnsJAdapterGUI
Direct Known Subclasses:
AnnotationEnsJAdapterGUI

public class EnsJAdapterGUI
extends AbstractDataAdapterUI

Configuration GUI for the EnsJAdapter class. It enables the user to specify:

This class interacts with the Apollo history framework by getting and setting various history parameters.

Usage: the user should add the line DataAdapterInstall "apollo.dataadapter.ensj.EnsJAdapter" to her apollo.cfg file. The Adaptor and this GUI will then be made available from the initial apollo screen.

Originally based on EnsCGIAdaptorGUI.


Nested Class Summary
 class EnsJAdapterGUI.DataTypeButton
           
private  class EnsJAdapterGUI.FocusSelectsButton
          A focus listener which sets button.selected(true) when focus gained.
 
Field Summary
private  DataAdapter adapter
           
private  javax.swing.JPanel assemblyLocationPanel
           
private  java.awt.event.ActionListener chrAction
           
private  javax.swing.JRadioButton chrButton
           
private  javax.swing.JComboBox chrStartEndList
           
private  java.util.Vector chrStartEndVector
           
private  javax.swing.JTextField chrTextBox
           
private  java.awt.event.ActionListener cloneFragmentAction
           
private  javax.swing.JRadioButton cloneFragmentButton
           
private  java.util.Vector cloneFragmentHistory
           
private  javax.swing.JComboBox cloneFragmentList
           
private  javax.swing.Box cloneFragmentPanel
           
private  javax.swing.JTextField cloneFragmentTextBox
           
private  DataSourceConfigurationPanel coreDriverConfigPanel
           
private  EnsJAdapterGUI.DataTypeButton[] dataTypeButtons
           
private static java.lang.String DEFAULT_CONFIG_FILE
           
private  javax.swing.JTextField endTextBox
           
private static java.lang.String HELP_URL
           
private  java.util.Properties initialSettings
           
 javax.swing.JPanel locationPanel
           
private  LoggingConfPanel loggingConfPanel
           
private  java.lang.String loggingFile
          Holds the logging file parameter passed in from the history file.
private static int MAX_HISTORY_LENGTH
           
private  IOOperation op
           
private  javax.swing.JButton seqDriverButton
           
private  java.util.Properties seqDriverProperties
           
private  DataSourceConfigurationPanel sequenceDriverConfigPanel
           
private  java.awt.event.ActionListener stableIDAction
           
private  javax.swing.JRadioButton stableIDButton
           
private  java.util.Vector stableIDHistory
           
private  javax.swing.JComboBox stableIDList
           
private  javax.swing.JTextField startTextBox
           
private  DataSourceConfigurationPanel variationDriverConfigPanel
           
 
Constructor Summary
EnsJAdapterGUI(IOOperation op)
           
 
Method Summary
private  void addDefault(java.util.Vector v, java.lang.String filename)
          Attempt to locate and add fully qualified path correspnding to filename to vector.
(package private) static java.lang.String booleanToString(boolean v)
           
protected  java.awt.Component buildDriverPanel()
           
protected  void buildGUI()
           
private  javax.swing.JPanel buildHelpPanel()
           
protected  javax.swing.JPanel buildIncludePanel()
           
protected  javax.swing.JPanel buildLocationPanel()
           
protected  javax.swing.border.TitledBorder createBorder(java.lang.String label)
           
protected  java.util.Properties createStateInformation()
           
 java.lang.Object doOperation(java.lang.Object values)
          Initialises driver and uses it to return a currationSet.
private  java.lang.String findFile(java.lang.String file)
          Trys to locate file using apollo's Config class first and by searching the classpath second.
protected  java.awt.event.ActionListener getChrAction()
           
 javax.swing.JRadioButton getChrButton()
           
 javax.swing.JComboBox getChrStartEndList()
           
 javax.swing.JTextField getChrTextBox()
           
protected  javax.swing.JRadioButton getCloneFragmentButton()
           
 javax.swing.Box getCloneFragmentPanel()
           
 DataAdapter getDataAdapter()
           
protected  EnsJAdapterGUI.DataTypeButton[] getDataTypeButtons()
           
 javax.swing.JTextField getEndTextBox()
           
protected  java.util.Properties getInitialSettings()
           
 javax.swing.JPanel getLocationPanel()
           
protected  java.util.Vector getPrefixedProperties(java.util.Properties settings, java.lang.String prefix, boolean convertValueToFilePath)
          Construct a vector containing all the values of properties with a key that begins with _prefix_.
 java.util.Properties getProperties()
           
 java.lang.String getSelectedChr()
           
 java.lang.String getSelectedChrStartEnd()
           
protected  java.lang.String getSelectedCloneFragment()
           
 java.lang.String getSelectedEnd()
           
 java.lang.String getSelectedStableID()
           
 java.lang.String getSelectedStart()
           
 javax.swing.JRadioButton getStableIdButton()
           
 javax.swing.JTextField getStartTextBox()
           
static void main(java.lang.String[] args)
           
private  void makeFirstElement(java.lang.Object element, java.util.Vector vector)
          The element is placed at the front of the vector.
static apollo.datamodel.GenomicRange parseChrStartEndString(java.lang.String str)
           
protected  void putPrefixedProperties(java.util.Properties settings, java.util.Vector values, java.lang.String prefix)
          Puts each element from _values_ into _settings_.
 void setDataAdapter(DataAdapter adapter)
           
 void setProperties(java.util.Properties in)
          Loads history values into 'drop down' lists and other GUI components.
 void setSelectedStableId(java.lang.String stableId)
           
(package private) static boolean stringToBoolean(java.lang.String v)
           
private  java.lang.String validateRegionSpecified()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONFIG_FILE

private static final java.lang.String DEFAULT_CONFIG_FILE
See Also:
Constant Field Values

MAX_HISTORY_LENGTH

private static final int MAX_HISTORY_LENGTH
See Also:
Constant Field Values

HELP_URL

private static java.lang.String HELP_URL

seqDriverButton

private javax.swing.JButton seqDriverButton

loggingConfPanel

private LoggingConfPanel loggingConfPanel

chrButton

private javax.swing.JRadioButton chrButton

chrStartEndList

private javax.swing.JComboBox chrStartEndList

chrTextBox

private javax.swing.JTextField chrTextBox

startTextBox

private javax.swing.JTextField startTextBox

endTextBox

private javax.swing.JTextField endTextBox

chrAction

private java.awt.event.ActionListener chrAction

chrStartEndVector

private java.util.Vector chrStartEndVector

cloneFragmentButton

private javax.swing.JRadioButton cloneFragmentButton

cloneFragmentList

private javax.swing.JComboBox cloneFragmentList

cloneFragmentTextBox

private javax.swing.JTextField cloneFragmentTextBox

cloneFragmentAction

private java.awt.event.ActionListener cloneFragmentAction

cloneFragmentHistory

private java.util.Vector cloneFragmentHistory

stableIDButton

private javax.swing.JRadioButton stableIDButton

stableIDList

private javax.swing.JComboBox stableIDList

stableIDAction

private java.awt.event.ActionListener stableIDAction

stableIDHistory

private java.util.Vector stableIDHistory

dataTypeButtons

private EnsJAdapterGUI.DataTypeButton[] dataTypeButtons

assemblyLocationPanel

private javax.swing.JPanel assemblyLocationPanel

cloneFragmentPanel

private javax.swing.Box cloneFragmentPanel

adapter

private DataAdapter adapter

op

private IOOperation op

initialSettings

private java.util.Properties initialSettings

seqDriverProperties

private java.util.Properties seqDriverProperties

coreDriverConfigPanel

private DataSourceConfigurationPanel coreDriverConfigPanel

variationDriverConfigPanel

private DataSourceConfigurationPanel variationDriverConfigPanel

sequenceDriverConfigPanel

private DataSourceConfigurationPanel sequenceDriverConfigPanel

loggingFile

private java.lang.String loggingFile
Holds the logging file parameter passed in from the history file. An exception will be thrown in createStateInformation() if this is null.


locationPanel

public javax.swing.JPanel locationPanel
Constructor Detail

EnsJAdapterGUI

public EnsJAdapterGUI(IOOperation op)
Method Detail

parseChrStartEndString

public static apollo.datamodel.GenomicRange parseChrStartEndString(java.lang.String str)

getPrefixedProperties

protected java.util.Vector getPrefixedProperties(java.util.Properties settings,
                                                 java.lang.String prefix,
                                                 boolean convertValueToFilePath)
Construct a vector containing all the values of properties with a key that begins with _prefix_. The indexes should begin at 0 and be consecutive. Example key/value format expected:
 cloneFragmentItem0=3333
 cloneFragmentItem1=55
 


putPrefixedProperties

protected void putPrefixedProperties(java.util.Properties settings,
                                     java.util.Vector values,
                                     java.lang.String prefix)
Puts each element from _values_ into _settings_. Each element is given a unique name beginning with _prefix_. An additional element is added to the vector containing the number of elements. This is the inverse of "getPrefixedProperties()"


addDefault

private void addDefault(java.util.Vector v,
                        java.lang.String filename)
Attempt to locate and add fully qualified path correspnding to filename to vector.


setProperties

public void setProperties(java.util.Properties in)
Loads history values into 'drop down' lists and other GUI components. Uses defaults where necessary.


getProperties

public java.util.Properties getProperties()

booleanToString

static java.lang.String booleanToString(boolean v)

stringToBoolean

static boolean stringToBoolean(java.lang.String v)

makeFirstElement

private void makeFirstElement(java.lang.Object element,
                              java.util.Vector vector)
The element is placed at the front of the vector. If it is already present in the vector is moved from that position to the front.


createBorder

protected javax.swing.border.TitledBorder createBorder(java.lang.String label)

buildLocationPanel

protected javax.swing.JPanel buildLocationPanel()

buildIncludePanel

protected javax.swing.JPanel buildIncludePanel()

buildHelpPanel

private javax.swing.JPanel buildHelpPanel()

buildDriverPanel

protected java.awt.Component buildDriverPanel()

buildGUI

protected void buildGUI()

setDataAdapter

public void setDataAdapter(DataAdapter adapter)

getDataAdapter

public DataAdapter getDataAdapter()

getSelectedStableID

public java.lang.String getSelectedStableID()

getSelectedCloneFragment

protected java.lang.String getSelectedCloneFragment()

getSelectedChrStartEnd

public java.lang.String getSelectedChrStartEnd()

getSelectedChr

public java.lang.String getSelectedChr()

getSelectedStart

public java.lang.String getSelectedStart()

getSelectedEnd

public java.lang.String getSelectedEnd()

validateRegionSpecified

private java.lang.String validateRegionSpecified()

doOperation

public java.lang.Object doOperation(java.lang.Object values)
                             throws org.bdgp.io.DataAdapterException
Initialises driver and uses it to return a currationSet.


createStateInformation

protected java.util.Properties createStateInformation()
                                               throws apollo.dataadapter.DataAdapterException

getChrTextBox

public javax.swing.JTextField getChrTextBox()

getStartTextBox

public javax.swing.JTextField getStartTextBox()

getEndTextBox

public javax.swing.JTextField getEndTextBox()

findFile

private java.lang.String findFile(java.lang.String file)
Trys to locate file using apollo's Config class first and by searching the classpath second.


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception

getChrAction

protected java.awt.event.ActionListener getChrAction()

getChrStartEndList

public javax.swing.JComboBox getChrStartEndList()

getChrButton

public javax.swing.JRadioButton getChrButton()

getCloneFragmentButton

protected javax.swing.JRadioButton getCloneFragmentButton()

getStableIdButton

public javax.swing.JRadioButton getStableIdButton()

getDataTypeButtons

protected EnsJAdapterGUI.DataTypeButton[] getDataTypeButtons()

getInitialSettings

protected java.util.Properties getInitialSettings()

getCloneFragmentPanel

public javax.swing.Box getCloneFragmentPanel()

getLocationPanel

public javax.swing.JPanel getLocationPanel()

setSelectedStableId

public void setSelectedStableId(java.lang.String stableId)