cascading.flow.planner.graph

## Interface ElementGraph

All Known Implementing Classes:
  AnnotatedDecoratedElementGraph, BaseAnnotatedElementGraph, BaseElementGraph, BoundedElementMultiGraph, DecoratedElementGraph, ElementDirectedGraph, ElementMaskSubGraph, ElementMultiGraph, ElementSubGraph, FlowElementGraph, IgnoresAnnotationsElementGraph

    public interface ElementGraph

Interface ElementGraph holds a directed acyclic graph of `FlowElement` instances.

An element graph represents an assembly of `Pipe` instances bound to source and sink `Tap` instances.

Typically an element graph is fed to a `FlowPlanner` which in return creates a collection of new element graph instances that represent an executable version of the original graph.

During the planning, multiple intermediate element graphs will be created representing the full graph down to elemental sub-graphs.

There are many concrete implementations of the ElementGraph interface to support this process.

Frequently an element graph will have a single head represented by the singleton `Extent.head` and a single tail represented by the singleton `Extent.tail`. These are markers to improve the navigability of the element graph. They can be simply masked by wrapping an element graph instance with a `ElementMaskSubGraph` class.

An element graph may be annotated if it implements the `AnnotatedGraph` interface.

Annotated graphs have FlowElement instances that may have `Enum` instances associated with them. A given planner may have rules that apply annotations to various elements that inform a given platform during execuction or downstream rules in the planner `RuleRegistry`.

Any element graph can be written to a DOT file format for visualization via the `writeDOT(String)` method.

See Also:
  `ElementDirectedGraph`, `ElementSubGraph`, `ElementMultiGraph`, `ElementMaskSubGraph`, `ElementGraphs`

### Method Summary

Methods
`Scope` `addEdge(FlowElement lhs, FlowElement rhs)`
`boolean` `addEdge(FlowElement lhs, FlowElement rhs, Scope scope)`
`boolean` `addHeadVertex(FlowElement flowElement)`
`boolean` `addTailVertex(FlowElement flowElement)`
`boolean` `addVertex(FlowElement flowElement)`
`ElementGraph` `bindExtents()`
`boolean` `containsEdge(FlowElement lhs, FlowElement rhs)`
`boolean` `containsEdge(Scope scope)`
`boolean` `containsVertex(FlowElement flowElement)`
`ElementGraph` `copyElementGraph()`
`java.util.Set<Scope>` `edgeSet()`
`java.util.Set<Scope>` `edgesOf(FlowElement flowElement)`
`java.util.Set<Scope>` `getAllEdges(FlowElement lhs, FlowElement rhs)`
`Scope` `getEdge(FlowElement lhs, FlowElement rhs)`
`FlowElement` `getEdgeSource(Scope scope)`
`FlowElement` `getEdgeTarget(Scope scope)`
`java.util.Set<Scope>` `incomingEdgesOf(FlowElement flowElement)`
`int` `inDegreeOf(FlowElement flowElement)`
`int` `outDegreeOf(FlowElement flowElement)`
`java.util.Set<Scope>` `outgoingEdgesOf(FlowElement flowElement)`
`java.util.List<FlowElement>` `predecessorListOf(FlowElement flowElement)`
`boolean` `removeAllEdges(java.util.Collection<? extends Scope> scopes)`
`java.util.Set<Scope>` `removeAllEdges(FlowElement lhs, FlowElement rhs)`
`boolean` `removeAllVertices(java.util.Collection<? extends FlowElement> flowElements)`
`Scope` `removeEdge(FlowElement lhs, FlowElement rhs)`
`boolean` `removeEdge(Scope scope)`
`boolean` `removeVertex(FlowElement flowElement)`
`java.util.List<FlowElement>` `successorListOf(FlowElement flowElement)`
`java.util.Set<FlowElement>` `vertexSet()` Returns an immutable identity based Set.
`java.util.Set<FlowElement>` `vertexSetCopy()` Returns a copy of `vertexSet()` as an identity based Set suitable for modifying.
`void` `writeDOT(java.lang.String filename)`

### Method Detail

#### getAllEdges

    java.util.Set<Scope> getAllEdges(FlowElement lhs,
                                   FlowElement rhs)

#### getEdge

    Scope getEdge(FlowElement lhs,
                FlowElement rhs)

#### addEdge

    Scope addEdge(FlowElement lhs,
                FlowElement rhs)

#### addEdge

    boolean addEdge(FlowElement lhs,
                  FlowElement rhs,
                  Scope scope)

#### addHeadVertex

    boolean addHeadVertex(FlowElement flowElement)

#### addTailVertex

    boolean addTailVertex(FlowElement flowElement)

#### addVertex

    boolean addVertex(FlowElement flowElement)

#### containsEdge

    boolean containsEdge(FlowElement lhs,
                       FlowElement rhs)

#### containsEdge

    boolean containsEdge(Scope scope)

#### containsVertex

    boolean containsVertex(FlowElement flowElement)

#### edgeSet

    java.util.Set<Scope> edgeSet()

#### edgesOf

    java.util.Set<Scope> edgesOf(FlowElement flowElement)

#### removeAllEdges

    boolean removeAllEdges(java.util.Collection<? extends Scope> scopes)

#### removeAllEdges

    java.util.Set<Scope> removeAllEdges(FlowElement lhs,
                                      FlowElement rhs)

#### removeAllVertices

    boolean removeAllVertices(java.util.Collection<? extends FlowElement> flowElements)

#### removeEdge

    Scope removeEdge(FlowElement lhs,
                   FlowElement rhs)

#### removeEdge

    boolean removeEdge(Scope scope)

#### removeVertex

    boolean removeVertex(FlowElement flowElement)

#### vertexSet

    java.util.Set<FlowElement> vertexSet()

Returns an immutable identity based Set.

Returns:

#### vertexSetCopy

    java.util.Set<FlowElement> vertexSetCopy()

Returns a copy of `vertexSet()` as an identity based Set suitable for modifying.

Returns:

#### getEdgeSource

    FlowElement getEdgeSource(Scope scope)

#### getEdgeTarget

    FlowElement getEdgeTarget(Scope scope)

#### inDegreeOf

    int inDegreeOf(FlowElement flowElement)

#### incomingEdgesOf

    java.util.Set<Scope> incomingEdgesOf(FlowElement flowElement)

#### outDegreeOf

    int outDegreeOf(FlowElement flowElement)

#### outgoingEdgesOf

    java.util.Set<Scope> outgoingEdgesOf(FlowElement flowElement)

#### predecessorListOf

    java.util.List<FlowElement> predecessorListOf(FlowElement flowElement)

#### successorListOf

    java.util.List<FlowElement> successorListOf(FlowElement flowElement)

#### copyElementGraph

    ElementGraph copyElementGraph()

#### bindExtents

    ElementGraph bindExtents()

#### writeDOT

    void writeDOT(java.lang.String filename)