org.cytoscape.cyni
Class AbstractCyniAlgorithm

java.lang.Object
  extended by org.cytoscape.cyni.AbstractCyniAlgorithm
All Implemented Interfaces:
CyCyniAlgorithm

public abstract class AbstractCyniAlgorithm
extends Object
implements CyCyniAlgorithm

The AbstractCyniAlgorithm provides a basic implementation of a cyni algorithm TaskFactory.


Constructor Summary
AbstractCyniAlgorithm(String computerName, String humanName, boolean supportsSelectedOnly, CyniCategory category)
          The Constructor.
 
Method Summary
 Object createCyniContext(org.cytoscape.model.CyTable table, CyCyniMetricsManager metricsManager, org.cytoscape.work.TunableSetter tunableSetter, Map<String,Object> mparams)
          Returns a new cyni context object.
 CyniCategory getCategory()
          Returns the category of the Cyni Algorithm.
 String getName()
          A computer readable name used to construct property strings.
 boolean isReady(Object tunableContext)
          Returns true if the task factory is ready to produce a task iterator.
 boolean supportsSelectedOnly()
          Tests to see if this Cyni supports doing a Cyni Algorithm on a subset of the nodes.
 String toString()
          Used to get the user-visible name of the cyni algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cytoscape.cyni.CyCyniAlgorithm
createTaskIterator
 

Constructor Detail

AbstractCyniAlgorithm

public AbstractCyniAlgorithm(String computerName,
                             String humanName,
                             boolean supportsSelectedOnly,
                             CyniCategory category)
The Constructor.

Parameters:
computerName - a computer readable name used to construct property strings.
humanName - a user visible name of the cyni algorithm.
supportsSelectedOnly - indicates whether only selected rows/nodes will be used to apply the algorithm.
category - the category is used to set the type of cyni algorithm
Method Detail

getName

public String getName()
A computer readable name used to construct property strings.

Specified by:
getName in interface CyCyniAlgorithm
Returns:
a computer readable name used to construct property strings.

getCategory

public CyniCategory getCategory()
Returns the category of the Cyni Algorithm.

Specified by:
getCategory in interface CyCyniAlgorithm
Returns:
The category for the Cyni Algorithm.

toString

public String toString()
Used to get the user-visible name of the cyni algorithm.

Overrides:
toString in class Object
Returns:
the user-visible name of the cyni algorithm.

createCyniContext

public Object createCyniContext(org.cytoscape.model.CyTable table,
                                CyCyniMetricsManager metricsManager,
                                org.cytoscape.work.TunableSetter tunableSetter,
                                Map<String,Object> mparams)
Returns a new cyni context object. This method can be used to create custom configurations for cyni algorithms.

Specified by:
createCyniContext in interface CyCyniAlgorithm
Parameters:
table - The table where to get the data.
metricsManager - The cyni metrics manager.
tunableSetter - The tunable setter to set the parameters if not GUI is used.
mparams - The map of each one of the parameters with the value of the parameter.
Returns:
a new cyni context object.

isReady

public boolean isReady(Object tunableContext)
Description copied from interface: CyCyniAlgorithm
Returns true if the task factory is ready to produce a task iterator.

Specified by:
isReady in interface CyCyniAlgorithm
Parameters:
tunableContext - The layout context for this cyni algorithm.
Returns:
true if the task factory is ready to produce a task iterator.

supportsSelectedOnly

public boolean supportsSelectedOnly()
Description copied from interface: CyCyniAlgorithm
Tests to see if this Cyni supports doing a Cyni Algorithm on a subset of the nodes.

Specified by:
supportsSelectedOnly in interface CyCyniAlgorithm
Returns:
true if cyni algorithm supports only applying the algorithm on a subset of the nodes


Copyright © 2013. All Rights Reserved.