Cytoscape 2.8.0 API

cytoscape
Class CytoscapeInit

java.lang.Object
  extended by cytoscape.CytoscapeInit
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class CytoscapeInit
extends Object
implements PropertyChangeListener

Cytoscape Init is responsible for starting Cytoscape in a way that makes sense.

The comments below are more hopeful than accurate. We currently do not support a "headless" mode (meaning there is no GUI). We do, however, hope to support this in the future.

The two main modes of running Cytoscape are either in "headless" mode or in "script" mode. This class will use the command-line options to figure out which mode is desired, and run things accordingly.

The order for doing things will be the following:
  1. deterimine script mode, or headless mode
  2. get options from properties files
  3. get options from command line ( these overwrite properties )
  4. Load all Networks
  5. Load all data
  6. Load all Plugins
  7. Initialize all plugins, in order if specified.
  8. Start Desktop/Print Output exit.

Since:
Cytoscape 1.0
Author:
Cytoscape Core Team

Constructor Summary
CytoscapeInit()
          Creates a new CytoscapeInit object.
 
Method Summary
static File getConfigDirectory()
          If .cytoscape directory does not exist, it creates it and returns it
static File getConfigFile(String file_name)
          DOCUMENT ME!
static File getConfigVersionDirectory()
          Within the .cytoscape directory create a version-specific directory
static CyInitParams getCyInitParams()
          Returns the CyInitParams object used to initialize Cytoscape.
static File getMRUD()
           
static File getMRUF()
           
static Properties getProperties()
          Returns the properties used by Cytoscape, the result of cytoscape.props and command line options.
static Properties getVisualProperties()
          DOCUMENT ME!
 boolean init(CyInitParams params)
          Cytoscape Init must be initialized using the command line arguments.
static void loadStaticProperties(String defaultName, Properties props)
          Load the Properties found in a given given file into a given Properties object.
 void propertyChange(PropertyChangeEvent e)
           
static void setMRUD(File mrud_new)
           
static void setMRUF(File mruf_new)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CytoscapeInit

public CytoscapeInit()
Creates a new CytoscapeInit object.

Method Detail

init

public boolean init(CyInitParams params)
Cytoscape Init must be initialized using the command line arguments.

Parameters:
params - the arguments from the command line
Returns:
false, if we fail to initialize for some reason

getCyInitParams

public static CyInitParams getCyInitParams()
Returns the CyInitParams object used to initialize Cytoscape.


getProperties

public static Properties getProperties()
Returns the properties used by Cytoscape, the result of cytoscape.props and command line options.


getMRUD

public static File getMRUD()
Returns:
the most recently used directory

getMRUF

public static File getMRUF()
Returns:
the most recently used file

setMRUD

public static void setMRUD(File mrud_new)
Parameters:
mrud_new - the most recently used directory

setMRUF

public static void setMRUF(File mruf_new)
Parameters:
mruf_new - the most recently used file

getConfigVersionDirectory

public static File getConfigVersionDirectory()
Within the .cytoscape directory create a version-specific directory

Returns:
the directory ".cytoscape/[cytoscape version]

getConfigDirectory

public static File getConfigDirectory()
If .cytoscape directory does not exist, it creates it and returns it

Returns:
the directory ".cytoscape" in the users home directory.

getConfigFile

public static File getConfigFile(String file_name)
DOCUMENT ME!

Parameters:
file_name - DOCUMENT ME!
Returns:
DOCUMENT ME!

getVisualProperties

public static Properties getVisualProperties()
DOCUMENT ME!

Returns:
DOCUMENT ME!

loadStaticProperties

public static void loadStaticProperties(String defaultName,
                                        Properties props)
Load the Properties found in a given given file into a given Properties object.

Parameters:
defaultName - the name of the properties file to use (.e.g., "cytoscape.props").
props - the Properties object in which to insert the property information found within defaultName.

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.