apollo.config
Class Config

java.lang.Object
  extended by apollo.config.Config

public class Config
extends java.lang.Object

A class with static data members and static methods for setting and retrieving configuration information for the apollo gui. from apollo.ebi email: createStyle(...) is used to create a new style that is coming in from the apollo.cfg DataAdapterInstall line as you've probably seen: DataAdapterInstall "apollo.dataadapter.EnsCGIAdapter" "ensembl.style" Config sees this line and installs a new Style whose settings are in ensembl.style and will get associated with the EnsCGIAdapter. This will NOT then become the present style. apollo.cfg can specify many DataAdapters with styles, and styles can be shared. At initialization time createStyle() creates these styles and puts them in a hash to be called up later. When the user selects a data adapter (with the DataAdapterChooser gui) then newDataAdapter is called with the new DataAdapter Class (which calls setDataAdapterType with the class string). At this point Config sets its style class variable because we now know which style the user wants. NameAdapters are specific to a an annotation type now; NameAdapterInstall has been moved to TiersIO


Field Summary
static boolean DEBUG
          Debug mode for Apollo developers; references to this variable are scattered throughout the Apollo code.
static boolean DO_ONE_LEVEL_ANNOTS
           
static boolean inBatchMode
           
static java.lang.String javaws
           
static java.lang.String jvm
           
static java.lang.String osarch
           
static java.lang.String osname
           
 
Constructor Summary
Config()
           
 
Method Summary
static boolean commandLineXmlFileFormatIsConfigged()
          Returns true if commandLineXmlFileFormat is nonnull and is "game" or "chado"
static Style createStyle(java.lang.String styleFilename)
          If already have style for styleFilename, return that.
static boolean dataAdapterIsAvailable(org.bdgp.io.IOOperation io)
           
static java.lang.String digForConfigFile(java.lang.String styleFilename)
          Look around for style file, pulling out of the jar if necessary (needed for webstart)
static boolean doUserTranscriptColouring()
           
static void ensureExists(java.io.File thing, java.lang.String resource)
          Default is not to recreate.
static void ensureExists(java.io.File thing, java.lang.String resource, boolean recreate)
           
static java.lang.String getAdapterHistoryFile()
           
static org.bdgp.io.DataAdapterRegistry getAdapterRegistry()
           
static java.awt.Color getAnnotationBackground()
           
static java.awt.Color getAnnotationColor(AnnotatedFeatureI annot)
          New method take an AnnotatedFeatureI (an annot or transcript)
static java.awt.Color getAnnotationColor(java.lang.String username, FeatureProperty fp)
           
static java.util.Vector getAnnotationComments()
           
static java.awt.Color getAnnotationLabelColor()
           
static java.lang.String getApolloOboFilename()
           
static java.lang.String getAutosaveFile()
           
static int getAutosaveInterval()
           
static java.lang.String getBandUrl()
           
static java.lang.String getBlixemLocation()
           
static java.lang.String getBrowserProgram()
           
static java.lang.String getCGIHost()
           
static int getCGIPort()
           
static java.lang.String getCGIScript()
           
static java.lang.String getChadoJdbcAdapterConfigFile()
           
static java.lang.String getChadoTemplateName()
           
static boolean getCheckOwnership()
           
static java.util.Vector getChromosomes()
          Returns a vector of chromosome names as strings, null if none given
static java.lang.String getCommandLineXmlFileFormat()
          Indicates adapter to use for command line xml file, "game" or "chado".
static boolean getConfirmDeleteSelection()
          Return true if configged to true AND NOT in command-line/batch mode
static boolean getConfirmOverwrite()
          Return true if both configged to true AND NOT in command-line/batch mode this boolean causes a popup that shouldnt happen in cmd line mode and presently there is no cmd-line confirm of overwrite - if this is added then the cmd line should be tested downstream - fine with present code i think
static Controller getController()
          This should be taken out of here and made a singleton method in controller Config has nothing to do with the controller
static java.awt.Color getCoordBackground()
           
static java.awt.Color getCoordForeground()
           
static java.awt.Color getCoordRevcompColor()
           
static boolean getDashSets()
           
static java.lang.String getDASServer()
           
