Interface CyNetworkFactory


public interface CyNetworkFactory
A singleton factory object used for instantiating CyNetwork objects. The CyNetworkFactory should be available as an OSGi service.

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 Details

    • createNetwork

      CyNetwork createNetwork()
      Returns a new, empty CyNetwork object. The new network's save policy is SavePolicy.SESSION_FILE by default. If you want to create a network that should not be saved in session files, use the createNetwork(SavePolicy) method instead, and set the save policy to SavePolicy.DO_NOT_SAVE.
      Returns:
      A new, empty CyNetwork object.
    • createNetwork

      CyNetwork createNetwork(SavePolicy policy)
      Returns a new, empty CyNetwork object.
      Parameters:
      policy - the save policy to follow during the life-cycle of the CyNetwork.
      Returns:
      A new, empty CyNetwork object.
    • createNetworkWithPrivateTables

      CyNetwork createNetworkWithPrivateTables()
      Returns a new, empty CyNetwork object where the associated default tables are private. This method should only be used in special cases where the network created is not intended to be used or shared like a normal network within the system. The new network's save policy is SavePolicy.SESSION_FILE by default. If you want to create a network that should not be saved in session files, use the createNetwork(SavePolicy) method instead, and set the save policy to SavePolicy.DO_NOT_SAVE.
      Returns:
      A new, empty CyNetwork object.
    • createNetworkWithPrivateTables

      CyNetwork createNetworkWithPrivateTables(SavePolicy policy)
      Returns a new, empty CyNetwork object where the associated default tables are private. This method should only be used in special cases where the network created is not intended to be used or shared like a normal network within the system.
      Parameters:
      policy - the save policy to follow during the life-cycle of the CyNetwork.
      Returns:
      A new, empty CyNetwork object.