java.lang.Object
AbstractDataAdapterUI
apollo.dataadapter.ensj.EnsJAdapterGUI
- Direct Known Subclasses:
- AnnotationEnsJAdapterGUI
- public class EnsJAdapterGUI
- extends AbstractDataAdapterUI
Configuration GUI for the EnsJAdapter class. It enables the user to
specify:
- a region of a chromosome to retrieve data, or a clone fragment
(contig accesion/stable ID).
- Ensj-driver settings. Where to get data from.
- Logging configuration for ensj-core.
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
EnsJAdapterGUI
public EnsJAdapterGUI(IOOperation op)
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)