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

cytoscape.visual
Class CalculatorCatalog

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

public class CalculatorCatalog
extends Object

Stores various types of Calculators from data attributes to an attribute of a specified type. Also keeps track of available mappings. Notifies interested classes of changes to the underlying datasets.


Constructor Summary
CalculatorCatalog()
          Creates a new CalculatorCatalog object.
CalculatorCatalog(Properties props)
          Creates a new CalculatorCatalog object.
 
Method Summary
 void addCalculator(Calculator dupe)
          Add any calculator to the catalog.
 void addChangeListener(ChangeListener l, byte type)
          Deprecated. Will be removed 5/2008
 void addChangeListener(ChangeListener l, VisualPropertyType type)
          DOCUMENT ME!
 void addMapping(String name, Class m)
          Add a mapping to the database of available mappings.
 void addVisualStyle(VisualStyle vs)
          DOCUMENT ME!
 String checkCalculatorName(byte type, String name)
          Deprecated. Will be removed 5/2008
 String checkCalculatorName(String calcName, byte calcType)
          Deprecated. Will be removed 5/2008
 String checkCalculatorName(String calcName, VisualPropertyType calcType)
          DOCUMENT ME!
 String checkCalculatorName(VisualPropertyType type, String name)
          DOCUMENT ME!
 String checkMappingName(String name)
          DOCUMENT ME!
 String checkVisualStyleName(String name)
          DOCUMENT ME!
 void clear()
          DOCUMENT ME!
 void createDefaultVisualStyle()
          DOCUMENT ME!
 Calculator getCalculator(byte type, String name)
          Deprecated. Will be removed 5/2008
 Calculator getCalculator(VisualPropertyType type, String name)
          DOCUMENT ME!
 Collection<Calculator> getCalculators()
          DOCUMENT ME!
 Collection<Calculator> getCalculators(byte type)
          Deprecated. Will be removed 5/2008
 Collection<Calculator> getCalculators(VisualPropertyType type)
          DOCUMENT ME!
 Collection<VisualPropertyType> getCalculatorTypes()
          DOCUMENT ME!
 Class getMapping(String name)
          DOCUMENT ME!
 Set getMappingNames()
          Returns the HashMap of mappers
 VisualStyle getVisualStyle(String name)
          DOCUMENT ME!
 Set<String> getVisualStyleNames()
          DOCUMENT ME!
 Collection<VisualStyle> getVisualStyles()
          DOCUMENT ME!
 Calculator removeCalculator(byte type, String name)
          Deprecated. Will be removed 5/2008
 void removeCalculator(Calculator c)
          Remove a calculator.
 Calculator removeCalculator(VisualPropertyType type, String name)
          DOCUMENT ME!
 Class removeMapping(String name)
          DOCUMENT ME!
 VisualStyle removeVisualStyle(String name)
          DOCUMENT ME!
 void renameCalculator(Calculator c, String name)
          Renames a calculator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalculatorCatalog

public CalculatorCatalog()
Creates a new CalculatorCatalog object.


CalculatorCatalog

public CalculatorCatalog(Properties props)
Creates a new CalculatorCatalog object.

Parameters:
props - DOCUMENT ME!
Method Detail

clear

public void clear()
DOCUMENT ME!


addChangeListener

@Deprecated
public void addChangeListener(ChangeListener l,
                                         byte type)
                       throws IllegalArgumentException
Deprecated. Will be removed 5/2008

Add a ChangeListener to the catalog. Depending on the passed-in type, the catalog will add the ChangeListener to the appropriate listener vector for the associated set of calculators. When the catalog's database of calculators changes, the ChangeListener will be notified. This is used in the UI classes to ensure that the UI panes stay consistent with the data held in the catalog.

Parameters:
l - ChangeListener to add
type - type of calculator to add to, one of VizMapUI's constants
Throws:
IllegalArgumentException - if unknown type passed in

addChangeListener

public void addChangeListener(ChangeListener l,
                              VisualPropertyType type)
                       throws IllegalArgumentException
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!
type - DOCUMENT ME!
Throws:
IllegalArgumentException - DOCUMENT ME!

addCalculator

public void addCalculator(Calculator dupe)
                   throws DuplicateCalculatorNameException,
                          IllegalArgumentException
Add any calculator to the catalog. Automatically checks type. Calculator is added according to its name as reported by the toString() method.

