Package org.cytoscape.model.subnetwork
Interface CySubNetwork
- All Superinterfaces:
CyDisposable,CyIdentifiable,CyNetwork
A CySubNetwork is a
CyNetwork that is contained within a parent
CyNetwork. See the description in CyRootNetwork 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
SUIDFields inherited from interface org.cytoscape.model.CyNetwork
DEFAULT_ATTRS, HIDDEN_ATTRS, LOCAL_ATTRS, NAME, SELECTED -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds an edge to thisCySubNetwork.A shortcut method that Creates a newCyEdgein both this subnetwork AND in theCyRootNetwork.addNode()A shortcut method that Creates a newCyNodein both this subnetwork AND in theCyRootNetwork.booleanAdds a node to thisCySubNetwork.Return theCyRootNetworkthat contains this CySubNetwork.booleanremoveEdges(Collection<CyEdge> edge) Removes a edge from thisCySubNetworkbut not from theCyRootNetwork.booleanremoveNodes(Collection<CyNode> node) Removes a node from thisCySubNetworkbut not from theCyRootNetwork.Methods inherited from interface org.cytoscape.model.CyDisposable
disposeMethods inherited from interface org.cytoscape.model.CyIdentifiable
getSUIDMethods 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 Details
-
getRootNetwork
CyRootNetwork getRootNetwork()Return theCyRootNetworkthat contains this CySubNetwork.- Returns:
- the
CyRootNetworkthat contains this CySubNetowrk.
-
addNode
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
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 newCyNodein both this subnetwork AND in theCyRootNetwork.- Specified by:
addNodein interfaceCyNetwork- Returns:
- A new CyNode that exists in both this subnetwork and the associated
CyRootNetwork.
-
addEdge
A shortcut method that Creates a newCyEdgein both this subnetwork AND in theCyRootNetwork.- Specified by:
addEdgein 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
Removes a node from thisCySubNetworkbut not from theCyRootNetwork. The node is removed from the CySubNetwork, but not deleted from theCyRootNetwork.- Specified by:
removeNodesin interfaceCyNetwork- Parameters:
node- Node to remove from this subnetwork- Returns:
- true if the node was successfully removed from the specified subnetwork, false otherwise.
-
removeEdges
Removes a edge from thisCySubNetworkbut not from theCyRootNetwork. The edge is removed from the CySubNetwork, but not deleted from theCyRootNetwork.- Specified by:
removeEdgesin interfaceCyNetwork- Parameters:
edge- Edge to remove from this subnetwork- Returns:
- true if the edge was successfully removed from the specified subnetwork, false otherwise.
-