org.eclipse.ohf.stem.core.graph.impl
Class EdgeImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended by org.eclipse.emf.ecore.impl.EObjectImpl
              extended by org.eclipse.ohf.stem.core.common.impl.IdentifiableImpl
                  extended by org.eclipse.ohf.stem.core.graph.impl.EdgeImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, Identifiable, SanityChecker, Edge

public class EdgeImpl
extends IdentifiableImpl
implements Edge

An implementation of the model object 'Edge'.

The following features are implemented:


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
 
Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
ELAST_EOBJECT_FLAG
 
Fields inherited from interface org.eclipse.ohf.stem.core.graph.Edge
URI_TYPE_EDGE_SEGMENT
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Method Summary
 Node basicGetA()
           
 Node basicGetB()
           
 org.eclipse.emf.common.notify.NotificationChain basicSetLabel(EdgeLabel newLabel, org.eclipse.emf.common.notify.NotificationChain msgs)
           
static Edge createEdge(Node nodeA, Node nodeB)
          Create an undirected edge between two nodes
static Edge createEdge(Node nodeA, Node nodeB, boolean directed)
          Create an edge between the two nodes
static Edge createEdge(Node nodeA, Node nodeB, boolean directed, org.eclipse.emf.common.util.URI edgeURI)
          Create an edge between the two nodes
static Edge createEdge(Node nodeA, Node nodeB, org.eclipse.emf.common.util.URI edgeURI)
          Create an undirected edge between two nodes
static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI)
          Create an undirected edge with two node URI's
static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI, boolean directed)
          Create an edge with two node URI's
static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI, boolean directed, org.eclipse.emf.common.util.URI edgeURI)
          Create an edge with two node URI's
static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI, org.eclipse.emf.common.util.URI nodeBURI, org.eclipse.emf.common.util.URI edgeURI)
          Create an undirected edge with two node URI's
 java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(int featureID)
           
 void eSet(int featureID, java.lang.Object newValue)
           
 void eUnset(int featureID)
           
 Node getA()
           
 Node getB()
           
 EdgeLabel getLabel()
           
 org.eclipse.emf.common.util.URI getNodeAURI()
           
 org.eclipse.emf.common.util.URI getNodeBURI()
           
 Node getOtherNode(Node node)
          Given one node of an edge, return the other.
 boolean isDirected()
           
 boolean isDirectedAt(Node node)
           
 boolean sane()
           
 void setA(Node newA)
           
 void setB(Node newB)
           
 void setDirected(boolean newDirected)
           
 void setLabel(EdgeLabel newLabel)
           
 void setNodeAURI(org.eclipse.emf.common.util.URI newNodeAURI)
           
 void setNodeBURI(org.eclipse.emf.common.util.URI newNodeBURI)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ohf.stem.core.common.impl.IdentifiableImpl
basicSetDublinCore, getDublinCore, getTypeURI, getURI, setDublinCore, setTypeURI, setURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ohf.stem.core.common.Identifiable
getDublinCore, getTypeURI, getURI, 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
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Method Detail

createEdge

public static Edge createEdge(Node nodeA,
                              Node nodeB)
Create an undirected edge between two nodes

Parameters:
nodeA - the first node
nodeB - the second node
Returns:
an edge between nodeA and nodeB, if directed then from nodeA to nodeB

createEdge

public static Edge createEdge(Node nodeA,
                              Node nodeB,
                              org.eclipse.emf.common.util.URI edgeURI)
Create an undirected edge between two nodes

Parameters:
nodeA - the first node
nodeB - the second node
edgeURI - if non-null then the URI to use for the edge, if null then the default is used.
Returns:
an edge between nodeA and nodeB, if directed then from nodeA to nodeB

createEdge

public static Edge createEdge(Node nodeA,
                              Node nodeB,
                              boolean directed)
Create an edge between the two nodes

Parameters:
nodeA - the first node
nodeB - the second node
Returns:
an edge between nodeA and nodeB, if directed then from nodeA to nodeB

createEdge

public static Edge createEdge(Node nodeA,
                              Node nodeB,
                              boolean directed,
                              org.eclipse.emf.common.util.URI edgeURI)
Create an edge between the two nodes

Parameters:
nodeA - the first node
nodeB - the second node
edgeURI - if non-null then the URI to use for the edge, if null then the default is used.
Returns:
an edge between nodeA and nodeB, if directed then from nodeA to nodeB

createEdge

public static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI,
                              org.eclipse.emf.common.util.URI nodeBURI)
Create an undirected edge with two node URI's

Parameters:
nodeAURI - the first node's URI
nodeBURI - the second node's URI
Returns:
an edge with two URI's, if directed then from nodeAURI to nodeBURI

createEdge

public static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI,
                              org.eclipse.emf.common.util.URI nodeBURI,
                              org.eclipse.emf.common.util.URI edgeURI)
Create an undirected edge with two node URI's