static java.lang.String getDataDir()
           
static java.awt.Color getDataLoaderBackgroundColor()
           
static java.awt.Color getDataLoaderLabelColor()
           
static java.awt.Color getDataLoaderTitleColor()
           
static java.lang.String getDBHost()
           
static java.lang.String getDBName()
           
static boolean getDebug()
           
static java.awt.Color getDefaultAnnotationColor()
           
static java.awt.Font getDefaultFeatureLabelFont()
          Default font for gene label if it does not have a peptide status(which has a font) gene label appears as label to feature and in gene menu list
static java.awt.Font getDefaultFont()
          Should there be an apollo wide font as well as style level font?
static java.lang.String getDefaultSingleSpeciesName()
          doesnt matter what the string is as long as its consistent across data adapters and composite data holder - couldnt think where else to put this but Config
static DisplayPrefsI getDisplayPrefs()
           
static boolean getDraw3D()
           
static boolean getDrawOutline()
           
static java.awt.Color getEdgematchColor()
           
static int getEdgematchWidth()
           
static java.awt.Color getExonDetailEditorBackgroundColor1()
           
static java.awt.Color getExonDetailEditorBackgroundColor2()
           
static java.awt.Color getExonDetailEditorFeatureColor1()
           
static java.awt.Color getExonDetailEditorFeatureColor2()
           
static java.awt.Font getExonDetailEditorSequenceFont()
           
static java.lang.String getExonSyntenyDir()
           
static java.lang.String getExternalRefURL()
          previously fban url - attempting to make more general
static float getFastDrawLimit()
           
static java.awt.Color getFeatureBackground()
           
static java.awt.Color getFeatureLabelColor()
           
static java.lang.String getFileName()
           
static java.lang.String getFrameOrientation()
           
static java.lang.String getFullNameForUser(java.lang.String user)
          Returns full name of user - if dont have full name just returns user
static java.lang.String getGeneUrl()
           
static int getGeneWindow()
           
static java.lang.String getGPName()
           
static java.awt.Color getHighlightColor()
           
static java.lang.String getJavaWebStartVersion()
          Get the Java Web Start version.
static java.lang.String getJVM()
           
static java.lang.String getKaryotypeFile()
           
static java.lang.String getLayoutIniFile()
           
static int getMainWindowWidth()
           
static int getMaxHistoryLength()
           
static long getMemoryAllocation()
           
static boolean getNoStripes()
           
static java.awt.Color getOutlineColor()
           
static OverlapI getOverlapper(SeqFeatureI sf)
           
static java.io.File getParentFile(java.io.File thing)
           
static java.util.Hashtable getPeptideStates()
           
static PeptideStatus getPeptideStatus(java.lang.String pep_status)
           
static java.lang.String getPFetchServer()
           
static java.lang.String getProjectName(java.lang.String username)
           
static PropertyScheme getPropertyScheme()
          When multi-curations have multi-propSchemes this method will become pase.
static java.util.Hashtable getPublicDbList()
           
static java.lang.String getRangeUrl()
           
static boolean getRefreshPeptides()
           
static java.lang.String getRootDir()
           
static boolean getSaveClonedFeaturesInTransactions()
           
static java.lang.String getScaffoldUrl()
           
static java.awt.Color getSelectionColor()
           
static java.awt.Color getSeqGapColor()
           
static java.awt.Color getSequenceColor()
           
static java.lang.String getSeqUrl()
           
static boolean getShowAnnotations()
           
static boolean getShowResults()
           
static boolean getShowSaveAsOptionInFileMenu()
           
static boolean getShowSaveOptionInFileMenu()
           
static boolean getShowSyntenyEvidencePanels()
           
static int getSiteShowLimit()
           
static java.lang.String getSoOboFilename()
           
static java.lang.String getSRSServer()
           
static Style getStyle()
           
static Style getStyle(java.lang.String adapterType)
          Returns Style for adapter class string, null if non existent
static java.lang.String getSyntenyDatabaseForSpecies(java.lang.String species)
           
static java.lang.String getSyntenyDir()
           
static int getSyntenyPanelRelativeSize()
           
static int getTextAvoidLimit()
           
