Class NetworkUtil

java.lang.Object
org.cy3sbml.util.NetworkUtil

public class NetworkUtil extends Object
Helpers for the networks of a collection: the root network, the subnetworks, and the selection of nodes.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Optional<org.cytoscape.model.CyNetwork>
    findBaseNetwork(Collection<org.cytoscape.model.CyNetwork> networks, Long rootSUID)
    The base network of the collection with the root network SUID.
    static Optional<org.cytoscape.model.CyNetwork>
    findTargetNetwork(Collection<org.cytoscape.model.CyNetwork> networks, Long rootSUID, String cyId)
    The network of the collection with the root network SUID that has a node for the element with the cyId: the base network if it has the node, else the kinetic or the all network.
    static org.cytoscape.model.CyNetwork
    getRootNetwork(org.cytoscape.model.CyNetwork network)
    The root network of the network.
    static Long
    getRootNetworkSUID(org.cytoscape.model.CyNetwork network)
    The SUID of the root network of the network.
    static org.cytoscape.model.CyNetwork
    getSubnetwork(org.cytoscape.model.CyNetwork[] networks, String suffix)
    Returns the subnetwork with the given suffix, e.g.
    static boolean
    isSBMLNetwork(org.cytoscape.model.CyNetwork cyNetwork)
    Whether the network was created by cy3sbml: its network table has the SBML network type column.
    static void
    selectById(org.cytoscape.model.CyNetwork network, String id)
    Selects the node with the SBML id, unselecting all other nodes.
    static void
    selectByMetaId(org.cytoscape.model.CyNetwork network, String metaId)
    Selects the node with the cyId (metaId), unselecting all other nodes.
    static void
    selectNodeInNetwork(org.cytoscape.model.CyNetwork network, org.cytoscape.model.CyNode node)
    Selects the node in the network, unselecting all other nodes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NetworkUtil

      public NetworkUtil()
  • Method Details

    • getRootNetworkSUID

      public static Long getRootNetworkSUID(org.cytoscape.model.CyNetwork network)
      The SUID of the root network of the network.
      Parameters:
      network - a subnetwork, may be null
      Returns:
      the root network SUID, null if the network is null
    • getRootNetwork

      public static org.cytoscape.model.CyNetwork getRootNetwork(org.cytoscape.model.CyNetwork network)
      The root network of the network.
      Parameters:
      network - a subnetwork, may be null
      Returns:
      the root network, null if the network is null
    • isSBMLNetwork

      public static boolean isSBMLNetwork(org.cytoscape.model.CyNetwork cyNetwork)
      Whether the network was created by cy3sbml: its network table has the SBML network type column. It does not require that the network is in the mapping.
      Parameters:
      cyNetwork - the network
      Returns:
      true for an SBML network
    • getSubnetwork

      public static org.cytoscape.model.CyNetwork getSubnetwork(org.cytoscape.model.CyNetwork[] networks, String suffix)
      Returns the subnetwork with the given suffix, e.g. SBML.SUFFIX_SUBNETWORK_KINETIC: the first network named like its root network plus the suffix. Returns null if no such network exists.
    • findTargetNetwork

      public static Optional<org.cytoscape.model.CyNetwork> findTargetNetwork(Collection<org.cytoscape.model.CyNetwork> networks, Long rootSUID, String cyId)
      The network of the collection with the root network SUID that has a node for the element with the cyId: the base network if it has the node, else the kinetic or the all network.
    • findBaseNetwork

      public static Optional<org.cytoscape.model.CyNetwork> findBaseNetwork(Collection<org.cytoscape.model.CyNetwork> networks, Long rootSUID)
      The base network of the collection with the root network SUID.
    • selectByMetaId

      public static void selectByMetaId(org.cytoscape.model.CyNetwork network, String metaId)
      Selects the node with the cyId (metaId), unselecting all other nodes.
      Parameters:
      network - the network
      metaId - the cyId of the node
    • selectById

      public static void selectById(org.cytoscape.model.CyNetwork network, String id)
      Selects the node with the SBML id, unselecting all other nodes.
      Parameters:
      network - the network
      id - the SBML id of the node
    • selectNodeInNetwork

      public static void selectNodeInNetwork(org.cytoscape.model.CyNetwork network, org.cytoscape.model.CyNode node)
      Selects the node in the network, unselecting all other nodes. Does nothing for null.
      Parameters:
      network - the network
      node - the node, may be null