Package org.cytoscape.model.subnetwork
Interface CySubNetwork
-
- All Superinterfaces:
CyDisposable
,CyIdentifiable
,CyNetwork
public interface CySubNetwork extends CyNetwork
A CySubNetwork is aCyNetwork
that is contained within a parentCyNetwork
. See the description inCyRootNetwork
for a more complete description of Cytoscape's meta-network model.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.
-
-
Field Summary
-
Fields inherited from interface org.cytoscape.model.CyIdentifiable
SUID
-
Fields inherited from interface org.cytoscape.model.CyNetwork
DEFAULT_ATTRS, HIDDEN_ATTRS, LOCAL_ATTRS, NAME, SELECTED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addEdge(CyEdge edge)
Adds an edge to thisCySubNetwork
.CyEdge
addEdge(CyNode source, CyNode target, boolean directed)
A shortcut method that Creates a newCyEdge
in both this subnetwork AND in theCyRootNetwork
.CyNode
addNode()
A shortcut method that Creates a newCyNode
in both this subnetwork AND in theCyRootNetwork
.boolean
addNode(CyNode node)
Adds a node to thisCySubNetwork
.CyRootNetwork
getRootNetwork()
Return theCyRootNetwork
that contains this CySubNetwork.boolean
removeEdges(Collection<CyEdge> edge)
Removes a edge from thisCySubNetwork
but not from theCyRootNetwork
.boolean
removeNodes(Collection<CyNode> node)
Removes a node from thisCySubNetwork
but not from theCyRootNetwork
.-
Methods inherited from interface org.cytoscape.model.CyDisposable
dispose
-
Methods inherited from interface org.cytoscape.model.CyIdentifiable
getSUID
-
Methods inherited from interface org.cytoscape.model.CyNetwork
containsEdge, containsEdge, containsNode, getAdjacentEdgeIterable, getAdjacentEdgeList, getConnectingEdgeList, getDefaultEdgeTable, getDefaultNetworkTable, getDefaultNodeTable, getEdge, getEdgeCount, getEdgeList, getNeighborList, getNode, getNodeCount, getNodeList, getRow, getRow, getSavePolicy, getTable
-
-
-
-
Method Detail
-
getRootNetwork
CyRootNetwork getRootNetwork()
Return theCyRootNetwork
that contains this CySubNetwork.- Returns:
- the
CyRootNetwork
that contains this CySubNetowrk.
-
addNode
boolean addNode(CyNode node)
Adds a node to thisCySubNetwork
. Note that the added node is not a new node and must already exist in theCyRootNetwork
.- Parameters:
node
- CyNode to add to this subnetwork- Returns:
- true if the node was successfully added to the subnetwork, false otherwise.
-
addEdge
boolean addEdge(CyEdge edge)
Adds an edge to thisCySubNetwork
. Note that the added edge is not a new edge and must already exist in theCyRootNetwork
. If the nodes that define the source and target of the edge are not yet contained in the subnetwork, they will be added. The nodes must also already exist in theCyRootNetwork
.- Parameters:
edge
- CyEdge to add to this subnetwork- Returns:
- true if the edge was successfully added to the subnetwork, false otherwise.
-
addNode
CyNode addNode()
A shortcut method that Creates a newCyNode
in both this subnetwork AND in theCyRootNetwork
.- Specified by:
addNode
in interfaceCyNetwork
- Returns:
- A new CyNode that exists in both this subnetwork and the associated
CyRootNetwork
.
-
addEdge
CyEdge addEdge(CyNode source, CyNode target, boolean directed)
A shortcut method that Creates a newCyEdge
in both this subnetwork AND in theCyRootNetwork
.- Specified by:
addEdge
in interfaceCyNetwork
- Parameters:
source
- The source node of the edge. The source node must exist in the root network.target
- The target node of the edge. The target node must exist in the root network.directed
- Whether the edge should be considered directed or not.- Returns:
- A new CyEdge that exists in both this subnetwork and the associated
CyRootNetwork
.
-
removeNodes
boolean removeNodes(Collection<CyNode> node)
Removes a node from thisCySubNetwork
but not from theCyRootNetwork
. The node is removed from the CySubNetwork, but not deleted from theCyRootNetwork
.- Specified by:
removeNodes
in interfaceCyNetwork
- Parameters:
node
- Node to remove from this subnetwork- Returns:
- true if the node was successfully removed from the specified subnetwork, false otherwise.
-
removeEdges
boolean removeEdges(Collection<CyEdge> edge)
Removes a edge from thisCySubNetwork
but not from theCyRootNetwork
. The edge is removed from the CySubNetwork, but not deleted from theCyRootNetwork
.- Specified by:
removeEdges
in interfaceCyNetwork
- Parameters:
edge
- Edge to remove from this subnetwork- Returns:
- true if the edge was successfully removed from the specified subnetwork, false otherwise.
-
-