Interface CyGroupManager


public interface CyGroupManager
The CyGroupManager maintains information about all of the groups an instance of Cytoscape.

Module: group-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>group-api</artifactId>
</dependency>

Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
  • Method Details

    • getGroupSet

      Set<CyGroup> getGroupSet(CyNetwork network)
      Provides the set of all the groups known to the groups manager in a particular network.
      Parameters:
      network - the network to get the groups from. If the network is null, then return only those groups that have been designated as "global" (no referenced network) for this CyRootNetwork
      Returns:
      the complete set of all the currently known groups in a Cytoscape network
    • getGroupsForNode

      List<CyGroup> getGroupsForNode(CyNode node)
      Return the list of CyGroups this node is in.
      Parameters:
      node - the CyNode we want get the groups for
      Returns:
      the list of CyGroups the node is in null if it is not in any groups
    • getGroupsForNode

      List<CyGroup> getGroupsForNode(CyNode node, CyNetwork network)
      Return the list of CyGroups this node is in for a particular network.
      Parameters:
      node - the CyNode we want get the groups for
      network - the CyNetwork we want to restrict our search to
      Returns:
      the list of CyGroups the node is in null if it is not in any groups
    • isGroup

      boolean isGroup(CyNode node, CyNetwork network)
      Test to see if this node represents a CyGroup in a particular CyNetwork.
      Parameters:
      node - the CyNode to test
      network - the CyNetwork to test
      Returns:
      true if this node represents a group
    • getGroup

      CyGroup getGroup(CyNode node, CyNetwork network)
      Return the group the corresponds to a particular node in a CyNetwork.
      Parameters:
      node - the CyNode to test
      network - the CyNetwork to test
      Returns:
      the CyGroup that corresponds to the node, or null if this group doesn't exist in the network
    • destroyGroup

      void destroyGroup(CyGroup group)
      Destroy a group.
      Parameters:
      group - the CyGroup to remove.
    • addGroup

      void addGroup(CyGroup group)
      Registers a group with the group manager. Does nothing if the group is already known to the group manager. Fires GroupAddedEvent.
      Parameters:
      group - a non-null CyGroup
    • addGroups

      void addGroups(List<CyGroup> groups)
      Registers a list of groups with the group manager. Does nothing if the group is already known to the group manager.
      Parameters:
      groups - a list of CyGroup
    • reset

      void reset()
      Releases all currently held references and resources.