Cytoscape 2.5.1 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.visual
Class CalculatorIO

java.lang.Object
  extended by cytoscape.visual.CalculatorIO

public class CalculatorIO
extends Object

This class defines static methods for reading calculator definitions from a properties object and installing them into a CalculatorCatalog, and for constructing a properties object that describes all the calculators in a CalculatorCatalog.


Field Summary
static String dirHeader
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeArrowBaseKey
          Deprecated. Will become private 10/2007. Use VisualPropertyType.getPropertyLabel() instead.
static String edgeArrowClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeColorBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String edgeColorClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeFontFaceBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String edgeFontFaceClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeFontSizeBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String edgeFontSizeClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeLabelBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String edgeLabelClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeLineTypeBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String edgeLineTypeClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String edgeToolTipBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String edgeToolTipClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeColorBaseKey
          Deprecated. Will become private 10/2007. Use VisualPropertyType.getPropertyLabel() instead.
static String nodeColorClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeFontFaceBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String nodeFontFaceClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeFontSizeBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String nodeFontSizeClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeLabelBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String nodeLabelClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeLineTypeBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String nodeLineTypeClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeShapeBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String nodeShapeClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeSizeBaseKey
          Deprecated. Will become private 10/2007. Use VisualPropertyType.getPropertyLabel() instead.
static String nodeSizeClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
static String nodeToolTipBaseKey
          Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
static String nodeToolTipClassName
          Deprecated. Implement this yourself. Will be removed 10/2007
 
Constructor Summary
CalculatorIO()
           
 
Method Summary
static Properties getProperties(CalculatorCatalog catalog)
          Given a CalculatorCatalog, assembles a Properties object representing all of the calculators contained in the catalog.
static void loadCalculators(Properties props, CalculatorCatalog catalog)
          Equivalent to loadCalculators(props, catalog, true);
static void loadCalculators(Properties props, CalculatorCatalog catalog, boolean overWrite)
          Loads calculators from their description in a Properties object into a supplied CalculatorCatalog object.
static void removeDuplicate(Calculator c, CalculatorCatalog catalog)
          Deprecated. WTF? Use CalculatorCatalog.removeCalculator() Will be removed 10/2007
static void renameAsNeeded(Calculator c, CalculatorCatalog catalog)
          Given a Calculator of a given type and a CalculatorCatalog, checks for an existing catalog with the same name and type.
static void storeCatalog(CalculatorCatalog catalog, File outFile)
          Writes the contents of a CalculatorCatalog to the specified file as a properties file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeColorBaseKey

@Deprecated
public static final String nodeColorBaseKey
Deprecated. Will become private 10/2007. Use VisualPropertyType.getPropertyLabel() instead.
See Also:
Constant Field Values

nodeSizeBaseKey

@Deprecated
public static final String nodeSizeBaseKey
Deprecated. Will become private 10/2007. Use VisualPropertyType.getPropertyLabel() instead.
See Also:
Constant Field Values

edgeArrowBaseKey

@Deprecated
public static final String edgeArrowBaseKey
Deprecated. Will become private 10/2007. Use VisualPropertyType.getPropertyLabel() instead.
See Also:
Constant Field Values

dirHeader

public static final String dirHeader
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeColorClassName

public static final String nodeColorClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeLineTypeBaseKey

public static final String nodeLineTypeBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

nodeLineTypeClassName

public static final String nodeLineTypeClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeShapeBaseKey

public static final String nodeShapeBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

nodeShapeClassName

public static final String nodeShapeClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeSizeClassName

public static final String nodeSizeClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeLabelBaseKey

public static final String nodeLabelBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

nodeLabelClassName

public static final String nodeLabelClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeToolTipBaseKey

public static final String nodeToolTipBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

nodeToolTipClassName

public static final String nodeToolTipClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeFontFaceBaseKey

public static final String nodeFontFaceBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

nodeFontFaceClassName

public static final String nodeFontFaceClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

nodeFontSizeBaseKey

public static final String nodeFontSizeBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

nodeFontSizeClassName

public static final String nodeFontSizeClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeColorBaseKey

public static final String edgeColorBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

edgeColorClassName

public static final String edgeColorClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeLineTypeBaseKey

public static final String edgeLineTypeBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

edgeLineTypeClassName

public static final String edgeLineTypeClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeArrowClassName

public static final String edgeArrowClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeLabelBaseKey

public static final String edgeLabelBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

edgeLabelClassName

public static final String edgeLabelClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeToolTipBaseKey

public static final String edgeToolTipBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

edgeToolTipClassName

public static final String edgeToolTipClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeFontFaceBaseKey

public static final String edgeFontFaceBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

edgeFontFaceClassName

public static final String edgeFontFaceClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values

edgeFontSizeBaseKey

public static final String edgeFontSizeBaseKey
Deprecated. Use Calculator.getPropertyLabel(). Will be removed 10/2007
See Also:
Constant Field Values

edgeFontSizeClassName

public static final String edgeFontSizeClassName
Deprecated. Implement this yourself. Will be removed 10/2007
See Also:
Constant Field Values
Constructor Detail

CalculatorIO

public CalculatorIO()
Method Detail

storeCatalog

public static void storeCatalog(CalculatorCatalog catalog,
                                File outFile)
Writes the contents of a CalculatorCatalog to the specified file as a properties file. This method sorts the lines of text produced by the store method of Properties, so that the properties descriptions of the calculators are reasonably human-readable.


getProperties

public static Properties getProperties(CalculatorCatalog catalog)
Given a CalculatorCatalog, assembles a Properties object representing all of the calculators contained in the catalog. The resulting Properties object, if passed to the loadCalculators method, would reconstruct all the calculators. This method works by getting each set of calculators from the catalog and calling the getProperties method on each calculator with the proper header for the property key.


loadCalculators

public static void loadCalculators(Properties props,
                                   CalculatorCatalog catalog)
Equivalent to loadCalculators(props, catalog, true);


loadCalculators

public static void loadCalculators(Properties props,
                                   CalculatorCatalog catalog,
                                   boolean overWrite)
Loads calculators from their description in a Properties object into a supplied CalculatorCatalog object. This method searches the Properties object for known keys identifying calculators, then delegates to other methods that use the preprocessed properties to construct valid calculator objects. For any calculator defined by the Properties, it is possible for the catalog to already hold a calculator with the same name and interface type (especially if this method has already been run with the same Properties object and catalog). If the overWrite argument is true, this method will remove any such duplicate calculator before adding the new one to prevent duplicate name exceptions. If overwrite is false, this method will get a unique name from the catalog and change the name of the installed calculator as needed.


renameAsNeeded

public static void renameAsNeeded(Calculator c,
                                  CalculatorCatalog catalog)
Given a Calculator of a given type and a CalculatorCatalog, checks for an existing catalog with the same name and type. If one exists, gets a new unique name from the catalog and applied it to the calculator argument.


removeDuplicate

public static void removeDuplicate(Calculator c,
                                   CalculatorCatalog catalog)
Deprecated. WTF? Use CalculatorCatalog.removeCalculator() Will be removed 10/2007


www.cytoscape.org