static java.lang.String getTiersFile()
           
static java.lang.String getTigrAnnotNameAdapterNewNameCommand()
           
static java.lang.String getTimestamp()
           
static java.util.Vector getTranscriptComments()
           
static int getTranslationShowLimit()
           
static java.lang.String getUsersFullName()
           
static boolean hasChromosomes()
           
static boolean hasStyleForSpecies(java.lang.String species)
           
static boolean httpServerIsEnabled()
           
static void initializeConfiguration()
           
static boolean internalMode()
           
static boolean isChadoTnOutputNeeded()
          To see if chado transaction output is needed.
static boolean isEditingEnabled()
           
static boolean isEditingEnabled(java.lang.String adapterClassName)
           
static boolean isHeadlessApplication()
          Checks whether the system is running in headless mode.
static boolean isJavaWebStartApplication()
          Checks to see if this application is a Java Web Start application
static boolean isNavigationManagerEnabled()
           
static void main(java.lang.String[] args)
           
static void newDataAdapter(org.bdgp.io.DataAdapter da)
          Data adapter has changed - fetch the matching style - i think the purpose of this was to change the style - but AbstractApolloAdapter seems to do this explicitly now through setStyle(s) because if a dataadapter is a child to the synteny adapter, the synteny style will be used in lieu of the data adapters normal style - though im not sure what i think about that AnalysisAdapterGUI still uses this but it probably shouldnt because of synteny
static boolean outputTransactionXML()
          Whether to write a .tnxml file
static void reset()
           
static void setBrowserProgram(java.lang.String browser)
           
static void setConfirmDeleteSelection(boolean state)
           
static void setConfirmOverwrite(boolean state)
           
static void setController(Controller newValue)
          controller should be taken out of config at some point - controller now set by default to master controller - take out setController? not used
static void setDBHost(java.lang.String host)
           
static void setDBName(java.lang.String name)
           
static void setGPName(java.lang.String name)
           
static void setRefreshPeptides(boolean value)
           
static void setSaveClonedFeaturesInTransactions(boolean state)
           
static void setShowSaveAsOptionInFileMenu(boolean state)
           
static void setShowSaveOptionInFileMenu(boolean state)
           
static void setStyle(Style s)
           
static void setStyle(Style s, boolean updateStyleHash)
          if updateStyleHash is true add key style filename to value style to filenameToStyle hash
static void setStyleForSpecies(java.lang.String species)
           
static void setTigrAnnotNameAdapterNewNameCommand(java.lang.String command)
           
static boolean supressMacJvmPopupMessage()
           
static boolean useFastClipGraphics()
           
static boolean verticallyMovePopups()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

osarch

public static java.lang.String osarch

osname

public static java.lang.String osname

jvm

public static java.lang.String jvm

javaws

public static java.lang.String javaws

DO_ONE_LEVEL_ANNOTS

public static boolean DO_ONE_LEVEL_ANNOTS

inBatchMode

public static boolean inBatchMode

DEBUG

public static boolean DEBUG
Debug mode for Apollo developers; references to this variable are scattered throughout the Apollo code. Setting this flag to true enables several (unrelated) experimental Apollo features that appear to be under development. This flag used to control the printing of debug statements, but this is now handled by Log4J and should be configured in the log4j config. file (which is set by the apollo start script.)

Constructor Detail

Config

public Config()
Method Detail

getDebug

public static boolean getDebug()

setStyle

public static void setStyle(Style s)

setStyle

public static void setStyle(Style s,
                            boolean updateStyleHash)
if updateStyleHash is true add key style filename to value style to filenameToStyle hash


newDataAdapter

public static void newDataAdapter(org.bdgp.io.DataAdapter da)
Data adapter has changed - fetch the matching style - i think the purpose of this was to change the style - but AbstractApolloAdapter seems to do this explicitly now through setStyle(s) because if a dataadapter is a child to the synteny adapter, the synteny style will be used in lieu of the data adapters normal style - though im not sure what i think about that AnalysisAdapterGUI still uses this but it probably shouldnt because of synteny


getStyle

public static Style getStyle(java.lang.String adapterType)
Returns Style for adapter class string, null if non existent


getStyle

