org.eclipse.zest.core.viewers

## Interface IGraphContentProvider

All Superinterfaces:
  IContentProvider, IStructuredContentProvider

    public interface IGraphContentProvider
    extends IStructuredContentProvider

A graph content provider.

### Method Summary

Methods
`java.lang.Object` `getDestination(java.lang.Object rel)` Gets the target Object for the given relationship.
`java.lang.Object[]` `getElements(java.lang.Object input)` Returns all the relationships in the graph for the given input.
`java.lang.Object` `getSource(java.lang.Object rel)` Gets the source Object for the given relationship.

### Methods inherited from interface org.eclipse.jface.viewers.IContentProvider

`dispose, inputChanged`

### Method Detail

#### getSource

    java.lang.Object getSource(java.lang.Object rel)

Gets the source Object for the given relationship. Note, at least one of the source or destination must not be null. If both are null, then nothing can be displayed in the graph (a relationship cannot exist without nodes to be connected to). However, if one of getSource() or getDestination() returns null, then the resulting graph will contain an unconnected node for the non-null object returned from the other method.

Parameters:
  `rel` - the relationship.
Returns:
  the source, or null for an unconnected destination.

#### getDestination

    java.lang.Object getDestination(java.lang.Object rel)

Gets the target Object for the given relationship. Note, at least one of the source or destination must not be null. If both are null, then nothing can be displayed in the graph (a relationship cannot exist without nodes to be connected to). However, if one of getSource() or getDestination() returns null, then the resulting graph will contain an unconnected node for the non-null object returned from the other method.

Parameters:
  `rel` - the relationship.
Returns:
  the destination, or null for an unconnected source.

#### getElements

    java.lang.Object[] getElements(java.lang.Object input)

Returns all the relationships in the graph for the given input.

Specified by:
  `getElements` in interface `IStructuredContentProvider`
Returns:
  all the relationships in the graph for the given input.