org.eclipse.incquery.runtime.base.core

## Class EMFDataSource

- java.lang.Object
- - org.eclipse.incquery.runtime.base.core.EMFDataSource

- All Implemented Interfaces:
    java.io.Serializable, IGraphDataSource<org.eclipse.emf.ecore.EObject>

      public class EMFDataSource
      extends java.lang.Object
      implements IGraphDataSource<org.eclipse.emf.ecore.EObject>

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EMFDataSource(NavigationHelper navigationHelper, java.util.Set<org.eclipse.emf.ecore.EReference> references, java.util.Set<org.eclipse.emf.ecore.EClass> classes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attachObserver(IGraphObserver<org.eclipse.emf.ecore.EObject> go)` Attach a new graph observer.
    `void` | `detachObserver(IGraphObserver<org.eclipse.emf.ecore.EObject> go)` Detach an existing observer.
    `java.util.Set<org.eclipse.emf.ecore.EObject>` | `getAllNodes()` Get all nodes of the graph.
    `java.util.List<org.eclipse.emf.ecore.EObject>` | `getTargetNodes(org.eclipse.emf.ecore.EObject source)` Get those nodes that are the target of an edge starting with source.
    `void` | `notifyEdgeDeleted(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target)`
    `void` | `notifyEdgeInserted(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target)`
    `void` | `notifyNodeDeleted(org.eclipse.emf.ecore.EObject node)`
    `void` | `notifyNodeInserted(org.eclipse.emf.ecore.EObject node)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EMFDataSource

          public EMFDataSource(NavigationHelper navigationHelper,
                               java.util.Set<org.eclipse.emf.ecore.EReference> references,
                               java.util.Set<org.eclipse.emf.ecore.EClass> classes)

      Parameters:
        `navigationHelper` -
        `references` -
        `classes` - additional classes to treat as nodes. Source and target classes of references need not be added.

  - ### Method Detail

    - #### getAllNodes

          public java.util.Set<org.eclipse.emf.ecore.EObject> getAllNodes()

      Description copied from interface: `IGraphDataSource`
      Get all nodes of the graph.
      Specified by:
        `getAllNodes` in interface `IGraphDataSource<org.eclipse.emf.ecore.EObject>`
      Returns:
        the set of all nodes

    - #### getTargetNodes

          public java.util.List<org.eclipse.emf.ecore.EObject> getTargetNodes(org.eclipse.emf.ecore.EObject source)

      Description copied from interface: `IGraphDataSource`
      Get those nodes that are the target of an edge starting with source. List is returned as multiple edges may be present.
      Specified by:
        `getTargetNodes` in interface `IGraphDataSource<org.eclipse.emf.ecore.EObject>`
      Parameters:
        `source` - the source node
      Returns:
        the list of target nodes or null if no targets can be found

    - #### attachObserver

          public void attachObserver(IGraphObserver<org.eclipse.emf.ecore.EObject> go)

      Description copied from interface: `IGraphDataSource`
      Attach a new graph observer. Note that the order of attaching the observers may be important (some observers will be notified earlier than others).
      Specified by:
        `attachObserver` in interface `IGraphDataSource<org.eclipse.emf.ecore.EObject>`
      Parameters:
        `go` - the graph observer

    - #### detachObserver

          public void detachObserver(IGraphObserver<org.eclipse.emf.ecore.EObject> go)

      Description copied from interface: `IGraphDataSource`
      Detach an existing observer.
      Specified by:
        `detachObserver` in interface `IGraphDataSource<org.eclipse.emf.ecore.EObject>`
      Parameters:
        `go` - the graph observer

    - #### notifyEdgeInserted

          public void notifyEdgeInserted(org.eclipse.emf.ecore.EObject source,
                                         org.eclipse.emf.ecore.EObject target)

    - #### notifyEdgeDeleted

          public void notifyEdgeDeleted(org.eclipse.emf.ecore.EObject source,
                                        org.eclipse.emf.ecore.EObject target)

    - #### notifyNodeInserted

          public void notifyNodeInserted(org.eclipse.emf.ecore.EObject node)

    - #### notifyNodeDeleted

          public void notifyNodeDeleted(org.eclipse.emf.ecore.EObject node)