public interface CyRootNetwork extends CyNetwork
CyNetwork
created within Cytoscape
as an independent network, beginning with Cytoscape 3.0,
Cytoscape has provided a mechanism for implementing a more
complex meta-network structure that can be used for a variety
of other use cases, including implementing subnetworks
and shared nodes between subnetworks. Beyond the concepts
and methods provided by CyNetwork
a meta-network
adds three new concepts:
CyNetwork
that
adds methods for maintaining the meta-network.
All CyNode
s and CyEdge
s in all CySubNetwork
s
that are part of this CyRootNetwork.
CySubNetwork
is a set of nodes and edges
that comprise a sub-network of a CyRootNetwork
.
A CySubNetwork
may be thought of as a projection of
the graph implemented by the CyRootNetwork.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>
Modifier and Type | Field and Description |
---|---|
static String |
SHARED_ATTRS
The name of the table containing the attributes shared
by all subnetworks of this root network.
|
static String |
SHARED_DEFAULT_ATTRS
The name of the table that enables sharing default attributes
with all subnetworks.
|
static String |
SHARED_INTERACTION
The name of the shared interaction column found in the SHARED_ATTRS table.
|
static String |
SHARED_NAME
The name of the shared name column found in the SHARED_ATTRS table.
|
DEFAULT_ATTRS, HIDDEN_ATTRS, LOCAL_ATTRS, NAME, SELECTED
SUID
Modifier and Type | Method and Description |
---|---|
CySubNetwork |
addSubNetwork()
Create an empty
CySubNetwork . |
CySubNetwork |
addSubNetwork(Iterable<CyNode> nodes,
Iterable<CyEdge> edges)
|
CySubNetwork |
addSubNetwork(Iterable<CyNode> nodes,
Iterable<CyEdge> edges,
SavePolicy policy)
|
CySubNetwork |
addSubNetwork(SavePolicy policy)
Create an empty
CySubNetwork which can have a different save policy from that of this root network,
as long as the root network's policy is not SavePolicy.DO_NOT_SAVE . |
boolean |
containsNetwork(CyNetwork n)
Returns true if the network to be checked is a subnetwork of this root network and
returns false otherwise.
|
CySubNetwork |
getBaseNetwork()
|
CyTable |
getSharedEdgeTable()
Returns the edge table shared by all subnetworks.
|
CyTable |
getSharedNetworkTable()
Returns the network table shared by all subnetworks.
|
CyTable |
getSharedNodeTable()
Returns the node table shared by all subnetworks.
|
List<CySubNetwork> |
getSubNetworkList()
Will return A list of all
CySubNetwork s contained in this root network. |
void |
removeSubNetwork(CySubNetwork sub)
Removes the subnetwork from the root network, but not the nodes and edges contained
in the subnetwork.
|
addEdge, addNode, containsEdge, containsEdge, containsNode, getAdjacentEdgeIterable, getAdjacentEdgeList, getConnectingEdgeList, getDefaultEdgeTable, getDefaultNetworkTable, getDefaultNodeTable, getEdge, getEdgeCount, getEdgeList, getNeighborList, getNode, getNodeCount, getNodeList, getRow, getRow, getSavePolicy, getTable, removeEdges, removeNodes
getSUID
dispose
static final String SHARED_ATTRS
static final String SHARED_DEFAULT_ATTRS
static final String SHARED_NAME
static final String SHARED_INTERACTION
CySubNetwork addSubNetwork()
CySubNetwork
.
The new subnetwork is created with the same save policy of its root network. If you want to set a different
save policy to the new subnetwork, just use addSubNetwork(SavePolicy)
.CySubNetwork
.CySubNetwork addSubNetwork(SavePolicy policy)
CySubNetwork
which can have a different save policy from that of this root network,
as long as the root network's policy is not SavePolicy.DO_NOT_SAVE
.policy
- the save policy to follow during the life-cycle of the CyNetwork.CySubNetwork
.IllegalArgumentException
- if the save policy of this root network is
SavePolicy.DO_NOT_SAVE
, and the policy argument is not the same.CySubNetwork addSubNetwork(Iterable<CyNode> nodes, Iterable<CyEdge> edges)
CySubNetwork
containing the specified CyNode
s and
CyEdge
s. The nodes and edges must already exist in this root network.
Nodes defining the source and target of edges that have not yet been added
to the subnetwork will be added.
The new subnetwork is created with the same save policy of its root network. If you want to set a different
save policy to the new subnetwork, just use addSubNetwork(Iterable, Iterable, SavePolicy)
.nodes
- The nodes to be added to the network. May be null or empty.edges
- The edges to be added to the network. May be null or empty.CySubNetwork
.CySubNetwork addSubNetwork(Iterable<CyNode> nodes, Iterable<CyEdge> edges, SavePolicy policy)
CySubNetwork
containing the specified CyNode
s and
CyEdge
s. The nodes and edges must already exist in this root network.
Nodes defining the source and target of edges that have not yet been added
to the subnetwork will be added.
The new CySubNetwork
can have a different save policy from that of this root network, as long as the
root network's policy is not SavePolicy.DO_NOT_SAVE
.nodes
- The nodes to be added to the network. May be null or empty.edges
- The edges to be added to the network. May be null or empty.policy
- the save policy to follow during the life-cycle of the CyNetwork.CySubNetwork
.IllegalArgumentException
- if the save policy of this root network is
SavePolicy.DO_NOT_SAVE
, and the policy argument is not the same.void removeSubNetwork(CySubNetwork sub)
sub
- the CySubNetwork
to remove.List<CySubNetwork> getSubNetworkList()
CySubNetwork
s contained in this root network.CySubNetwork
s contained in this root network.CySubNetwork getBaseNetwork()
CyNode
s and CyEdge
s. Every root network
began with something, and this network is that something.CySubNetwork
that the root network began with.boolean containsNetwork(CyNetwork n)
n
- The network to be checked.CyTable getSharedNetworkTable()
CyTable getSharedNodeTable()
CyTable getSharedEdgeTable()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.