org.eclipse.incquery.runtime.base.itc.igraph

## Interface IGraphDataSource<V>

- Type Parameters:
    `V` - the type of the nodes in the graph
  All Superinterfaces:
    java.io.Serializable
  All Known Subinterfaces:
    IBiDirectionalGraphDataSource<V>
  All Known Implementing Classes:
    EMFDataSource, Graph, IBiDirectionalWrapper

      public interface IGraphDataSource<V>
      extends java.io.Serializable

  This interface is used to provide information about the graph to the observers.
  Author:
    Tamas Szabo

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `attachObserver(IGraphObserver<V> go)` Attach a new graph observer.
    `void` | `detachObserver(IGraphObserver<V> go)` Detach an existing observer.
    `java.util.Set<V>` | `getAllNodes()` Get all nodes of the graph.
    `java.util.List<V>` | `getTargetNodes(V source)` Get those nodes that are the target of an edge starting with source.

- - ### Method Detail

    - #### attachObserver

          void attachObserver(IGraphObserver<V> go)

      Attach a new graph observer. Note that the order of attaching the observers may be important (some observers will be notified earlier than others).
      Parameters:
        `go` - the graph observer

    - #### detachObserver

          void detachObserver(IGraphObserver<V> go)

      Detach an existing observer.
      Parameters:
        `go` - the graph observer

    - #### getAllNodes

          java.util.Set<V> getAllNodes()

      Get all nodes of the graph.
      Returns:
        the set of all nodes

    - #### getTargetNodes

          java.util.List<V> getTargetNodes(V source)

      Get those nodes that are the target of an edge starting with source. List is returned as multiple edges may be present.
      Parameters:
        `source` - the source node
      Returns:
        the list of target nodes or null if no targets can be found