Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.groups
Interface CyGroup

All Known Implementing Classes:
CyGroupImpl

public interface CyGroup

The CyGroup interface provides the methods for a group model that maintains the list of nodes belonging to a group, the parent of a particular group, and the node that represents the group. Group information is stored in the CyGroup itself, as well as in special group attributes that are associated with the network, nodes, and edges involved. These attributes provide a natural mechanism for the saving and restoration of groups. There are also opaque flags


Field Summary
static String GROUP_STATE_ATTR
          The attribute key to use for group state
static String GROUP_VIEWER_ATTR
          The attribute key to use for group viewer
static String MEMBER_LIST_ATTR
          The attribute key to use for group membership
 
Method Summary
 void addInnerEdge(CyEdge edge)
          Add an inner edge to the map.
 void addNode(CyNode node)
          Add a new node to this group
 void addOuterEdge(CyEdge edge)
          Add an outer edge to the map.
 boolean contains(CyNode node)
          Determine if a node is a member of this group
 String getGroupName()
          Return the name of this group
 CyNode getGroupNode()
          Get the CyNode that represents this group
 List<CyEdge> getInnerEdges()
          Get all of the edges completely contained within this group
 Iterator<CyNode> getNodeIterator()
          Get an iterator over all of the nodes in this group
 List<CyNode> getNodes()
          Get all of the nodes in this group
 List<CyEdge> getOuterEdges()
          Get all of the edges partially contained within this group
 int getState()
          Get the state of the group
 String getViewer()
          Get the name of the viewer for this group
 void removeNode(CyNode node)
          Remove a node from a group
 void setState(int state)
          Set the state of the group
 String toString()
          Provide the default toString method
 

Field Detail

MEMBER_LIST_ATTR

static final String MEMBER_LIST_ATTR
The attribute key to use for group membership

See Also:
Constant Field Values

GROUP_VIEWER_ATTR

static final String GROUP_VIEWER_ATTR
The attribute key to use for group viewer

See Also:
Constant Field Values

GROUP_STATE_ATTR

static final String GROUP_STATE_ATTR
The attribute key to use for group state

See Also:
Constant Field Values
Method Detail

getGroupName

String getGroupName()
Return the name of this group


getNodes

List<CyNode> getNodes()
Get all of the nodes in this group

Returns:
list of nodes in the group

getGroupNode

CyNode getGroupNode()
Get the CyNode that represents this group

Returns:
CyNode representing the group

getNodeIterator

Iterator<CyNode> getNodeIterator()
Get an iterator over all of the nodes in this group

Returns:
node iterator

getInnerEdges

List<CyEdge> getInnerEdges()
Get all of the edges completely contained within this group

Returns:
list of edges in the group

getOuterEdges

List<CyEdge> getOuterEdges()
Get all of the edges partially contained within this group

Returns:
list of edges in the group

addOuterEdge

void addOuterEdge(CyEdge edge)
Add an outer edge to the map. Some viewers may need to do this if they add and remove edges, for example.

Parameters:
edge - the CyEdge to add to the outer edge map

addInnerEdge

void addInnerEdge(CyEdge edge)
Add an inner edge to the map. Some viewers may need to do this if they add and remove edges, for example.

Parameters:
edge - the CyEdge to add to the innter edge map

contains

boolean contains(CyNode node)
Determine if a node is a member of this group

Parameters:
node - the CyNode to test
Returns:
true if node is a member of the group

setState

void setState(int state)
Set the state of the group

Parameters:
state - the state to set

getState

int getState()
Get the state of the group

Returns:
group state

toString

String toString()
Provide the default toString method

Overrides:
toString in class Object
Returns:
group name

getViewer

String getViewer()
Get the name of the viewer for this group

Returns:
viewer for this group

addNode

void addNode(CyNode node)
Add a new node to this group

Parameters:
node - the node to add

removeNode

void removeNode(CyNode node)
Remove a node from a group

Parameters:
node - the node to remove

www.cytoscape.org