Cytoscape 2.8.0 API

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_LOCAL_ATTR
          The attribute that indicates that this is a local group
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
 CyNetwork getGraphPerspective()
          Get the graph (network) that represents this network
 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
 CyNetwork getNetwork()
          Get the network for 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 removeInnerEdge(CyEdge edge)
          Remove an inner edge from the map.
 void removeNode(CyNode node)
          Remove a node from a group
 void removeOuterEdge(CyEdge edge)
          Remove an outer edge from the map.
 void setNetwork(CyNetwork network, boolean notify)
          Set the network for this 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

GROUP_LOCAL_ATTR

static final String GROUP_LOCAL_ATTR
The attribute that indicates that this is a local group

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

getNetwork

CyNetwork getNetwork()
Get the network for this group

Returns:
network for this group or "null" if this is a global group

getGraphPerspective

CyNetwork getGraphPerspective()
Get the graph (network) that represents this network

Returns:
graph perspective (in the form of a CyNetwork) for this network

setNetwork

void setNetwork(CyNetwork network,
                boolean notify)
Set the network for this group

Parameters:
network - the network for this group or "null" if this is a global group
notify - notify listeners of the change

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

removeOuterEdge

void removeOuterEdge(CyEdge edge)
Remove an outer edge from 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

removeInnerEdge

void removeInnerEdge(CyEdge edge)
Remove an inner edge from 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

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.