Package org.cytoscape.model
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 Summary
Modifier and TypeMethodDescriptionReturns a new, emptyCyNetwork
object.createNetwork(SavePolicy policy)
Returns a new, emptyCyNetwork
object.Returns a new, emptyCyNetwork
object where the associated default tables are private.createNetworkWithPrivateTables(SavePolicy policy)
Returns a new, emptyCyNetwork
object where the associated default tables are private.
-
Method Details
-
createNetwork
CyNetwork createNetwork()Returns a new, emptyCyNetwork
object. The new network's save policy isSavePolicy.SESSION_FILE
by default. If you want to create a network that should not be saved in session files, use thecreateNetwork(SavePolicy)
method instead, and set the save policy toSavePolicy.DO_NOT_SAVE
.- Returns:
- A new, empty
CyNetwork
object.
-
createNetwork
Returns a new, emptyCyNetwork
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, emptyCyNetwork
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 isSavePolicy.SESSION_FILE
by default. If you want to create a network that should not be saved in session files, use thecreateNetwork(SavePolicy)
method instead, and set the save policy toSavePolicy.DO_NOT_SAVE
.- Returns:
- A new, empty
CyNetwork
object.
-
createNetworkWithPrivateTables
Returns a new, emptyCyNetwork
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.
-