|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cytoscape.work.AbstractTask
org.cytoscape.cyni.AbstractCyniTask
public abstract class AbstractCyniTask
This is a basic implementation of a CyniAlgorithm Task that does some bookkeeping, but primarily delegates to the doCyniTask() method.
Field Summary | |
---|---|
protected org.cytoscape.model.CyNetworkFactory |
netFactory
|
protected org.cytoscape.model.CyNetworkManager |
netMgr
|
protected Map<Integer,ArrayList<Integer>> |
nodeParents
This variable maps an integer representing a node/row with a list of integers that represents a list of parents for that node/row In oder to use it correctly, this variable needs to be initialized and a previous map between a node and its corresponding integer is also required |
protected int |
nThreads
Indicates the maximum number of threads that this task can use |
protected boolean |
selectedOnly
Indicates whether to apply the algorithm to all rows or only the selected rows. |
protected org.cytoscape.view.model.CyNetworkViewFactory |
viewFactory
|
protected org.cytoscape.view.model.CyNetworkViewManager |
viewMgr
|
protected org.cytoscape.view.vizmap.VisualMappingManager |
vmMgr
|
Fields inherited from class org.cytoscape.work.AbstractTask |
---|
cancelled |
Constructor Summary | |
---|---|
AbstractCyniTask(String name,
AbstractCyniAlgorithmContext context,
org.cytoscape.model.CyNetworkFactory networkFactory,
org.cytoscape.view.model.CyNetworkViewFactory networkViewFactory,
org.cytoscape.model.CyNetworkManager networkManager,
org.cytoscape.view.model.CyNetworkViewManager networkViewManager,
org.cytoscape.model.CyNetworkTableManager netTableMgr,
org.cytoscape.model.subnetwork.CyRootNetworkManager rootNetMgr,
org.cytoscape.view.vizmap.VisualMappingManager visualMapperManager)
Constructor. |
Method Summary | |
---|---|
protected void |
addColumns(org.cytoscape.model.CyNetwork origNet,
org.cytoscape.model.CyNetwork newNet,
org.cytoscape.model.CyTable origTable,
Class<? extends org.cytoscape.model.CyIdentifiable> tableType,
String namespace)
Add a column that belongs to a table associated to a network to a new table associated to a new network |
protected void |
addVirtualColumn(org.cytoscape.model.CyColumn col,
org.cytoscape.model.CyTable subTable)
Add a virtual column to a table |
protected void |
cloneRow(org.cytoscape.model.CyNetwork newNet,
Class<? extends org.cytoscape.model.CyIdentifiable> tableType,
org.cytoscape.model.CyRow from,
org.cytoscape.model.CyRow to)
Clone a row to be added to a new network |
protected void |
copyColumn(org.cytoscape.model.CyColumn col,
org.cytoscape.model.CyTable subTable)
Copy a column to a table |
protected org.cytoscape.view.model.CyNetworkView |
displayNewNetwork(org.cytoscape.model.CyNetwork newNetwork,
org.cytoscape.model.CyNetwork oldNetwork,
boolean directed)
This method displays the new network and return a network view that might be used to modify the display features such as the layout |
protected abstract void |
doCyniTask(org.cytoscape.work.TaskMonitor taskMonitor)
This method is designed to actually encapsulate the cyni algorithm. |
protected org.cytoscape.model.CyNetwork |
getNetworkAssociatedToTable(org.cytoscape.model.CyTable table)
Checks if the table is associated to a network, if so it return the associated network otherwise it returns null |
boolean |
isGraphCyclic(int nodeToCheck)
This method allows checking if there is a cycle in a graph starting from a defined node. |
protected void |
removeNodesWithoutEdges(org.cytoscape.model.CyNetwork network)
Remove nodes that does not have any edge |
void |
run(org.cytoscape.work.TaskMonitor taskMonitor)
|
Methods inherited from class org.cytoscape.work.AbstractTask |
---|
cancel, insertTasksAfterCurrentTask, insertTasksAfterCurrentTask, setTaskIterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.cytoscape.model.CyNetworkFactory netFactory
protected org.cytoscape.view.model.CyNetworkViewFactory viewFactory
protected org.cytoscape.model.CyNetworkManager netMgr
protected org.cytoscape.view.model.CyNetworkViewManager viewMgr
protected org.cytoscape.view.vizmap.VisualMappingManager vmMgr
protected Map<Integer,ArrayList<Integer>> nodeParents
protected final boolean selectedOnly
protected int nThreads
Constructor Detail |
---|
public AbstractCyniTask(String name, AbstractCyniAlgorithmContext context, org.cytoscape.model.CyNetworkFactory networkFactory, org.cytoscape.view.model.CyNetworkViewFactory networkViewFactory, org.cytoscape.model.CyNetworkManager networkManager, org.cytoscape.view.model.CyNetworkViewManager networkViewManager, org.cytoscape.model.CyNetworkTableManager netTableMgr, org.cytoscape.model.subnetwork.CyRootNetworkManager rootNetMgr, org.cytoscape.view.vizmap.VisualMappingManager visualMapperManager)
name
- The name of the algorithm.context
- The context with the parameters to apply the algorithmnetTableMgr
- The network table manager to generate a new network and its tablerootNetMgr
- The root network manager to generate a new root networkMethod Detail |
---|
public final void run(org.cytoscape.work.TaskMonitor taskMonitor)
run
in interface org.cytoscape.work.Task
run
in class org.cytoscape.work.AbstractTask
protected void addColumns(org.cytoscape.model.CyNetwork origNet, org.cytoscape.model.CyNetwork newNet, org.cytoscape.model.CyTable origTable, Class<? extends org.cytoscape.model.CyIdentifiable> tableType, String namespace)
origNet
- The original networknewNet
- The new networkorigTable
- The original tabletableType
- The type of the tablenamespace
- The namespace of the tableprotected void addVirtualColumn(org.cytoscape.model.CyColumn col, org.cytoscape.model.CyTable subTable)
col
- The column to add.subTable
- The CyTable to add the column.protected void copyColumn(org.cytoscape.model.CyColumn col, org.cytoscape.model.CyTable subTable)
col
- The column to copysubTable
- The CyTable to add the column.protected void cloneRow(org.cytoscape.model.CyNetwork newNet, Class<? extends org.cytoscape.model.CyIdentifiable> tableType, org.cytoscape.model.CyRow from, org.cytoscape.model.CyRow to)
newNet
- The new network.tableType
- The type of the table.from
- The source rowto
- The target rowprotected org.cytoscape.model.CyNetwork getNetworkAssociatedToTable(org.cytoscape.model.CyTable table)
table
- The table to check
protected void removeNodesWithoutEdges(org.cytoscape.model.CyNetwork network)
network
- The network to remove nodesprotected org.cytoscape.view.model.CyNetworkView displayNewNetwork(org.cytoscape.model.CyNetwork newNetwork, org.cytoscape.model.CyNetwork oldNetwork, boolean directed)
newNetwork
- The new networkoldNetwork
- The old network in case we are using a table associated to a network otherwise it is a nulldirected
- Tells whether the new network is a directed graph or not
public boolean isGraphCyclic(int nodeToCheck)
nodeToCheck
- The index corresponding to the starting node from where we want to check if there is a cycle in the graph
protected abstract void doCyniTask(org.cytoscape.work.TaskMonitor taskMonitor)
taskMonitor
- Provided to allow updates to the task status.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |