Package org.cytoscape.model
Class CyTableUtil
- java.lang.Object
-
- org.cytoscape.model.CyTableUtil
-
public class CyTableUtil extends Object
A collection of state-less, static utility methods provided to simplify querying of table objects.Module:
model-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>model-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (Static Class): This class is static and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<String>
getColumnNames(CyTable table)
Returns all the column names of a given table.static List<CyEdge>
getEdgesInState(CyNetwork net, String columnName, boolean state)
A utility method that returns a list of edges that have a boolean attribute in theCyNetwork.DEFAULT_ATTRS
namespace specified by columnName and are in the specified state.static List<CyNode>
getNodesInState(CyNetwork net, String columnName, boolean state)
A utility method that returns a list of nodes that have a boolean attribute in theCyNetwork.DEFAULT_ATTRS
namespace specified by columnName and are in the specified state.static List<CyEdge>
getSelectedEdges(CyNetwork network)
Equivalent tostatic List<CyNode>
getSelectedNodes(CyNetwork network)
Equivalent to
-
-
-
Method Detail
-
getNodesInState
public static List<CyNode> getNodesInState(CyNetwork net, String columnName, boolean state)
A utility method that returns a list of nodes that have a boolean attribute in theCyNetwork.DEFAULT_ATTRS
namespace specified by columnName and are in the specified state. If the attribute doesn't exist or is not of type Boolean an IllegalArgumentException will be thrown.- Parameters:
net
- The network to be queried.columnName
- The name of the column to be tested.state
- The state being queried.- Returns:
- a list of nodes that have a boolean attribute in the
CyNetwork.DEFAULT_ATTRS
namespace specified by columnName and are in the specified state.
-
getSelectedNodes
public static List<CyNode> getSelectedNodes(CyNetwork network)
Equivalent togetNodesInState(network, CyNetwork.SELECTED, true);
- Parameters:
network
- The network to be queried.- Returns:
- a list of nodes that are in the selected state
-
getEdgesInState
public static List<CyEdge> getEdgesInState(CyNetwork net, String columnName, boolean state)
A utility method that returns a list of edges that have a boolean attribute in theCyNetwork.DEFAULT_ATTRS
namespace specified by columnName and are in the specified state. If the attribute doesn't exist or is not of type Boolean an IllegalArgumentException will be thrown.- Parameters:
net
- The network to be queried.columnName
- The name of the column to be tested.state
- The state being queried.- Returns:
- a list of edges that have a boolean attribute in the
CyNetwork.DEFAULT_ATTRS
namespace specified by columnName and are in the specified state.
-
getSelectedEdges
public static List<CyEdge> getSelectedEdges(CyNetwork network)
Equivalent togetEdgesInState(network, CyNetwork.SELECTED, true);
- Parameters:
network
- The network to be queried.- Returns:
- a list of edges that are in the selected state
-
-