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

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.GraphImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, Identifiable, SanityChecker, Graph

public class GraphImpl
extends IdentifiableImpl
implements Graph

An implementation of the model object 'Graph'.

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.Graph
URI_TYPE_GRAPH_SEGMENT
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Method Summary
 void addDynamicLabel(DynamicLabel dynamiclabel)
           
 void addGraph(Graph graph)
          This method adds the Edges, Nodes, Labels and Decorator from another graph to the collections maintained by this graph.
 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)
           
 org.eclipse.emf.common.util.EList<Decorator> getDecorators()
           
 org.eclipse.emf.common.util.EList<DynamicLabel> getDynamicLabels()
           
 Edge getEdge(org.eclipse.emf.common.util.URI uri)
           
 org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,Edge> getEdges()
           
 Label getGraphLabel(org.eclipse.emf.common.util.URI uri)
           
 org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,Label> getGraphLabels()
           
 Node getNode(org.eclipse.emf.common.util.URI uri)
           
 NodeLabel getNodeLabel(org.eclipse.emf.common.util.URI uri)
           
 org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,NodeLabel> getNodeLabels()
           
 org.eclipse.emf.common.util.EList getNodeLabelsByTypeURI(org.eclipse.emf.common.util.URI typeURI)
          Return all of the Node Labels in the graph that have a particular type URI.
 org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,Node> getNodes()
           
 int getNumDynamicLabels()
           
 int getNumEdges()
           
 int getNumGraphLabels()
           
 int getNumNodeLabels()
           
 int getNumNodes()
           
 org.eclipse.emf.common.util.EList<UnresolvedIdentifiable> getUnresolvedIdentifiables()
           
 void putEdge(Edge edge)
           
 void putGraphLabel(Label label)
           
 void putNode(Node node)
           
 void putNodeLabel(NodeLabel label)
           
 boolean sane()
           
 void setURI(org.eclipse.emf.common.util.URI newURI)
          Set the URI and also update the Identifier in the dublin core instanace
 void switchToNextValue()
          For all of the dynamic labels in the system we switch the "current value" to the "next value" (the old "current value" becomes the new "next value").
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ohf.stem.core.common.impl.IdentifiableImpl
basicSetDublinCore, getDublinCore, getTypeURI, getURI, setDublinCore, setTypeURI
 
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
 
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

setURI

public void setURI(org.eclipse.emf.common.util.URI newURI)
Description copied from class: IdentifiableImpl
Set the URI and also update the Identifier in the dublin core instanace

Specified by:
setURI in interface Identifiable
Overrides:
setURI in class IdentifiableImpl
Parameters:
newURI - the new value of the 'URI' attribute.
See Also:
com.ibm.almaden.stem.common.impl.IdentifiableImpl#setURI(org.eclipse.emf.common.util.URI)

getEdges

public org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,Edge> getEdges()

Specified by:
getEdges in interface Graph
Returns:
the map

getNodes

public org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,Node> getNodes()

Specified by:
getNodes in interface Graph
Returns:
the map

getDynamicLabels

public org.eclipse.emf.common.util.EList<DynamicLabel> getDynamicLabels()

Specified by:
getDynamicLabels in interface Graph

getGraphLabels

public org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,Label> getGraphLabels()

Specified by:
getGraphLabels in interface Graph
Returns:
the map

getUnresolvedIdentifiables

public org.eclipse.emf.common.util.EList<UnresolvedIdentifiable> getUnresolvedIdentifiables()

Specified by:
getUnresolvedIdentifiables in interface Graph
Returns:
a collection that UnresolvedIdentifiable instances that specify the URI's in an Identifiable that could not be resolved.

getDecorators

public org.eclipse.emf.common.util.EList<Decorator> getDecorators()

Specified by:
getDecorators in interface Graph
Returns:
the collection of Decorators that decorate this Graph

getNodeLabelsByTypeURI

public org.eclipse.emf.common.util.EList getNodeLabelsByTypeURI(org.eclipse.emf.common.util.URI typeURI)
Return all of the Node Labels in the graph that have a particular type URI.

Specified by:
getNodeLabelsByTypeURI in interface Graph
Parameters:
typeURI - the type URI of the desired node labels
Returns:
a list of the NodeLabels that match a specific type URI

getNodeLabels

public org.eclipse.emf.common.util.EMap<org.eclipse.emf.common.util.URI,NodeLabel> getNodeLabels()

Specified by:
getNodeLabels in interface Graph
Returns:
the mapping between URI and Node labels

getNumEdges

public int getNumEdges()

Specified by:
getNumEdges in interface Graph

getNumNodes

public int getNumNodes()

Specified by:
getNumNodes in interface Graph

getNumGraphLabels

public int getNumGraphLabels()

Specified by:
getNumGraphLabels in interface Graph

getNumNodeLabels

public int getNumNodeLabels()

Specified by:
getNumNodeLabels in interface Graph

getNumDynamicLabels

public int getNumDynamicLabels()

Specified by:
getNumDynamicLabels in interface Graph

addGraph

public void addGraph(Graph graph)
This method adds the Edges, Nodes, Labels and Decorator from another graph to the collections maintained by this graph.

It does not attempt to resolve connections between Edges and the Nodes they reference.

Specified by:
addGraph in interface Graph

putEdge

public void putEdge(Edge edge)

Specified by:
putEdge in interface Graph

getEdge

public Edge getEdge(org.eclipse.emf.common.util.URI uri)

Specified by:
getEdge in interface Graph

putNode

public void putNode(Node node)

Specified by:
putNode in interface Graph

getNode

public Node getNode(org.eclipse.emf.common.util.URI uri)

Specified by:
getNode in interface Graph

putNodeLabel

public void putNodeLabel(NodeLabel label)

Specified by:
putNodeLabel in interface Graph

getNodeLabel

public NodeLabel getNodeLabel(org.eclipse.emf.common.util.URI uri)

Specified by:
getNodeLabel in interface Graph

putGraphLabel

public void putGraphLabel(Label label)

Specified by:
putGraphLabel in interface Graph

getGraphLabel

public Label getGraphLabel(org.eclipse.emf.common.util.URI uri)

Specified by:
getGraphLabel in interface Graph

addDynamicLabel

public void addDynamicLabel(DynamicLabel dynamiclabel)

Specified by:
addDynamicLabel in interface Graph

switchToNextValue

public void switchToNextValue()
For all of the dynamic labels in the system we switch the "current value" to the "next value" (the old "current value" becomes the new "next value").

Specified by:
switchToNextValue in interface Graph

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

toString

public java.lang.String toString()
Description copied from class: IdentifiableImpl

Overrides:
toString in class IdentifiableImpl
See Also:
com.ibm.almaden.stem.common.impl.IdentifiableImpl#toString()

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()

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