org.eclipse.ohf.stem.core.graph
Interface Edge

All Superinterfaces:
org.eclipse.emf.ecore.EObject, Identifiable, org.eclipse.emf.common.notify.Notifier, SanityChecker
All Known Implementing Classes:
EdgeImpl

public interface Edge
extends Identifiable

An Edge represents a relationship between two Nodes. The attributes of that relationship are defined by the Edge's Label.

An Edge can be directed or undirected. If the Edge is directed then the relationship is "one-way" from Node "A" to Node "B". An example of such a relationship is "physically contains", where the entity represented by Node "B" is physically contained in the entity represented by Node "A" (e.g., Santa Clara county is physically contained in the state of California). If the Edge is undirected then the relationship is symetric, meaning that it holds both ways. An example of such a relationship is "shares common border", where the entity represented by Node "A" shares a common border with the entity represented by Node "B" (e.g., Santa Clara county shares a common border with Santa Cruz county).

See Also:
Graph

Field Summary
static java.lang.String URI_TYPE_EDGE_SEGMENT
          This is the segment of the type URI that prefixes all other segments in a edge URI.
 
Method Summary
 Node getA()
           
 Node getB()
           
 EdgeLabel getLabel()
           
 org.eclipse.emf.common.util.URI getNodeAURI()
           
 org.eclipse.emf.common.util.URI getNodeBURI()
           
 Node getOtherNode(Node node)
           
 boolean isDirected()
           
 boolean isDirectedAt(Node node)
           
 void setA(Node value)
          Sets the value of the 'A' reference.
 void setB(Node value)
          Sets the value of the 'B' reference.
 void setDirected(boolean value)
          Sets the value of the 'Directed' attribute.
 void setLabel(EdgeLabel value)
          Sets the value of the 'Label' containment reference.
 void setNodeAURI(org.eclipse.emf.common.util.URI value)
          Sets the value of the 'Node AURI' attribute.
 void setNodeBURI(org.eclipse.emf.common.util.URI value)
          Sets the value of the 'Node BURI' attribute.
 
Methods inherited from interface org.eclipse.ohf.stem.core.common.Identifiable
getDublinCore, getTypeURI, getURI, sane, setDublinCore, setTypeURI, setURI
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

URI_TYPE_EDGE_SEGMENT

static final java.lang.String URI_TYPE_EDGE_SEGMENT
This is the segment of the type URI that prefixes all other segments in a edge URI.

See Also:
Constant Field Values
Method Detail

getA

Node getA()
Returns:
the "A" Node of the edge. Directed edges go from Node A to Node B. In a graph fragment this value may not yet be set.

setA

void setA(Node value)
Sets the value of the 'A' reference.

Parameters:
value - the new value of the 'A' reference.
See Also:
getA()

getNodeAURI

org.eclipse.emf.common.util.URI getNodeAURI()
Returns:
the URI of Node A.

setNodeAURI

void setNodeAURI(org.eclipse.emf.common.util.URI value)
Sets the value of the 'Node AURI' attribute.

Parameters:
value - the new value of the 'Node AURI' attribute.
See Also:
getNodeAURI()

getB

Node getB()
Returns:
the "B" Node of the edge. Directed edges go from Node A to Node B. In a graph fragment this value may not yet be set.

setB

void setB(Node value)
Sets the value of the 'B' reference.

Parameters:
value - the new value of the 'B' reference.
See Also:
getB()

getNodeBURI

org.eclipse.emf.common.util.URI getNodeBURI()
Returns:
the URI of Node B.

setNodeBURI

void setNodeBURI(org.eclipse.emf.common.util.URI value)
Sets the value of the 'Node BURI' attribute.

Parameters:
value - the new value of the 'Node BURI' attribute.
See Also:
getNodeBURI()

getOtherNode

Node getOtherNode(Node node)
                  throws java.lang.IllegalArgumentException
Parameters:
node - one of the two Nodes of the Edge
Returns:
Node A if Node B is passed in, otherwise return Node B if Node A is passed in.
Throws:
java.lang.IllegalArgumentException - if the Node passed in is not either Node A or Node B of this Edge.

getLabel

EdgeLabel getLabel()
Returns:
the EdgeLabel of the Edge, if it exists.

setLabel

void setLabel(EdgeLabel value)
Sets the value of the 'Label' containment reference.

Parameters:
value - the new value of the 'Label' containment reference.
See Also:
getLabel()

isDirected

boolean isDirected()
Returns:
true if the Edge is a directed Edge (directed Edges are always from Node A to Node B).

setDirected

void setDirected(boolean value)
Sets the value of the 'Directed' attribute.

Parameters:
value - the new value of the 'Directed' attribute.
See Also:
isDirected()

isDirectedAt

boolean isDirectedAt(Node node)
Parameters:
node - the Node under test
Returns:
true if the Edge is a directed Edge and the Node under test is Node B.