public static Style getStyle()

hasStyleForSpecies

public static boolean hasStyleForSpecies(java.lang.String species)

setStyleForSpecies

public static void setStyleForSpecies(java.lang.String species)

getAnnotationBackground

public static java.awt.Color getAnnotationBackground()

getFeatureBackground

public static java.awt.Color getFeatureBackground()

getEdgematchWidth

public static int getEdgematchWidth()

verticallyMovePopups

public static boolean verticallyMovePopups()

getCoordBackground

public static java.awt.Color getCoordBackground()

getCoordForeground

public static java.awt.Color getCoordForeground()

getCoordRevcompColor

public static java.awt.Color getCoordRevcompColor()

getSequenceColor

public static java.awt.Color getSequenceColor()

getEdgematchColor

public static java.awt.Color getEdgematchColor()

getHighlightColor

public static java.awt.Color getHighlightColor()

getSelectionColor

public static java.awt.Color getSelectionColor()

getSeqGapColor

public static java.awt.Color getSeqGapColor()

getFeatureLabelColor

public static java.awt.Color getFeatureLabelColor()

getAnnotationLabelColor

public static java.awt.Color getAnnotationLabelColor()

getDataLoaderBackgroundColor

public static java.awt.Color getDataLoaderBackgroundColor()

getDataLoaderLabelColor

public static java.awt.Color getDataLoaderLabelColor()

getDataLoaderTitleColor

public static java.awt.Color getDataLoaderTitleColor()

getExonDetailEditorBackgroundColor1

public static java.awt.Color getExonDetailEditorBackgroundColor1()

getExonDetailEditorBackgroundColor2

public static java.awt.Color getExonDetailEditorBackgroundColor2()

getExonDetailEditorFeatureColor1

public static java.awt.Color getExonDetailEditorFeatureColor1()

getExonDetailEditorFeatureColor2

public static java.awt.Color getExonDetailEditorFeatureColor2()

getAnnotationComments

public static java.util.Vector getAnnotationComments()

getTranscriptComments

public static java.util.Vector getTranscriptComments()

getPeptideStates

public static java.util.Hashtable getPeptideStates()

getPeptideStatus

public static PeptideStatus getPeptideStatus(java.lang.String pep_status)

getAdapterRegistry

public static org.bdgp.io.DataAdapterRegistry getAdapterRegistry()

dataAdapterIsAvailable

public static boolean dataAdapterIsAvailable(org.bdgp.io.IOOperation io)

getDisplayPrefs

public static DisplayPrefsI getDisplayPrefs()

getOverlapper

public static OverlapI getOverlapper(SeqFeatureI sf)

getTiersFile

public static java.lang.String getTiersFile()

getKaryotypeFile

public static java.lang.String getKaryotypeFile()

getSyntenyDir

public static java.lang.String getSyntenyDir()

getExonSyntenyDir

public static java.lang.String getExonSyntenyDir()

getShowAnnotations

public static boolean getShowAnnotations()

getLayoutIniFile

public static java.lang.String getLayoutIniFile()

getShowResults

public static boolean getShowResults()

getShowSyntenyEvidencePanels

public static boolean getShowSyntenyEvidencePanels()

isEditingEnabled

public static boolean isEditingEnabled()

isEditingEnabled

public static boolean isEditingEnabled(java.lang.String adapterClassName)

isNavigationManagerEnabled

public static boolean isNavigationManagerEnabled()

getAutosaveInterval

public static int getAutosaveInterval()

getCGIPort

public static int getCGIPort()

getCGIScript

public static java.lang.String getCGIScript()

getCGIHost

public static java.lang.String getCGIHost()

getDBHost

public static java.lang.String getDBHost()

getDBName

public static java.lang.String getDBName()

getGPName

public static java.lang.String getGPName()

getSRSServer

public static java.lang.String getSRSServer()

getPFetchServer

public static java.lang.String getPFetchServer()

getDASServer

public static java.lang.String getDASServer()

getAutosaveFile

public static java.lang.String getAutosaveFile()

getController

public static Controller getController()
This should be taken out of here and made a singleton method in controller Config has nothing to do with the controller


setController

