Cytoscape 2.7.0 (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, 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(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(VisualPropertyType type, String name)
          DOCUMENT ME!
 Collection<Calculator> getCalculators()
          DOCUMENT ME!
 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!
 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

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

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

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

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

getCalculator

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

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

checkCalculatorName

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

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

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