org.cytoscape.cyni
Class CyniNetworkUtils

java.lang.Object
  extended by org.cytoscape.cyni.CyniNetworkUtils

public class CyniNetworkUtils
extends Object

This is a class that contains several methods to help while creating a new network


Field Summary
protected  org.cytoscape.model.CyNetworkManager netMgr
           
protected  org.cytoscape.view.model.CyNetworkViewFactory viewFactory
           
protected  org.cytoscape.view.model.CyNetworkViewManager viewMgr
           
protected  org.cytoscape.view.vizmap.VisualMappingManager vmMgr
           
 
Constructor Summary
CyniNetworkUtils(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
 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 columns that belong to a table associated to a network to a new table associated to a new network.
 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
 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
 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
 void removeNodesWithoutEdges(org.cytoscape.model.CyNetwork network)
          Remove nodes that do not have any edge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewFactory

protected org.cytoscape.view.model.CyNetworkViewFactory viewFactory

netMgr

protected org.cytoscape.model.CyNetworkManager netMgr

viewMgr

protected org.cytoscape.view.model.CyNetworkViewManager viewMgr

vmMgr

protected org.cytoscape.view.vizmap.VisualMappingManager vmMgr
Constructor Detail

CyniNetworkUtils

public CyniNetworkUtils(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.

Parameters:
networkViewFactory - The network view factory to create a new network view
networkManager - The network manager
networkViewManager - The network view manager
netTableMgr - The network table manager to generate a new network and its table
rootNetMgr - The root network manager to generate a new root network
vmMgr - The Visual mapping manager that allows changing the visual style of a network
Method Detail

addColumns

public 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 columns that belong to a table associated to a network to a new table associated to a new network. Basically, allows copying all columns from one table to another one

Parameters:
origNet - The original network
newNet - The new network
origTable - The original table
tableType - The type of the table
namespace - The namespace of the table

cloneRow

public 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

Parameters:
newNet - The new network.
tableType - The type of the table.
from - The source row
to - The target row

getNetworkAssociatedToTable

public 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

Parameters:
table - The table to check
Returns:
null if no network is associated to the table or the network associated

removeNodesWithoutEdges

public void removeNodesWithoutEdges(org.cytoscape.model.CyNetwork network)
Remove nodes that do not have any edge

Parameters:
network - The network to remove nodes

displayNewNetwork

public 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

Parameters:
newNetwork - The new network
oldNetwork - The old network in case we are using a table associated to a network otherwise it is a null
directed - Tells whether the new network is a directed graph or not
Returns:
the new network view


Copyright © 2013. All Rights Reserved.