public static void setController(Controller newValue)
controller should be taken out of config at some point - controller now set by default to master controller - take out setController? not used


getSiteShowLimit

public static int getSiteShowLimit()

getSyntenyPanelRelativeSize

public static int getSyntenyPanelRelativeSize()

getTranslationShowLimit

public static int getTranslationShowLimit()

getTextAvoidLimit

public static int getTextAvoidLimit()

getDefaultFont

public static java.awt.Font getDefaultFont()
Should there be an apollo wide font as well as style level font?


getDefaultFeatureLabelFont

public static java.awt.Font getDefaultFeatureLabelFont()
Default font for gene label if it does not have a peptide status(which has a font) gene label appears as label to feature and in gene menu list


getFastDrawLimit

public static float getFastDrawLimit()

getDrawOutline

public static boolean getDrawOutline()

getOutlineColor

public static java.awt.Color getOutlineColor()

getFrameOrientation

public static java.lang.String getFrameOrientation()

getMainWindowWidth

public static int getMainWindowWidth()

getGeneUrl

public static java.lang.String getGeneUrl()

getBandUrl

public static java.lang.String getBandUrl()

getScaffoldUrl

public static java.lang.String getScaffoldUrl()

getSeqUrl

public static java.lang.String getSeqUrl()

getRangeUrl

public static java.lang.String getRangeUrl()

hasChromosomes

public static boolean hasChromosomes()

getChromosomes

public static java.util.Vector getChromosomes()
Returns a vector of chromosome names as strings, null if none given


getExternalRefURL

public static java.lang.String getExternalRefURL()
previously fban url - attempting to make more general


internalMode

public static boolean internalMode()

getProjectName

public static java.lang.String getProjectName(java.lang.String username)

getFileName

public static java.lang.String getFileName()

createStyle

public static Style createStyle(java.lang.String styleFilename)
If already have style for styleFilename, return that. In other words doesnt create 2 Styles for same style file.


digForConfigFile

public static java.lang.String digForConfigFile(java.lang.String styleFilename)
Look around for style file, pulling out of the jar if necessary (needed for webstart)


getRootDir

public static java.lang.String getRootDir()

getDataDir

public static java.lang.String getDataDir()

getMaxHistoryLength

public static int getMaxHistoryLength()

getAdapterHistoryFile

public static java.lang.String getAdapterHistoryFile()

getConfirmOverwrite

public static boolean getConfirmOverwrite()
Return true if both configged to true AND NOT in command-line/batch mode this boolean causes a popup that shouldnt happen in cmd line mode and presently there is no cmd-line confirm of overwrite - if this is added then the cmd line should be tested downstream - fine with present code i think


setConfirmOverwrite

public static void setConfirmOverwrite(boolean state)

getShowSaveOptionInFileMenu

public static boolean getShowSaveOptionInFileMenu()

setShowSaveOptionInFileMenu

public static void setShowSaveOptionInFileMenu(boolean state)

getShowSaveAsOptionInFileMenu

public static boolean getShowSaveAsOptionInFileMenu()

setShowSaveAsOptionInFileMenu

public static void setShowSaveAsOptionInFileMenu(boolean state)

getConfirmDeleteSelection

public static boolean getConfirmDeleteSelection()
Return true if configged to true AND NOT in command-line/batch mode


setConfirmDeleteSelection

public static void setConfirmDeleteSelection(boolean state)

getCheckOwnership

public static boolean getCheckOwnership()

getSaveClonedFeaturesInTransactions

public static boolean getSaveClonedFeaturesInTransactions()

setSaveClonedFeaturesInTransactions

public static void setSaveClonedFeaturesInTransactions(boolean state)

getTigrAnnotNameAdapterNewNameCommand

public static java.lang.String getTigrAnnotNameAdapterNewNameCommand()

setTigrAnnotNameAdapterNewNameCommand

public static void setTigrAnnotNameAdapterNewNameCommand(java.lang.String command)

httpServerIsEnabled

public static boolean httpServerIsEnabled()

getDashSets

public static boolean getDashSets()

useFastClipGraphics

public static boolean useFastClipGraphics()

doUserTranscriptColouring

public static boolean doUserTranscriptColouring()

