Cytoscape 2.8.2 API

cytoscape
Class CyEdge

java.lang.Object
  extended by cytoscape.CyEdge
All Implemented Interfaces:
Edge, GraphObject

public class CyEdge
extends Object
implements Edge


Constructor Summary
CyEdge(RootGraph root, int rootGraphIndex)
          Creates a new CyEdge object.
 
Method Summary
static String createIdentifier(String source, String attribute_value, String target)
          A static method used to create edge identifiers.
 String getIdentifier()
          Return the edge identifier.
 RootGraph getRootGraph()
          Get the root graph for this edge.
 int getRootGraphIndex()
          Get the root graph index for this edge
 Node getSource()
          Return the source node for this edge.
 Node getTarget()
          Return the target node for this edge.
 boolean isDirected()
          DOCUMENT ME!
 boolean setIdentifier(String new_id)
          Set the identifier for this edge
 String toString()
          Return the "name" of an edge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CyEdge

public CyEdge(RootGraph root,
              int rootGraphIndex)
Creates a new CyEdge object.

Parameters:
root - the RootGraph to put the edge into
rootGraphIndex - the index to assign to this edge
Method Detail

getSource

public Node getSource()
Return the source node for this edge. All edges have a source Node and a target Node. For directed edges, the edge points from the source node to the target node, but for undirected edges, the definition of source and target is defined by the edge but which node is the source and which node is the target does not impact the behavior.

Specified by:
getSource in interface Edge
Returns:
The source Node for this edge. Note that this is returned as a Node rather than a CyNode. Generally, the Node may be safely cast to a CyNode.

getTarget

public Node getTarget()
Return the target node for this edge. All edges have a source Node and a target Node. For directed edges, the edge points from the source node to the target node, but for undirected edges, the definition of source and target is defined by the edge but which node is the source and which node is the target does not impact the behavior.

Specified by:
getTarget in interface Edge
Returns:
The target Node for this edge. Note that this is returned as a Node rather than a CyNode. Generally, the Node may be safely cast to a CyNode.

isDirected

public boolean isDirected()
DOCUMENT ME!

Specified by:
isDirected in interface Edge
Returns:
DOCUMENT ME!

getRootGraph

public RootGraph getRootGraph()
Get the root graph for this edge.

Specified by:
getRootGraph in interface GraphObject
Returns:
the root graph

getRootGraphIndex

public int getRootGraphIndex()
Get the root graph index for this edge

Specified by:
getRootGraphIndex in interface GraphObject
Returns:
the root graph index

toString

public String toString()
Return the "name" of an edge

Overrides:
toString in class Object
Returns:
string representation of the edge

getIdentifier

public String getIdentifier()
Return the edge identifier. Usually this is something of the form: "SourceNode (interaction) TargetNode".

Specified by:
getIdentifier in interface GraphObject
Returns:
edge identifier

setIdentifier

public boolean setIdentifier(String new_id)
Set the identifier for this edge

Specified by:
setIdentifier in interface GraphObject
Parameters:
new_id - The new identifier
Returns:
always returns true

createIdentifier

public static String createIdentifier(String source,
                                      String attribute_value,
                                      String target)
A static method used to create edge identifiers.


Cytoscape 2.8.2 API

Copyright 2010 Cytoscape Consortium. All rights reserved.