Package org.cytoscape.model.subnetwork
Interface CySubNetwork
-
- All Superinterfaces:
CyDisposable,CyIdentifiable,CyNetwork
public interface CySubNetwork extends CyNetwork
A CySubNetwork is aCyNetworkthat is contained within a parentCyNetwork. See the description inCyRootNetworkfor a more complete description of Cytoscape's meta-network model.Module:
model-apiTo 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 booleanaddEdge(CyEdge edge)Adds an edge to thisCySubNetwork.CyEdgeaddEdge(CyNode source, CyNode target, boolean directed)A shortcut method that Creates a newCyEdgein both this subnetwork AND in theCyRootNetwork.CyNodeaddNode()A shortcut method that Creates a newCyNodein both this subnetwork AND in theCyRootNetwork.booleanaddNode(CyNode node)Adds a node to thisCySubNetwork.CyRootNetworkgetRootNetwork()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
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 theCyRootNetworkthat contains this CySubNetwork.- Returns:
- the
CyRootNetworkthat 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 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
CyEdge addEdge(CyNode source, CyNode target, boolean directed)
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
boolean removeNodes(Collection<CyNode> node)
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
boolean removeEdges(Collection<CyEdge> edge)
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.
-
-