getDraw3D

public static boolean getDraw3D()

getNoStripes

public static boolean getNoStripes()

getPropertyScheme

public static PropertyScheme getPropertyScheme()
When multi-curations have multi-propSchemes this method will become pase. Currently multi-curations all use same prop scheme, but that may change.


getAnnotationColor

public static java.awt.Color getAnnotationColor(AnnotatedFeatureI annot)
New method take an AnnotatedFeatureI (an annot or transcript)


getAnnotationColor

public static java.awt.Color getAnnotationColor(java.lang.String username,
                                                FeatureProperty fp)

getDefaultAnnotationColor

public static java.awt.Color getDefaultAnnotationColor()

getBlixemLocation

public static java.lang.String getBlixemLocation()

getBrowserProgram

public static java.lang.String getBrowserProgram()

setBrowserProgram

public static void setBrowserProgram(java.lang.String browser)

getExonDetailEditorSequenceFont

public static java.awt.Font getExonDetailEditorSequenceFont()

getMemoryAllocation

public static long getMemoryAllocation()

main

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

initializeConfiguration

public static void initializeConfiguration()

isJavaWebStartApplication

public static boolean isJavaWebStartApplication()
Checks to see if this application is a Java Web Start application

Returns:
true if it is a Java Web Start application

getJavaWebStartVersion

public static java.lang.String getJavaWebStartVersion()
Get the Java Web Start version. It returns null if not set (therefore not a Java Web Start application)

Returns:
Java Web Start Version if a JWS application, otherwise null

isHeadlessApplication

public static boolean isHeadlessApplication()
Checks whether the system is running in headless mode. Checks for the existence of the "java.awt.headless" property and that it is set to true.

Returns:
true if the program is running in headless mode

setDBName

public static void setDBName(java.lang.String name)

setDBHost

public static void setDBHost(java.lang.String host)

setGPName

public static void setGPName(java.lang.String name)

getGeneWindow

public static int getGeneWindow()

getJVM

public static java.lang.String getJVM()

setRefreshPeptides

public static void setRefreshPeptides(boolean value)

getRefreshPeptides

public static boolean getRefreshPeptides()

ensureExists

public static void ensureExists(java.io.File thing,
                                java.lang.String resource,
                                boolean recreate)

ensureExists

public static void ensureExists(java.io.File thing,
                                java.lang.String resource)
Default is not to recreate.


getParentFile

public static java.io.File getParentFile(java.io.File thing)

reset

public static void reset()

getTimestamp

public static java.lang.String getTimestamp()

getUsersFullName

public static java.lang.String getUsersFullName()

getFullNameForUser

public static java.lang.String getFullNameForUser(java.lang.String user)
Returns full name of user - if dont have full name just returns user


getPublicDbList

public static java.util.Hashtable getPublicDbList()

getSyntenyDatabaseForSpecies

public static java.lang.String getSyntenyDatabaseForSpecies(java.lang.String species)

getDefaultSingleSpeciesName

public static java.lang.String getDefaultSingleSpeciesName()
doesnt matter what the string is as long as its consistent across data adapters and composite data holder - couldnt think where else to put this but Config


getChadoTemplateName

public static java.lang.String getChadoTemplateName()

getChadoJdbcAdapterConfigFile

public static java.lang.String getChadoJdbcAdapterConfigFile()

isChadoTnOutputNeeded

public static boolean isChadoTnOutputNeeded()
To see if chado transaction output is needed.

Returns:
true for output transaction in chado xml format.

outputTransactionXML

public static boolean outputTransactionXML()
Whether to write a .tnxml file


getCommandLineXmlFileFormat

public static java.lang.String getCommandLineXmlFileFormat()
Indicates adapter to use for command line xml file, "game" or "chado". null for no default.


commandLineXmlFileFormatIsConfigged

public static boolean commandLineXmlFileFormatIsConfigged()
Returns true if commandLineXmlFileFormat is nonnull and is "game" or "chado"


supressMacJvmPopupMessage

public static boolean supressMacJvmPopupMessage()

getSoOboFilename

public static java.lang.String getSoOboFilename()

getApolloOboFilename

public static java.lang.String getApolloOboFilename()