Parameters:
dupe - Calculator to add
Throws:
DuplicateCalculatorNameException - if calculator's name is a duplicate with valid name as detail message
IllegalArgumentException - if calculator is of an unknown type

checkCalculatorName

@Deprecated
public String checkCalculatorName(String calcName,
                                             byte calcType)
Deprecated. Will be removed 5/2008

Checks whether a name for a calculator is valid

Parameters:
calcName - Name to check
calcType - Type of calculator VizMapUI
Returns:
a valid name for the calculator. If the given name was not valid, numbers are appended until a valid name is found; this valid name is returned to the caller.

checkCalculatorName

public String checkCalculatorName(String calcName,
                                  VisualPropertyType calcType)
DOCUMENT ME!

Parameters:
calcName - DOCUMENT ME!
calcType - DOCUMENT ME!
Returns:
DOCUMENT ME!

renameCalculator

public void renameCalculator(Calculator c,
                             String name)
                      throws DuplicateCalculatorNameException,
                             IllegalArgumentException
Renames a calculator.

Parameters:
c - Calculator to rename
name - New name for calculator
Throws:
DuplicateCalculatorNameException - if name is a duplicate with valid name as detail message
IllegalArgumentException - if c is of an unknown type

removeCalculator

public void removeCalculator(Calculator c)
                      throws IllegalArgumentException
Remove a calculator.

Parameters:
c - Calculator to remove
Throws:
IllegalArgumentException - if c is of an unknown calculator type

getMappingNames

public Set getMappingNames()
Returns the HashMap of mappers


addMapping

public void addMapping(String name,
                       Class m)
                throws DuplicateCalculatorNameException,
                       IllegalArgumentException
Add a mapping to the database of available mappings. Because mappings are instantiated for each calculator, only class types are stored.

Parameters:
name - Name of the mapping
m - Class of the mapping
Throws:
DuplicateCalculatorNameException - if the given name is already taken
IllegalArgumentException - if the given class is not in the mapping hierarchy

removeMapping

public Class removeMapping(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

getMapping

public Class getMapping(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

checkMappingName

public String checkMappingName(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

getVisualStyleNames

public Set<String> getVisualStyleNames()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getVisualStyles

public Collection<VisualStyle> getVisualStyles()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addVisualStyle

public void addVisualStyle(VisualStyle vs)
DOCUMENT ME!

Parameters:
vs - DOCUMENT ME!

removeVisualStyle

public VisualStyle removeVisualStyle(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

getVisualStyle

public VisualStyle getVisualStyle(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

checkVisualStyleName

public String checkVisualStyleName(String name)
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCalculators

public Collection<Calculator> getCalculators()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getCalculators

@Deprecated
public Collection<Calculator> getCalculators(byte type)
Deprecated. Will be removed 5/2008

Use public Collection getCalculators(VisualPropertyType type) instead.

Parameters:
type -
Returns:

getCalculators

public Collection<Calculator> getCalculators(VisualPropertyType type)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCalculator

@Deprecated
public Calculator getCalculator(byte type,
                                           String name)
Deprecated. Will be removed 5/2008

Use public Calculator getCalculator(VisualPropertyType type, String name) instead.

Parameters:
type -
name -
Returns:

getCalculator

public Calculator getCalculator(VisualPropertyType type,
                                String name)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

checkCalculatorName

@Deprecated
public String checkCalculatorName(byte type,
                                             String name)
Deprecated. Will be removed 5/2008

Use public String checkCalculatorName(VisualPropertyType type, String name) instead.

Parameters:
type -
name -
Returns:

checkCalculatorName

public String checkCalculatorName(VisualPropertyType type,
                                  String name)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

removeCalculator

@Deprecated
public Calculator removeCalculator(byte type,
                                              String name)
Deprecated. Will be removed 5/2008

Use public Calculator removeCalculator(VisualPropertyType type, String name) instead.

Parameters:
type -
name -
Returns:

removeCalculator

public Calculator removeCalculator(VisualPropertyType type,
                                   String name)
DOCUMENT ME!

Parameters:
type - DOCUMENT ME!
name - DOCUMENT ME!
Returns:
DOCUMENT ME!

getCalculatorTypes

public Collection<VisualPropertyType> getCalculatorTypes()
DOCUMENT ME!

Returns:
DOCUMENT ME!

createDefaultVisualStyle

public void createDefaultVisualStyle()
DOCUMENT ME!


www.cytoscape.org