Class Network2CofactorMapper

java.lang.Object
org.cy3sbml.cofactors.Network2CofactorMapper
All Implemented Interfaces:
Serializable

public class Network2CofactorMapper extends Object implements Serializable
The split cofactor nodes of the networks, per (sub)network SUID.

For every split cofactor node the mapper stores its clones, the position of the node before the split, and for every edge of a clone the original edge of the cofactor it stands for. The original nodes and edges stay in the root network, so a merge adds them back.

Reached from the Cytoscape event/EDT thread, the task threads and the session serialization, so every method is synchronized on the instance; collections are returned as copies. The fields cofactor2clone and clone2cofactor keep their names and types, so session files written by an older version still deserialize; the fields added later are null in those and created on first use.

See Also:
  • Constructor Details

    • Network2CofactorMapper

      public Network2CofactorMapper()
  • Method Details

    • keySet

      public Set<Long> keySet()
      The networks with split cofactors.
    • putClone

      public void putClone(Long networkSUID, Long cofactorSUID, Long cloneSUID)
      Stores a clone of the cofactor node.
    • getCofactors

      public Set<Long> getCofactors(Long networkSUID)
      The split cofactor nodes of the network.
    • getClones

      public Set<Long> getClones(Long networkSUID, Long cofactorSUID)
      The clones of the cofactor node, empty if it is not split.
    • getCofactor

      public Long getCofactor(Long networkSUID, Long cloneSUID)
      The cofactor node of the clone, or null if the node is no clone.
    • putCloneEdge

      public void putCloneEdge(Long networkSUID, Long cloneEdgeSUID, Long edgeSUID)
      Stores the original edge a clone edge stands for.
    • getOriginalEdge

      public Long getOriginalEdge(Long networkSUID, Long cloneEdgeSUID)
      The original edge of a clone edge, or null if the edge is no clone edge.
    • getCloneEdges

      public Map<Long,Long> getCloneEdges(Long networkSUID)
      The clone edges of the network with their original edges.
    • removeCloneEdge

      public void removeCloneEdge(Long networkSUID, Long cloneEdgeSUID)
    • putPosition

      public void putPosition(Long networkSUID, Long cofactorSUID, double x, double y)
      Stores the position of the cofactor node before the split.
    • getPosition

      public double[] getPosition(Long networkSUID, Long cofactorSUID)
      The position of the cofactor node before the split, or null if unknown.
    • removeCofactor

      public void removeCofactor(Long networkSUID, Long cofactorSUID)
      Removes the cofactor node with its clones and position; its clone edges are removed one by one.
    • removeNetwork

      public void removeNetwork(Long networkSUID)
      Removes all entries of the network, e.g. when it is destroyed.
    • toString

      public String toString()
      Overrides:
      toString in class Object