Parameters:
nodeAURI - the first node's URI
nodeBURI - the second node's URI
edgeURI - if non-null then the URI to use for the edge, if null then the default is used.
Returns:
an edge with two URI's, if directed then from nodeAURI to nodeBURI

createEdge

public static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI,
                              org.eclipse.emf.common.util.URI nodeBURI,
                              boolean directed)
Create an edge with two node URI's

Parameters:
nodeAURI - the first node's URI
nodeBURI - the second node's URI
directed - true if the edge is directed from nodeAURI to nodeBURI
Returns:
an edge with two URI's, if directed then from nodeAURI to nodeBURI

createEdge

public static Edge createEdge(org.eclipse.emf.common.util.URI nodeAURI,
                              org.eclipse.emf.common.util.URI nodeBURI,
                              boolean directed,
                              org.eclipse.emf.common.util.URI edgeURI)
Create an edge with two node URI's

Parameters:
nodeAURI - the first node's URI
nodeBURI - the second node's URI
directed - true if the edge is directed from nodeAURI to nodeBURI
edgeURI - if non-null then the URI to use for the edge, if null then the default is used.
Returns:
an edge with two URI's, if directed then from nodeAURI to nodeBURI

getA

public Node getA()

Specified by:
getA in interface Edge
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.

basicGetA

public Node basicGetA()


setA

public void setA(Node newA)

Specified by:
setA in interface Edge
Parameters:
newA - the new value of the 'A' reference.
See Also:
Edge.getA()

getNodeAURI

public org.eclipse.emf.common.util.URI getNodeAURI()

Specified by:
getNodeAURI in interface Edge
Returns:
the URI of Node A.

setNodeAURI

public void setNodeAURI(org.eclipse.emf.common.util.URI newNodeAURI)

Specified by:
setNodeAURI in interface Edge
Parameters:
newNodeAURI - the new value of the 'Node AURI' attribute.
See Also:
Edge.getNodeAURI()

getB

public Node getB()

Specified by:
getB in interface Edge
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.

basicGetB

public Node basicGetB()


setB

public void setB(Node newB)

Specified by:
setB in interface Edge
Parameters:
newB - the new value of the 'B' reference.
See Also:
Edge.getB()

getNodeBURI

public org.eclipse.emf.common.util.URI getNodeBURI()

Specified by:
getNodeBURI in interface Edge
Returns:
the URI of Node B.

setNodeBURI

public void setNodeBURI(org.eclipse.emf.common.util.URI newNodeBURI)

Specified by:
setNodeBURI in interface Edge
Parameters:
newNodeBURI - the new value of the 'Node BURI' attribute.
See Also:
Edge.getNodeBURI()

getLabel

public EdgeLabel getLabel()

Specified by:
getLabel in interface Edge
Returns:
the EdgeLabel of the Edge, if it exists.

basicSetLabel

public org.eclipse.emf.common.notify.NotificationChain basicSetLabel(EdgeLabel newLabel,
                                                                     org.eclipse.emf.common.notify.NotificationChain msgs)


setLabel

public void setLabel(EdgeLabel newLabel)

Specified by:
setLabel in interface Edge
Parameters:
newLabel - the new value of the 'Label' containment reference.
See Also:
Edge.getLabel()

isDirected

public boolean isDirected()

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

setDirected

public void setDirected(boolean newDirected)

Specified by:
setDirected in interface Edge
Parameters:
newDirected - the new value of the 'Directed' attribute.
See Also:
Edge.isDirected()

getOtherNode

public Node getOtherNode(Node node)
Given one node of an edge, return the other.

Specified by:
getOtherNode in interface Edge
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.

isDirectedAt

public boolean isDirectedAt(Node node)

Specified by:
isDirectedAt in interface Edge
Parameters:
node - the Node under test
Returns:
true if the node is B and the edge is directed.

eInverseAdd

public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                   int featureID,
                                                                   org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseAdd in class org.eclipse.emf.ecore.impl.BasicEObjectImpl

eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd,
                                                                      int featureID,
                                                                      org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
eInverseRemove in class IdentifiableImpl

eGet

public java.lang.Object eGet(int featureID,
                             boolean resolve,
                             boolean coreType)

Specified by:
eGet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eGet in class IdentifiableImpl

eSet

public void eSet(int featureID,
                 java.lang.Object newValue)

Specified by:
eSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eSet in class IdentifiableImpl

eUnset

public void eUnset(int featureID)

Specified by:
eUnset in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eUnset in class IdentifiableImpl

eIsSet

public boolean eIsSet(int featureID)

Specified by:
eIsSet in interface org.eclipse.emf.ecore.InternalEObject
Overrides:
eIsSet in class IdentifiableImpl

toString

public java.lang.String toString()

Overrides:
toString in class IdentifiableImpl

sane

public boolean sane()
Description copied from class: IdentifiableImpl

Specified by:
sane in interface Identifiable
Specified by:
sane in interface SanityChecker
Overrides:
sane in class IdentifiableImpl
Returns:
true if the instance is "sane", false otherwise.
See Also:
com.ibm.almaden.stem.common.impl.IdentifiableImpl#sane()