Interface CyNetworkManager


  • public interface CyNetworkManager
    Basic access to networks and view in an instance of Cytoscape.

    Module: model-api

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

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>model-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 Detail

      • getNetworkSet

        Set<CyNetwork> getNetworkSet()
        Provides the set of all the networks known to the network manager.
        Returns:
        the complete set of all the currently known networks in Cytoscape
      • getNetwork

        CyNetwork getNetwork​(long id)
        Returns the network corresponding to the provided ID
        Parameters:
        id - an ID for an existing network
        Returns:
        null if "id" does not correspond to a network known to the network manager or the actual network if "id" does correspond to a network
      • networkExists

        boolean networkExists​(long networkId)
        Tests whether a network has been registered with the network manager or not.
        Parameters:
        networkId - possibly the ID of a network
        Returns:
        true if "networkId" does correspond to a network known to the network manager, else false
      • destroyNetwork

        void destroyNetwork​(CyNetwork network)
        Destroys a network.
        Parameters:
        network - a non-null reference to a CyNetwork
      • addNetwork

        void addNetwork​(CyNetwork network)
        Registers a network with the network manager and sets the network as current. Does nothing if the network is already known to the network manager. This has the same effect as addNetwork(network, true);
        Parameters:
        network - a non-null CyNetwork
      • addNetwork

        void addNetwork​(CyNetwork network,
                        boolean setCurrent)
        Registers a network with the network manager. Does nothing if the network is already known to the network manager.
        Parameters:
        network - a non-null CyNetwork
        setCurrent - if true, also sets the new network as current
      • reset

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